Interface GraphQlClientInterceptor
- All Known Subinterfaces:
WebSocketGraphQlClientInterceptor
public interface GraphQlClientInterceptor
Interceptor for
GraphQlClient
requests for use in a non-blocking
execution chain with a non-blocking GraphQlTransport
..- Since:
- 1.0.0
- Author:
- Rossen Stoyanchev
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Contract to delegate to the rest of a non-blocking execution chain.static interface
Contract for delegation of subscription requests to the rest of the chain. -
Method Summary
Modifier and TypeMethodDescriptiondefault GraphQlClientInterceptor
andThen
(GraphQlClientInterceptor interceptor) Return a new interceptor that invokes the current interceptor first and then the one that is passed in.default reactor.core.publisher.Mono<ClientGraphQlResponse>
intercept
(ClientGraphQlRequest request, GraphQlClientInterceptor.Chain chain) Intercept a single response request (query and mutation operations) and delegate to the rest of the chain including other interceptors followed by theGraphQlTransport
.default reactor.core.publisher.Flux<ClientGraphQlResponse>
interceptSubscription
(ClientGraphQlRequest request, GraphQlClientInterceptor.SubscriptionChain chain) Intercept a subscription request and delegate to the rest of the chain including other interceptors followed by theGraphQlTransport
.
-
Method Details
-
intercept
default reactor.core.publisher.Mono<ClientGraphQlResponse> intercept(ClientGraphQlRequest request, GraphQlClientInterceptor.Chain chain) Intercept a single response request (query and mutation operations) and delegate to the rest of the chain including other interceptors followed by theGraphQlTransport
.- Parameters:
request
- the request to performchain
- the rest of the chain to perform the request- Returns:
- a
Mono
for the response - See Also:
-
interceptSubscription
default reactor.core.publisher.Flux<ClientGraphQlResponse> interceptSubscription(ClientGraphQlRequest request, GraphQlClientInterceptor.SubscriptionChain chain) Intercept a subscription request and delegate to the rest of the chain including other interceptors followed by theGraphQlTransport
.- Parameters:
request
- the request to performchain
- the rest of the chain to perform the request- Returns:
- a
Flux
with responses - See Also:
-
andThen
Return a new interceptor that invokes the current interceptor first and then the one that is passed in.- Parameters:
interceptor
- the interceptor to delegate to after "this"- Returns:
- the new
GraphQlClientInterceptor
-