Skip to content

Unused type definitions are not visible in introspection queries #420

Closed
@code-wok

Description

@code-wok

If we define a type that is unused in the schema file e.g

type User {
    ...
}

type Context {
    ...
}

type Query {
    user(id: ID!): User
}
  • The Query and User types are returned from introspection queries but not Context. Is this by design?
  • If it is by design, is there a way for the type to appear in introspection queries? I can see they appear in SchemaParser.getUnusedDefinitions() but is there a way to wire that in so that they are visible in introspection queries?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions