Interface GraphQlClient.Builder<B extends GraphQlClient.Builder<B>>
- All Known Subinterfaces:
HttpGraphQlClient.Builder<B>
,RSocketGraphQlClient.Builder<B>
,WebGraphQlClient.Builder<B>
,WebSocketGraphQlClient.Builder<B>
- All Known Implementing Classes:
AbstractGraphQlClientBuilder
- Enclosing interface:
- GraphQlClient
public static interface GraphQlClient.Builder<B extends GraphQlClient.Builder<B>>
Defines a builder for creating
GraphQlClient
instances.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build theGraphQlClient
instance.documentSource
(DocumentSource contentLoader) Configure aDocumentSource
for use withGraphQlClient.documentName(String)
for resolving a document by name.interceptor
(GraphQlClientInterceptor... interceptors) Configure interceptors to be invoked before delegating to theGraphQlTransport
to perform the request.interceptors
(Consumer<List<GraphQlClientInterceptor>> interceptorsConsumer) Customize the list of interceptors.
-
Method Details
-
interceptor
Configure interceptors to be invoked before delegating to theGraphQlTransport
to perform the request.- Parameters:
interceptors
- the interceptors to add- Returns:
- this builder
-
interceptors
Customize the list of interceptors. The provided list is "live", so the consumer can inspect and insert interceptors accordingly.- Parameters:
interceptorsConsumer
- consumer to customize the interceptors with- Returns:
- this builder
-
documentSource
Configure aDocumentSource
for use withGraphQlClient.documentName(String)
for resolving a document by name.By default, this is set to
ResourceDocumentSource
with classpath location"graphql-documents/"
andResourceDocumentSource.FILE_EXTENSIONS
as extensions. -
build
GraphQlClient build()Build theGraphQlClient
instance.
-