Skip to content

Commit 184cc4d

Browse files
JoviDeCroockyaacovCR
authored andcommitted
fix for introspection type mismatch
1 parent 50607e4 commit 184cc4d

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,7 @@ export type {
478478
IntrospectionOptions,
479479
IntrospectionQuery,
480480
IntrospectionSchema,
481+
IntrospectionRootObjectType,
481482
IntrospectionType,
482483
IntrospectionInputType,
483484
IntrospectionOutputType,

src/utilities/getIntrospectionQuery.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -188,17 +188,17 @@ export interface IntrospectionQuery {
188188

189189
export interface IntrospectionSchema {
190190
readonly description?: Maybe<string>;
191-
readonly queryType: IntrospectionNamedTypeRef<IntrospectionObjectType>;
192-
readonly mutationType: Maybe<
193-
IntrospectionNamedTypeRef<IntrospectionObjectType>
194-
>;
195-
readonly subscriptionType: Maybe<
196-
IntrospectionNamedTypeRef<IntrospectionObjectType>
197-
>;
191+
readonly queryType: IntrospectionRootObjectType;
192+
readonly mutationType: Maybe<IntrospectionRootObjectType>;
193+
readonly subscriptionType: Maybe<IntrospectionRootObjectType>;
198194
readonly types: ReadonlyArray<IntrospectionType>;
199195
readonly directives: ReadonlyArray<IntrospectionDirective>;
200196
}
201197

198+
export interface IntrospectionRootObjectType {
199+
readonly name: string;
200+
}
201+
202202
export type IntrospectionType =
203203
| IntrospectionScalarType
204204
| IntrospectionObjectType

src/utilities/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export type {
55
IntrospectionOptions,
66
IntrospectionQuery,
77
IntrospectionSchema,
8+
IntrospectionRootObjectType,
89
IntrospectionType,
910
IntrospectionInputType,
1011
IntrospectionOutputType,

0 commit comments

Comments
 (0)