Skip to content

Commit 2562ce0

Browse files
authored
Backport introspection type fix (#4226)
Backports #4222 Supersedes #3910 Fixes #3909 Fixes #3409
1 parent 45e28a5 commit 2562ce0

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/type/__tests__/introspection-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ describe('Introspection', () => {
3232
expect(result).to.deep.equal({
3333
data: {
3434
__schema: {
35-
queryType: { name: 'SomeObject' },
35+
queryType: { name: 'SomeObject', kind: 'OBJECT' },
3636
mutationType: null,
3737
subscriptionType: null,
3838
types: [

src/utilities/__tests__/buildClientSchema-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ describe('Type System: build schema from introspection', () => {
695695
delete introspection.__schema.queryType.name;
696696

697697
expect(() => buildClientSchema(introspection)).to.throw(
698-
'Unknown type reference: {}.',
698+
'Unknown type reference: { kind: "OBJECT" }.',
699699
);
700700
});
701701

src/utilities/getIntrospectionQuery.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ export function getIntrospectionQuery(options?: IntrospectionOptions): string {
7575
query IntrospectionQuery {
7676
__schema {
7777
${schemaDescription}
78-
queryType { name }
79-
mutationType { name }
80-
subscriptionType { name }
78+
queryType { name kind }
79+
mutationType { name kind }
80+
subscriptionType { name kind }
8181
types {
8282
...FullType
8383
}

0 commit comments

Comments
 (0)