From 4dfb993c7c4e50d9954a1346480e0400d6a3db38 Mon Sep 17 00:00:00 2001 From: Ivan Goncharov Date: Fri, 30 Mar 2018 01:49:54 +0300 Subject: [PATCH] Execute: Remove excessive arguments (#1268) --- src/execution/execute.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/execution/execute.js b/src/execution/execute.js index af9163aa9d..ea0ed406aa 100644 --- a/src/execution/execute.js +++ b/src/execution/execute.js @@ -731,7 +731,7 @@ export function buildResolveInfo( // The resolve function's optional fourth argument is a collection of // information about the current execution state. return { - fieldName: fieldNodes[0].name.value, + fieldName: fieldDef.name, fieldNodes, returnType: fieldDef.type, parentType, @@ -1171,7 +1171,6 @@ function completeObjectValue( exeContext, returnType, fieldNodes, - info, path, result, ); @@ -1187,7 +1186,6 @@ function completeObjectValue( exeContext, returnType, fieldNodes, - info, path, result, ); @@ -1208,7 +1206,6 @@ function collectAndExecuteSubfields( exeContext: ExecutionContext, returnType: GraphQLObjectType, fieldNodes: $ReadOnlyArray, - info: GraphQLResolveInfo, path: ResponsePath, result: mixed, ): MaybePromise> { @@ -1260,7 +1257,7 @@ function defaultResolveTypeFn( context: mixed, info: GraphQLResolveInfo, abstractType: GraphQLAbstractType, -): ?GraphQLObjectType | string | Promise { +): MaybePromise { // First, look for `__typename`. if ( value !== null &&