executeMutation method

Future<Map<String?, dynamic>> executeMutation(
  1. DocumentContext document,
  2. OperationDefinitionContext mutation,
  3. GraphQLSchema schema,
  4. Map<String, dynamic> variableValues,
  5. dynamic initialValue,
  6. 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));
}