From 3cfb2bef1673aa82b5ee2e25d2a0d183992f1aeb Mon Sep 17 00:00:00 2001 From: Christoph Zwerschke Date: Mon, 10 May 2021 15:23:38 +0200 Subject: [PATCH] Improve grammar in execution error messages (#3068) --- src/execution/__tests__/abstract-test.js | 4 ++-- src/execution/execute.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/execution/__tests__/abstract-test.js b/src/execution/__tests__/abstract-test.js index 519585af0f..b39167ddce 100644 --- a/src/execution/__tests__/abstract-test.js +++ b/src/execution/__tests__/abstract-test.js @@ -557,11 +557,11 @@ describe('Execute: Handles execution of abstract types', () => { ); expectError({ forTypeName: 'Human' }).toEqual( - 'Abstract type "Pet" was resolve to a type "Human" that does not exist inside schema.', + 'Abstract type "Pet" was resolved to a type "Human" that does not exist inside the schema.', ); expectError({ forTypeName: 'String' }).toEqual( - 'Abstract type "Pet" was resolve to a non-object type "String".', + 'Abstract type "Pet" was resolved to a non-object type "String".', ); expectError({ forTypeName: '__Schema' }).toEqual( diff --git a/src/execution/execute.js b/src/execution/execute.js index c7c5e37970..f3a88c8c0f 100644 --- a/src/execution/execute.js +++ b/src/execution/execute.js @@ -984,14 +984,14 @@ function ensureValidRuntimeType( const runtimeType = exeContext.schema.getType(runtimeTypeName); if (runtimeType == null) { throw new GraphQLError( - `Abstract type "${returnType.name}" was resolve to a type "${runtimeTypeName}" that does not exist inside schema.`, + `Abstract type "${returnType.name}" was resolved to a type "${runtimeTypeName}" that does not exist inside the schema.`, fieldNodes, ); } if (!isObjectType(runtimeType)) { throw new GraphQLError( - `Abstract type "${returnType.name}" was resolve to a non-object type "${runtimeTypeName}".`, + `Abstract type "${returnType.name}" was resolved to a non-object type "${runtimeTypeName}".`, fieldNodes, ); }