Interface WebGraphQlTester.Builder<B extends WebGraphQlTester.Builder<B>>
- Type Parameters:
B
- the type of builder
- All Superinterfaces:
GraphQlTester.Builder<B>
- All Known Subinterfaces:
HttpGraphQlTester.Builder<B>
,WebSocketGraphQlTester.Builder<B>
- Enclosing interface:
- WebGraphQlTester
public static interface WebGraphQlTester.Builder<B extends WebGraphQlTester.Builder<B>>
extends GraphQlTester.Builder<B>
Common builder for Web
GraphQlTester
extensions.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build aWebGraphQlTester
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.test.tester.GraphQlTester.Builder
documentSource, errorFilter, responseTimeout
-
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.- Parameters:
codecsConsumer
- a consumer that customizes the configured codecs
-
build
WebGraphQlTester build()Build aWebGraphQlTester
instance.- Specified by:
build
in interfaceGraphQlTester.Builder<B extends WebGraphQlTester.Builder<B>>
- Returns:
- the created instance
-