Interface GraphQlClientInterceptor
- All Known Subinterfaces:
WebSocketGraphQlClientInterceptor
public interface GraphQlClientInterceptor
Interceptor for
GraphQlClient requests.- Since:
- 1.0.0
- Author:
- Rossen Stoyanchev
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceContract for delegation of single response requests to the rest of the chain.static interfaceContract for delegation of subscription requests to the rest of the chain. -
Method Summary
Modifier and TypeMethodDescriptiondefault GraphQlClientInterceptorandThen(GraphQlClientInterceptor interceptor) Return a newGraphQlClientInterceptorthat 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
Monofor 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
Fluxwith responses - See Also:
-
andThen
Return a newGraphQlClientInterceptorthat 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
-