Class DefaultGraphQlRequest
java.lang.Object
org.springframework.graphql.support.DefaultGraphQlRequest
- All Implemented Interfaces:
GraphQlRequest
- Direct Known Subclasses:
DefaultExecutionGraphQlRequest
Default implementation of
GraphQlRequest
.- Since:
- 1.0.0
- Author:
- Rossen Stoyanchev, Brian Clozel
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Return the GraphQL document which is the textual representation of an operation (or operations) to perform, including any selection sets and fragments.Return implementor specific, protocol extensions, if any.Return the name of the operation in thedocument
to execute, if the document contains multiple operations.Return values for variable defined by the operation.int
hashCode()
toMap()
toString()
-
Field Details
-
QUERY_KEY
- See Also:
-
OPERATION_NAME_KEY
- See Also:
-
VARIABLES_KEY
- See Also:
-
EXTENSIONS_KEY
- See Also:
-
-
Constructor Details
-
DefaultGraphQlRequest
Create a request.- Parameters:
document
- textual representation of the operation(s)
-
DefaultGraphQlRequest
public DefaultGraphQlRequest(String document, @Nullable String operationName, @Nullable Map<String, Object> variables, @Nullable Map<String, Object> extensions) Create a request with a complete set of inputs.- Parameters:
document
- textual representation of the operation(s)operationName
- optionally, the name of the operation to executevariables
- variables by which the operation is parameterizedextensions
- implementor specific, protocol extensions
-
-
Method Details
-
getDocument
Description copied from interface:GraphQlRequest
Return the GraphQL document which is the textual representation of an operation (or operations) to perform, including any selection sets and fragments.- Specified by:
getDocument
in interfaceGraphQlRequest
-
getOperationName
Description copied from interface:GraphQlRequest
Return the name of the operation in thedocument
to execute, if the document contains multiple operations.- Specified by:
getOperationName
in interfaceGraphQlRequest
-
getVariables
Description copied from interface:GraphQlRequest
Return values for variable defined by the operation.- Specified by:
getVariables
in interfaceGraphQlRequest
-
getExtensions
Description copied from interface:GraphQlRequest
Return implementor specific, protocol extensions, if any.- Specified by:
getExtensions
in interfaceGraphQlRequest
-
toMap
Description copied from interface:GraphQlRequest
Convert the request to aMap
as defined in GraphQL over HTTP and GraphQL over WebSocket.Key Value query document
operationName operationName
variables variables
- Specified by:
toMap
in interfaceGraphQlRequest
-
equals
-
hashCode
public int hashCode() -
toString
-