From 184cc4d5d1539571c023f9efcc7bed4557c15fa4 Mon Sep 17 00:00:00 2001 From: jdecroock Date: Thu, 10 Oct 2024 12:12:00 +0200 Subject: [PATCH] fix for introspection type mismatch --- src/index.ts | 1 + src/utilities/getIntrospectionQuery.ts | 14 +++++++------- src/utilities/index.ts | 1 + 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/index.ts b/src/index.ts index 84208e2da7..5f86f05ff7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -478,6 +478,7 @@ export type { IntrospectionOptions, IntrospectionQuery, IntrospectionSchema, + IntrospectionRootObjectType, IntrospectionType, IntrospectionInputType, IntrospectionOutputType, diff --git a/src/utilities/getIntrospectionQuery.ts b/src/utilities/getIntrospectionQuery.ts index 9fc8963fa0..026a4eb38f 100644 --- a/src/utilities/getIntrospectionQuery.ts +++ b/src/utilities/getIntrospectionQuery.ts @@ -188,17 +188,17 @@ export interface IntrospectionQuery { export interface IntrospectionSchema { readonly description?: Maybe; - readonly queryType: IntrospectionNamedTypeRef; - readonly mutationType: Maybe< - IntrospectionNamedTypeRef - >; - readonly subscriptionType: Maybe< - IntrospectionNamedTypeRef - >; + readonly queryType: IntrospectionRootObjectType; + readonly mutationType: Maybe; + readonly subscriptionType: Maybe; readonly types: ReadonlyArray; readonly directives: ReadonlyArray; } +export interface IntrospectionRootObjectType { + readonly name: string; +} + export type IntrospectionType = | IntrospectionScalarType | IntrospectionObjectType diff --git a/src/utilities/index.ts b/src/utilities/index.ts index 12dba542dc..b04630b4b4 100644 --- a/src/utilities/index.ts +++ b/src/utilities/index.ts @@ -5,6 +5,7 @@ export type { IntrospectionOptions, IntrospectionQuery, IntrospectionSchema, + IntrospectionRootObjectType, IntrospectionType, IntrospectionInputType, IntrospectionOutputType,