executeMutation method
Future<Map<String?, dynamic>>
executeMutation(
- DocumentContext document,
- OperationDefinitionContext mutation,
- GraphQLSchema schema,
- Map<String, dynamic> variableValues,
- dynamic initialValue,
- Map<String, dynamic> globalVariables,
)
Implementation
Future<Map<String?, dynamic>> executeMutation(
DocumentContext document,
OperationDefinitionContext mutation,
GraphQLSchema schema,
Map<String, dynamic> variableValues,
initialValue,
Map<String, dynamic> globalVariables) async {
var mutationType = schema.mutationType;
if (mutationType == null) {
throw GraphQLException.fromMessage(
'The schema does not define a mutation type.');
}
var selectionSet = mutation.selectionSet;
return await executeSelectionSet(document, selectionSet, mutationType,
initialValue, variableValues, globalVariables,
lazy: makeLazy(variableValues));
}