Validation rules: mismatch between graphql-js and spec
- Dominant language
- TypeScript
- Stars
- 20.3k
- Forks
- 2.1k
- Avg merge
- 44m
- Merged PRs (30d)
- 6
Description
Context #3282 by @spawnia
It looks like we have the following mismatch between spec and graphql-js.
For example, type names are checked using this rule:
https://github.com/graphql/graphql-js/blob/main/src/validation/rules/KnownTypeNamesRule.ts
But in spec, there is only a rule for [checking type names on fragments](https://spec.graphql.org/draft/#sec-Fragment-Spread-Type-Existence) and I couldn't find any rule for checking types on variable fragments.
Also, we have a significant mismatch in names and descriptions of rules.
So at some point, we need to do an audit of both spec and graphql-js to fix as many discrepancies as we can.
We need to focus on query validation first and handle SDL validation separately since it's not well documented in the spec.
Contributor guide
Assessment
This issue has not been assessed yet.