Skip to content

Commit

Permalink
Include kind in the types (#4222)
Browse files Browse the repository at this point in the history
Supersedes #3910
Fixes #3909
Fixes #3409

This puts the Selection-set in line with the expected type
  • Loading branch information
JoviDeCroock authored Oct 11, 2024
1 parent 50607e4 commit 6a379a5
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 @@ -716,7 +716,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 @@ -77,9 +77,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 6a379a5

Please sign in to comment.