Skip to content

Commit 0a731a5

Browse files
committed
Prettier and fix tests
1 parent a6676dc commit 0a731a5

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/utilities/__tests__/buildClientSchema-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ describe('Type System: build schema from introspection', () => {
619619
queryTypeIntrospection.fields[0].args[0].type.name = 'SomeUnion';
620620

621621
expect(() => buildClientSchema(introspection)).to.throw(
622-
'Introspection must provide input type for arguments.',
622+
'Introspection must provide input type for arguments, but received: SomeUnion.',
623623
);
624624
});
625625

@@ -637,7 +637,7 @@ describe('Type System: build schema from introspection', () => {
637637
queryTypeIntrospection.fields[0].type.name = 'SomeInputObject';
638638

639639
expect(() => buildClientSchema(introspection)).to.throw(
640-
'Introspection must provide output type for fields.',
640+
'Introspection must provide output type for fields, but received: SomeInputObject.',
641641
);
642642
});
643643

src/utilities/buildClientSchema.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,9 @@ export function buildClientSchema(
143143
const type = getType(typeRef);
144144
invariant(
145145
isInputType(type),
146-
'Introspection must provide input type for arguments, but received: ' + inspect(type),
146+
'Introspection must provide input type for arguments, but received: ' +
147+
inspect(type) +
148+
'.',
147149
);
148150
return type;
149151
}
@@ -154,7 +156,9 @@ export function buildClientSchema(
154156
const type = getType(typeRef);
155157
invariant(
156158
isOutputType(type),
157-
'Introspection must provide output type for fields, but received: ' + inspect(type),
159+
'Introspection must provide output type for fields, but received: ' +
160+
inspect(type) +
161+
'.',
158162
);
159163
return type;
160164
}

0 commit comments

Comments
 (0)