Interface WebGraphQlClient.Builder<B extends WebGraphQlClient.Builder<B>>
- Type Parameters:
B- the builder type
- All Superinterfaces:
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 the underlyingCodecConfigurerto use for all JSON encoding and decoding needs.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.Builder
documentSource, 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 the underlyingCodecConfigurerto use for all JSON encoding and decoding needs.- Parameters:
codecsConsumer- a consumer that configures theCodecConfigurer
-
build
WebGraphQlClient build()Build aWebGraphQlClientinstance.- Specified by:
buildin interfaceGraphQlClient.Builder<B extends WebGraphQlClient.Builder<B>>
-