Skip to content

Commit 3cfb2be

Browse files
authored
Improve grammar in execution error messages (#3068)
1 parent bd5583c commit 3cfb2be

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/execution/__tests__/abstract-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,11 +557,11 @@ describe('Execute: Handles execution of abstract types', () => {
557557
);
558558

559559
expectError({ forTypeName: 'Human' }).toEqual(
560-
'Abstract type "Pet" was resolve to a type "Human" that does not exist inside schema.',
560+
'Abstract type "Pet" was resolved to a type "Human" that does not exist inside the schema.',
561561
);
562562

563563
expectError({ forTypeName: 'String' }).toEqual(
564-
'Abstract type "Pet" was resolve to a non-object type "String".',
564+
'Abstract type "Pet" was resolved to a non-object type "String".',
565565
);
566566

567567
expectError({ forTypeName: '__Schema' }).toEqual(

src/execution/execute.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -984,14 +984,14 @@ function ensureValidRuntimeType(
984984
const runtimeType = exeContext.schema.getType(runtimeTypeName);
985985
if (runtimeType == null) {
986986
throw new GraphQLError(
987-
`Abstract type "${returnType.name}" was resolve to a type "${runtimeTypeName}" that does not exist inside schema.`,
987+
`Abstract type "${returnType.name}" was resolved to a type "${runtimeTypeName}" that does not exist inside the schema.`,
988988
fieldNodes,
989989
);
990990
}
991991

992992
if (!isObjectType(runtimeType)) {
993993
throw new GraphQLError(
994-
`Abstract type "${returnType.name}" was resolve to a non-object type "${runtimeTypeName}".`,
994+
`Abstract type "${returnType.name}" was resolved to a non-object type "${runtimeTypeName}".`,
995995
fieldNodes,
996996
);
997997
}

0 commit comments

Comments
 (0)