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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturn 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 thedocumentto execute, if the document contains multiple operations.Return values for variable defined by the operation.inthashCode()toMap()Convert the request to aMapas defined in GraphQL over HTTP and GraphQL over WebSocket: KeyValue querydocumentoperationNameoperationNamevariablesvariablestoString()
-
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:GraphQlRequestReturn the GraphQL document which is the textual representation of an operation (or operations) to perform, including any selection sets and fragments.- Specified by:
getDocumentin interfaceGraphQlRequest
-
getOperationName
Description copied from interface:GraphQlRequestReturn the name of the operation in thedocumentto execute, if the document contains multiple operations.- Specified by:
getOperationNamein interfaceGraphQlRequest
-
getVariables
Description copied from interface:GraphQlRequestReturn values for variable defined by the operation.- Specified by:
getVariablesin interfaceGraphQlRequest
-
getExtensions
Description copied from interface:GraphQlRequestReturn implementor specific, protocol extensions, if any.- Specified by:
getExtensionsin interfaceGraphQlRequest
-
toMap
Description copied from interface:GraphQlRequestConvert the request to aMapas defined in GraphQL over HTTP and GraphQL over WebSocket:Key Value query documentoperationName operationNamevariables variables- Specified by:
toMapin interfaceGraphQlRequest
-
equals
-
hashCode
public int hashCode() -
toString
-