Skip to content

Commit

Permalink
Backport introspection type fix (#4226)
Browse files Browse the repository at this point in the history
Backports #4222
Supersedes #3910
Fixes #3909
Fixes #3409
  • Loading branch information
JoviDeCroock authored Oct 13, 2024
1 parent 45e28a5 commit 2562ce0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/type/__tests__/introspection-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('Introspection', () => {
expect(result).to.deep.equal({
data: {
__schema: {
queryType: { name: 'SomeObject' },
queryType: { name: 'SomeObject', kind: 'OBJECT' },
mutationType: null,
subscriptionType: null,
types: [
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/__tests__/buildClientSchema-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ describe('Type System: build schema from introspection', () => {
delete introspection.__schema.queryType.name;

expect(() => buildClientSchema(introspection)).to.throw(
'Unknown type reference: {}.',
'Unknown type reference: { kind: "OBJECT" }.',
);
});

Expand Down
6 changes: 3 additions & 3 deletions src/utilities/getIntrospectionQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ export function getIntrospectionQuery(options?: IntrospectionOptions): string {
query IntrospectionQuery {
__schema {
${schemaDescription}
queryType { name }
mutationType { name }
subscriptionType { name }
queryType { name kind }
mutationType { name kind }
subscriptionType { name kind }
types {
...FullType
}
Expand Down

0 comments on commit 2562ce0

Please sign in to comment.