Interface RSocketGraphQlInterceptor
public interface RSocketGraphQlInterceptor
Interceptor for server handling of GraphQL over RSocket requests,
allowing customization of the
ExecutionInput and
the ExecutionResult.
Interceptors are typically declared as beans in Spring configuration and
ordered as defined in ObjectProvider.orderedStream().
- Since:
- 1.0.0
- Author:
- Rossen Stoyanchev
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceContract for delegation to the rest of the chain. -
Method Summary
Modifier and TypeMethodDescriptiondefault RSocketGraphQlInterceptorandThen(RSocketGraphQlInterceptor nextInterceptor) Return a newRSocketGraphQlInterceptorthat invokes the current interceptor first and then the one that is passed in.default RSocketGraphQlInterceptor.ChainApply this interceptor to the givenChainresulting in an intercepted chain.reactor.core.publisher.Mono<RSocketGraphQlResponse>intercept(RSocketGraphQlRequest request, RSocketGraphQlInterceptor.Chain chain) Intercept a request and delegate to the rest of the chain including other interceptors and aExecutionGraphQlService.
-
Method Details
-
intercept
reactor.core.publisher.Mono<RSocketGraphQlResponse> intercept(RSocketGraphQlRequest request, RSocketGraphQlInterceptor.Chain chain) Intercept a request and delegate to the rest of the chain including other interceptors and aExecutionGraphQlService.- Parameters:
request- the request to executechain- the rest of the chain to execute the request- Returns:
- a
Monowith the response
-
andThen
Return a newRSocketGraphQlInterceptorthat invokes the current interceptor first and then the one that is passed in.- Parameters:
nextInterceptor- the interceptor to delegate to after the current- Returns:
- a new interceptor that chains the two
-
apply
Apply this interceptor to the givenChainresulting in an intercepted chain.- Parameters:
chain- the chain to add interception around- Returns:
- a new chain instance
-