apollo-rs
apollo-rs copied to clipboard
Names must not start with two underscores `__`
Description
The Specification declares the following:
# Reserved Names
Any Name within a GraphQL type system must not start with two underscores "__"
unless it is part of the introspection system as defined by this specification.
Currently, this is not satisfied by [email protected]
and has been forgotten in PR #713
Steps to reproduce
Validate the following schema which has some of such invalid names defined:
type Query {
__field(__arg: __MyScalar!): __MyType!
}
type __MyType {}
interface __MyInterface {}
scalar __MyScalar
enum __MyEnum {
__EnumValue
}
union __MyUnion = __MyType | __Schema
input __MyInput {
__field: __MyScalar!
}
Here a code sample.
Expected result
The validation should fail and have some respective diagnostics.
Actual result
The validation succeeds.
Environment
- Operating system and version: Ubuntu 20.04.6 LTS
- Shell (bash/zsh/powershell): zsh
-
apollo-rs
crate: apollo-compiler - Crate version: 1.0.0-beta.6