Skip to content
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

Correctly detect unused object types when using custom schema roots #312

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cjoudrey
Copy link
Owner

Inspired by prior work done in #266.

This pull request modifies the DefinedTypesAreUsed rule to report unused types named Query, Mutation, and Subscription when the schema is configured to use different root object types.

For example, the following schema would report an error:

# Query is unused and will be reported as so.
type Query {
  a: String
}

type QueryRoot {
  a: String
}

schema {
  query: QueryRoot
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant