Interface GraphQlClientInterceptor
- All Known Subinterfaces:
WebSocketGraphQlClientInterceptor
public interface GraphQlClientInterceptor
Interceptor for
GraphQlClient
requests.- Since:
- 1.0.0
- Author:
- Rossen Stoyanchev
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Contract for delegation of single response requests to the rest of the 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 newGraphQlClientInterceptor
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 newGraphQlClientInterceptor
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
-