Skip to content

introspectionTypes/isIntrospectionType TypeScript types could be more specific #2260

Closed
@glasser

Description

@glasser

In introspection.js, introspectionTypes doesn't have an explicitly given type (I don't know Flow well enough to understand what is inferred), and isIntrospectionType takes a GraphQLNamedType as an argument.

In the TypeScript introspection.d.ts, introspectionTypes is given as ReadonlyArray<GraphQLType> and isIntrospectionType takes a GraphQLType as an argument.

I think it would make sense to change the TypeScript types to ReadonlyArray<GraphQLNamedType> and an argument of GraphQLNamedType respectively. (We have a project that uses introspectionTypes and expects them all to have names.)

I can send a PR if you agree!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions