executeField method

Future executeField(
  1. DocumentContext document,
  2. String? fieldName,
  3. GraphQLObjectType objectType,
  4. dynamic objectValue,
  5. List<SelectionContext> fields,
  6. GraphQLType fieldType,
  7. Map<String, dynamic> variableValues,
  8. Map<String, dynamic> globalVariables, {
  9. List<List> lazy = const [],
})

Implementation

Future executeField(
    DocumentContext document,
    String? fieldName,
    GraphQLObjectType objectType,
    dynamic objectValue,
    List<SelectionContext> fields,
    GraphQLType fieldType,
    Map<String, dynamic> variableValues,
    Map<String, dynamic> globalVariables,
    {List<List> lazy = const []}) async {
  var field = fields[0];
  var argumentValues =
      coerceArgumentValues(objectType, field, variableValues);
  var resolvedValue = await resolveFieldValue(
      objectType,
      objectValue,
      fieldName,
      Map<String, dynamic>.from(globalVariables)..addAll(argumentValues));
  return completeValue(document, fieldName, fieldType, fields, resolvedValue,
      variableValues, globalVariables,
      lazy: lazy);
}