-
Notifications
You must be signed in to change notification settings - Fork 2k
TS: introspectionTypes
should be array of GraphQLNamedType
#2261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TS: introspectionTypes
should be array of GraphQLNamedType
#2261
Conversation
src/type/introspection.d.ts
Outdated
@@ -35,6 +35,6 @@ export const SchemaMetaFieldDef: GraphQLField<any, any>; | |||
export const TypeMetaFieldDef: GraphQLField<any, any>; | |||
export const TypeNameMetaFieldDef: GraphQLField<any, any>; | |||
|
|||
export const introspectionTypes: ReadonlyArray<GraphQLType>; | |||
export const introspectionTypes: ReadonlyArray<GraphQLNamedType>; | |||
|
|||
export function isIntrospectionType(type: GraphQLType): boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change this to take GraphQLNamedType too (which is how the actual function is declared in Flow)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it, but looks to me like it'd work with any GraphQLType
and making the API more strict would break backward compatibility?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm? The implementation looks at the name field of its argument, making the TS type (but not the Flow type) just wrong.
GraphQLNamedType
GraphQLNamedType
introspectionTypes
should be array of GraphQLNamedType
@glasser Thanks for review 👍 @pcarrier Thanks for PR 👍 So now it's merged and will be included in |
We wouldn't complain about a backport but can certainly survive with an |
@glasser Thanks 👍 Will try to push |
Addresses #2260