public interface ExecutionGraphQlRequest extends GraphQlRequest
GraphQlRequest
for request handling through GraphQL
Java with support for customizing the ExecutionInput
passed into
GraphQL
.Modifier and Type | Method and Description |
---|---|
void |
configureExecutionInput(BiFunction<ExecutionInput,ExecutionInput.Builder,ExecutionInput> configurer)
|
void |
executionId(ExecutionId executionId)
Configure the
ExecutionId to set on
ExecutionInput.getExecutionId() , overriding the transport assigned
id . |
ExecutionId |
getExecutionId()
Return the configured
executionId . |
String |
getId()
Return the transport assigned id for the request that in turn sets
executionId . |
Locale |
getLocale()
Return the transport assigned locale value, if any.
|
ExecutionInput |
toExecutionInput()
Create the
ExecutionInput to pass to GraphQL . |
getDocument, getOperationName, getVariables, toMap
String getId()
executionId
.
By default, the id is initialized as follows:
ServerHttpRequest
id which correlates
to WebFlux log messages. For Reactor Netty, it also correlates to server
log messages.
AlternativeJdkIdGenerator
, which does
not correlate to anything, but is more efficient than the default
ExecutionIdProvider
which relies on
UUID.randomUUID()
.
"subscribe"
message from the GraphQL over WebSocket protocol that is used to correlate
request and response messages on the the WebSocket.
To override this id, use executionId(ExecutionId)
or configure
GraphQL
with an ExecutionIdProvider
.
void executionId(ExecutionId executionId)
ExecutionId
to set on
ExecutionInput.getExecutionId()
, overriding the transport assigned
id
.executionId
- the id to use@Nullable ExecutionId getExecutionId()
executionId
.void configureExecutionInput(BiFunction<ExecutionInput,ExecutionInput.Builder,ExecutionInput> configurer)
BiFunction
to help initialize the ExecutionInput
passed to GraphQL
. The ExecutionInput
is first
pre-populated with values from "this" ExecutionGraphQlRequest
, and
is then customized with the functions provided here.configurer
- a BiFunction
that accepts the
ExecutionInput
initialized so far, and a builder to customize it.ExecutionInput toExecutionInput()
ExecutionInput
to pass to GraphQL
.
passed to GraphQL
. The ExecutionInput
is populated
with values from "this" ExecutionGraphQlRequest
, and then customized
with functions provided via configureExecutionInput(BiFunction)
.ExecutionInput