Interface RSocketGraphQlTester.Builder<B extends RSocketGraphQlTester.Builder<B>>
- Type Parameters:
B
- the type of builder
- All Superinterfaces:
GraphQlTester.Builder<B>
- All Known Implementing Classes:
DefaultRSocketGraphQlTesterBuilder
- Enclosing interface:
- RSocketGraphQlTester
public static interface RSocketGraphQlTester.Builder<B extends RSocketGraphQlTester.Builder<B>>
extends GraphQlTester.Builder<B>
Builder for a GraphQL over RSocket tester.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build theRSocketGraphQlTester
instance.clientTransport
(io.rsocket.transport.ClientTransport clientTransport) Use a givenClientTransport
to communicate with the remote server.dataMimeType
(MimeType dataMimeType) Customize the format of data payloads for the connection.Customize the route to specify in the metadata of each request so the server can route it to the handler for GraphQL requests.rsocketRequester
(Consumer<RSocketRequester.Builder> requester) Customize the underlyingRSocketRequester
to use.Select TCP as the underlying network protocol.Select WebSocket as the underlying network protocol.Methods inherited from interface org.springframework.graphql.test.tester.GraphQlTester.Builder
documentSource, errorFilter, responseTimeout
-
Method Details
-
tcp
Select TCP as the underlying network protocol.- Parameters:
host
- the remote host to connect toport
- the remote port to connect to- Returns:
- the same builder instance
-
webSocket
Select WebSocket as the underlying network protocol.- Parameters:
uri
- the URL for the WebSocket handshake- Returns:
- the same builder instance
-
clientTransport
Use a givenClientTransport
to communicate with the remote server.- Parameters:
clientTransport
- the transport to use- Returns:
- the same builder instance
-
dataMimeType
Customize the format of data payloads for the connection.By default, this is set to
"application/graphql+json"
but it can be changed to"application/json"
if necessary.- Parameters:
dataMimeType
- the mime type to use- Returns:
- the same builder instance
-
route
Customize the route to specify in the metadata of each request so the server can route it to the handler for GraphQL requests.- Parameters:
route
- the route- Returns:
- the same builder instance
-
rsocketRequester
Customize the underlyingRSocketRequester
to use.Note that some properties of
RSocketRequester.Builder
like the data MimeType, and the underlying RSocket transport can be customized through this builder.- Parameters:
requester
- a consumer that customizes theRSocketRequester
through its builder- Returns:
- the same builder instance
- See Also:
-
build
RSocketGraphQlTester build()Build theRSocketGraphQlTester
instance.- Specified by:
build
in interfaceGraphQlTester.Builder<B extends RSocketGraphQlTester.Builder<B>>
- Returns:
- the created instance
-