Interface GraphqlRequest
A GraphQL request.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the extensions of thequery()
.static GraphqlRequest
Returns a newly-createdGraphqlRequest
with the specifiedquery
.static GraphqlRequest
of(String query, @Nullable String operationName, Map<String,Object> variables, Map<String,Object> extensions, @Nullable MediaType produceType)
Returns the operation name of thequery()
.Returns theMediaType
obtained through content negotiation.query()
Returns the GraphQL query of the current request.
-
Method Details
-
of
Returns a newly-createdGraphqlRequest
with the specifiedquery
. -
of
-
query
String query()Returns the GraphQL query of the current request. -
operationName
-
variables
-
extensions
Returns the extensions of thequery()
. This entry is reserved for implementors to extend the protocol. If not specified, an emptyMap
is returned. -
produceType
Returns theMediaType
obtained through content negotiation.null
ifHttpHeaderNames.ACCEPT
does not contain aMediaType.GRAPHQL_JSON
or aMediaType.JSON
. The returnedMediaType
can be used as the default content type for a GraphQLHttpResponse
.See Accept header and GraphQL over HTTP for more information.
-