diff --git a/src/utilities/__tests__/buildClientSchema-test.js b/src/utilities/__tests__/buildClientSchema-test.js index ed09df4682..c5d57250e6 100644 --- a/src/utilities/__tests__/buildClientSchema-test.js +++ b/src/utilities/__tests__/buildClientSchema-test.js @@ -619,7 +619,7 @@ describe('Type System: build schema from introspection', () => { queryTypeIntrospection.fields[0].args[0].type.name = 'SomeUnion'; expect(() => buildClientSchema(introspection)).to.throw( - 'Introspection must provide input type for arguments.', + 'Introspection must provide input type for arguments, but received: SomeUnion.', ); }); @@ -637,7 +637,7 @@ describe('Type System: build schema from introspection', () => { queryTypeIntrospection.fields[0].type.name = 'SomeInputObject'; expect(() => buildClientSchema(introspection)).to.throw( - 'Introspection must provide output type for fields.', + 'Introspection must provide output type for fields, but received: SomeInputObject.', ); }); diff --git a/src/utilities/buildClientSchema.js b/src/utilities/buildClientSchema.js index ecea2bfe1a..9d541e3e07 100644 --- a/src/utilities/buildClientSchema.js +++ b/src/utilities/buildClientSchema.js @@ -143,7 +143,9 @@ export function buildClientSchema( const type = getType(typeRef); invariant( isInputType(type), - 'Introspection must provide input type for arguments, but received: ' + inspect(type), + 'Introspection must provide input type for arguments, but received: ' + + inspect(type) + + '.', ); return type; } @@ -154,7 +156,9 @@ export function buildClientSchema( const type = getType(typeRef); invariant( isOutputType(type), - 'Introspection must provide output type for fields, but received: ' + inspect(type), + 'Introspection must provide output type for fields, but received: ' + + inspect(type) + + '.', ); return type; }