Skip to content

Commit

Permalink
Prettier and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mjmahone committed Jan 15, 2019
1 parent a6676dc commit 0a731a5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/utilities/__tests__/buildClientSchema-test.js
Expand Up @@ -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.',
);
});

Expand All @@ -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.',
);
});

Expand Down
8 changes: 6 additions & 2 deletions src/utilities/buildClientSchema.js
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down

0 comments on commit 0a731a5

Please sign in to comment.