Interface WebGraphQlClient.Builder<B extends WebGraphQlClient.Builder<B>>
- Type Parameters:
B- the type of builder
- All Superinterfaces:
GraphQlClient.BaseBuilder<B>,GraphQlClient.Builder<B>
- All Known Subinterfaces:
HttpGraphQlClient.Builder<B>,WebSocketGraphQlClient.Builder<B>
- Enclosing interface:
- WebGraphQlClient
public static interface WebGraphQlClient.Builder<B extends WebGraphQlClient.Builder<B>>
extends GraphQlClient.Builder<B>
Base builder for GraphQL clients over a Web transport.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build aWebGraphQlClientinstance.codecConfigurer(Consumer<CodecConfigurer> codecsConsumer) Configure JSON encoders and decoders for use in theGraphQlResponseto convert response data to higher level objects.Add the given header to HTTP requests or to the WebSocket handshake request.headers(Consumer<HttpHeaders> headersConsumer) Variant ofheader(String, String...)that provides access to the underlying headers to inspect or modify directly.Set the GraphQL endpoint URL as a String.Set the GraphQL endpoint URL.Methods inherited from interface org.springframework.graphql.client.GraphQlClient.BaseBuilder
blockingTimeout, documentSourceMethods inherited from interface org.springframework.graphql.client.GraphQlClient.Builder
interceptor, interceptors
-
Method Details
-
url
Set the GraphQL endpoint URL as a String.- Parameters:
url- the url to send HTTP requests to or connect over WebSocket
-
url
Set the GraphQL endpoint URL.- Parameters:
url- the url to send HTTP requests to or connect over WebSocket
-
header
Add the given header to HTTP requests or to the WebSocket handshake request.- Parameters:
name- the header namevalues- the header values
-
headers
Variant ofheader(String, String...)that provides access to the underlying headers to inspect or modify directly.- Parameters:
headersConsumer- a function that consumes theHttpHeaders
-
codecConfigurer
Configure JSON encoders and decoders for use in theGraphQlResponseto convert response data to higher level objects.- Parameters:
codecsConsumer- a callback that customizes the configured codecs
-
build
WebGraphQlClient build()Build aWebGraphQlClientinstance.- Specified by:
buildin interfaceGraphQlClient.BaseBuilder<B extends WebGraphQlClient.Builder<B>>
-