Class DgsGraphQlClient.RequestSpec
- Enclosing class:
DgsGraphQlClient
- Since:
- 1.3.0
- Author:
- Rossen Stoyanchev
-
Method Summary
Modifier and TypeMethodDescriptionSet a client request attribute.attributes(Consumer<Map<String, Object>> attributesConsumer) Manipulate the client request attributes.ConfigureCoercingfor serialization of scalar types.ConfigureCoercingfor serialization of scalar types.reactor.core.publisher.Mono<ClientGraphQlResponse> execute()CreateGraphQLQueryRequest, serialize it to a String document to send, and delegate to the wrappedGraphQlClient.reactor.core.publisher.Flux<ClientGraphQlResponse> CreateGraphQLQueryRequest, serialize it to a String document to send, and delegate to the wrappedGraphQlClient.CreateGraphQLQueryRequest, serialize it to a String document to send, and delegate to the wrappedGraphQlClient.projection(com.netflix.graphql.dgs.client.codegen.BaseProjectionNode projectionNode) Provide aBaseProjectionNodethat defines the response selection set.retrieve()CreateGraphQLQueryRequest, serialize it to a String document to send, and delegate to the wrappedGraphQlClient.Variant ofretrieve()with explicit path relative to the "data" key.CreateGraphQLQueryRequest, serialize it to a String document to send, and delegate to the wrappedGraphQlClient.CreateGraphQLQueryRequest, serialize it to a String document to send, and delegate to the wrappedGraphQlClient.retrieveSync(String path) Variant ofexecuteSync()with explicit path relative to the "data" key.
-
Method Details
-
projection
public DgsGraphQlClient.RequestSpec projection(com.netflix.graphql.dgs.client.codegen.BaseProjectionNode projectionNode) Provide aBaseProjectionNodethat defines the response selection set.- Parameters:
projectionNode- the response selection set- Returns:
- ths same builder instance
-
coercing
public DgsGraphQlClient.RequestSpec coercing(Class<?> scalarType, graphql.schema.Coercing<?, ?> coercing) ConfigureCoercingfor serialization of scalar types.- Parameters:
scalarType- the scalar typecoercing- the coercing function for this scalar- Returns:
- ths same builder instance
-
coercing
public DgsGraphQlClient.RequestSpec coercing(Map<Class<?>, graphql.schema.Coercing<?, ?>> coercingMap) ConfigureCoercingfor serialization of scalar types.- Parameters:
coercingMap- the map of coercing function- Returns:
- ths same builder instance
-
attribute
Set a client request attribute.This is purely for client side request processing, i.e. available throughout the
GraphQlClientInterceptorchain but not sent.- Parameters:
name- the attribute namevalue- the attribute value- Returns:
- ths same builder instance
-
attributes
Manipulate the client request attributes. The map provided to the consumer is "live", so the consumer can inspect and modify attributes accordingly.- Parameters:
attributesConsumer- the consumer that will manipulate request attributes- Returns:
- ths same builder instance
-
retrieveSync
CreateGraphQLQueryRequest, serialize it to a String document to send, and delegate to the wrappedGraphQlClient.See Javadoc of delegate method
GraphQlClient.RequestSpec.retrieveSync(String)for details. The path used is the operationName. -
retrieveSync
Variant ofexecuteSync()with explicit path relative to the "data" key.- Parameters:
path- the JSON path relative to the "data" key
-
retrieve
CreateGraphQLQueryRequest, serialize it to a String document to send, and delegate to the wrappedGraphQlClient.See Javadoc of delegate method
GraphQlClient.RequestSpec.retrieve(String)for details. The path used is the operationName. -
retrieve
Variant ofretrieve()with explicit path relative to the "data" key.- Parameters:
path- the JSON path relative to the "data" key
-
retrieveSubscription
CreateGraphQLQueryRequest, serialize it to a String document to send, and delegate to the wrappedGraphQlClient.See Javadoc of delegate method
GraphQlClient.RequestSpec.retrieveSubscription(String)for details. The path used is the operationName. -
executeSync
CreateGraphQLQueryRequest, serialize it to a String document to send, and delegate to the wrappedGraphQlClient.See Javadoc of delegate method
GraphQlClient.RequestSpec.executeSync()for details. -
execute
CreateGraphQLQueryRequest, serialize it to a String document to send, and delegate to the wrappedGraphQlClient.See Javadoc of delegate method
GraphQlClient.RequestSpec.execute()for details. -
executeSubscription
CreateGraphQLQueryRequest, serialize it to a String document to send, and delegate to the wrappedGraphQlClient.See Javadoc of delegate method
GraphQlClient.RequestSpec.executeSubscription()for details.
-