graphile / graphile/graphile-engine
Highlight mistakes when using makeExtendSchemaPlugin
- Dominant language
- JavaScript
- Stars
- 764
- Forks
- 128
- PR merge metrics
- No merged PRs in 30d
Description
### Feature description
Make it more obvious to users of makeExtendSchemaPlugin when they've done something wrong; for example referencing a type that doesn't exist, or using the wrong keyword.
### Motivating example
Currently you can write code such as:
```graphql
extend type DeleteProductionRunInput {
force: BOOLEAN
}
```
Or
```graphql
extend type ThisTypeDoesNotExist {
foo: String
}
```
and PostGraphile will process it, queue it up to extend that type _when it's defined_ and thus never actually do anything since the type never is built in the first place. This is due to the way that PostGraphile's hooks work. We should also register a `finalize` hook that checks that all the rules that were added had at least one match - if not, we should warn aboout that rule.
Contributor guide
Assessment
This issue has not been assessed yet.