executeField method
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 [],
})
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);
}