Closed Geal closed 1 month ago
In a typical schema, non-root types don’t have a __schema
field so converting AST to an ExecutableDocument
would fail with a BuildError::UndefinedField
. In code, meta-fields like __schema
are not present in the Rust struct ObjecType.fields
but are returned if you instead call schema.type_field(type_name, field_name)
.
Defining a schema like type Something { __schema: Int }
is disallowed per spec but we don’t yet implement that validation rule: https://github.com/apollographql/apollo-rs/issues/743
Closing as duplicate of https://github.com/apollographql/apollo-rs/issues/743
According to @IvanGoncharov ,
__schema
should not be used outside of the root type: https://github.com/apollographql/router/pull/5255#discussion_r1699109946Do we check this somewhere?