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
}
Inspired by prior work done in https://github.com/cjoudrey/graphql-schema-linter/pull/266.
This pull request modifies the
DefinedTypesAreUsed
rule to report unused types namedQuery
,Mutation
, andSubscription
when the schema is configured to use different root object types.For example, the following schema would report an error: