Interface HttpSyncGraphQlClient.Builder<B extends HttpSyncGraphQlClient.Builder<B>>
- Type Parameters:
B- the type of builder
- All Superinterfaces:
GraphQlClient.BaseBuilder<B>,GraphQlClient.SyncBuilder<B>
- Enclosing interface:
HttpSyncGraphQlClient
public static interface HttpSyncGraphQlClient.Builder<B extends HttpSyncGraphQlClient.Builder<B>>
extends GraphQlClient.SyncBuilder<B>
Builder for the GraphQL over HTTP client with a blocking execution chain.
- Since:
- 1.3.0
- Author:
- Rossen Stoyanchev
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build theHttpSyncGraphQlClientinstance.Add the given header to HTTP requests.headers(Consumer<HttpHeaders> headersConsumer) Variant ofheader(String, String...)that provides access to the underlying headers to inspect or modify directly.messageConverters(Consumer<List<HttpMessageConverter<?>>> configurer) Configure message converters for JSON for use in theGraphQlResponseto convert response data to higher level objects.restClient(Consumer<RestClient.Builder> builderConsumer) Customize the underlyingRestClient.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.SyncBuilder
interceptor, interceptors, scheduler
-
Method Details
-
url
-
url
-
header
-
headers
Variant ofheader(String, String...)that provides access to the underlying headers to inspect or modify directly.- Parameters:
headersConsumer- a function that consumes theHttpHeaders
-
messageConverters
Configure message converters for JSON for use in theGraphQlResponseto convert response data to higher level objects.- Parameters:
configurer- the configurer to apply- Returns:
- this builder
-
restClient
Customize the underlyingRestClient.Note that some properties of
RestClient.Builderlike the base URL, headers, and message converters can be customized through this builder.- Parameters:
builderConsumer- a consumer that customizes theRestClient.- See Also:
-
build
HttpSyncGraphQlClient build()Build theHttpSyncGraphQlClientinstance.- Specified by:
buildin interfaceGraphQlClient.BaseBuilder<B extends HttpSyncGraphQlClient.Builder<B>>
-