From cdd0b55529c994bfac336f25e9d4c09c80f41f33 Mon Sep 17 00:00:00 2001 From: Benjie Date: Thu, 17 Oct 2024 13:15:29 +0100 Subject: [PATCH] Apply suggestions from code review --- src/execution/__tests__/variables-test.ts | 10 +++++----- src/utilities/coerceInputValue.ts | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/execution/__tests__/variables-test.ts b/src/execution/__tests__/variables-test.ts index 29d4348d89..5810a77251 100644 --- a/src/execution/__tests__/variables-test.ts +++ b/src/execution/__tests__/variables-test.ts @@ -96,11 +96,11 @@ const TestNestedInputObject = new GraphQLInputObjectType({ const TestOneOfInputObject = new GraphQLInputObjectType({ name: 'TestOneOfInputObject', + isOneOf: true, fields: { a: { type: GraphQLString }, b: { type: GraphQLInt }, }, - isOneOf: true, }); const TestEnum = new GraphQLEnumType({ @@ -1268,7 +1268,7 @@ describe('Execute: Handles inputs', () => { }); }); - it('errors with variable with no value', () => { + it('errors with variable object with no fields', () => { const result = executeQuery( ` query ($input: TestOneOfInputObject) { @@ -1289,7 +1289,7 @@ describe('Execute: Handles inputs', () => { }); }); - it('errors with variable with multiple values', () => { + it('errors with variable object with multiple fields', () => { const result = executeQuery( ` query ($input: TestOneOfInputObject) { @@ -1310,7 +1310,7 @@ describe('Execute: Handles inputs', () => { }); }); - it('errors with variable with single null value', () => { + it('errors with variable object with single null field', () => { const result = executeQuery( ` query ($input: TestOneOfInputObject) { @@ -1331,7 +1331,7 @@ describe('Execute: Handles inputs', () => { }); }); - it('errors with variable with multiple values, only one non-null', () => { + it('errors with variable object with multiple fields, only one non-null', () => { const result = executeQuery( ` query ($input: TestOneOfInputObject) { diff --git a/src/utilities/coerceInputValue.ts b/src/utilities/coerceInputValue.ts index 4a8a8057fa..6d33386054 100644 --- a/src/utilities/coerceInputValue.ts +++ b/src/utilities/coerceInputValue.ts @@ -135,7 +135,7 @@ function coerceInputValueImpl( } /** - * keys with the value "undefined" do not appear within the coerced input + * Keys with the value "undefined" do not appear within the coerced input * object, but do appear within the original input object. * * Note: in graphql-js, supplying the value "undefined" for a variable