Interface WebGraphQlClient.Builder<B extends WebGraphQlClient.Builder<B>>
- 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 aWebGraphQlClient
instance.codecConfigurer
(Consumer<CodecConfigurer> codecsConsumer) Configure the underlyingCodecConfigurer
to 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 underlyingCodecConfigurer
to use for all JSON encoding and decoding needs. -
build
WebGraphQlClient build()Build aWebGraphQlClient
instance.- Specified by:
build
in interfaceGraphQlClient.Builder<B extends WebGraphQlClient.Builder<B>>
-