apollographql / apollo-rs

Spec compliant GraphQL Tools in Rust.
Apache License 2.0
574 stars 45 forks source link

fix(compiler): fix error message for missing subselection #865

Closed goto-bus-stop closed 4 months ago

goto-bus-stop commented 4 months ago

Given:

type A { b: B }
type B { field: Int! }

and a selection against A:

{ b }

The error message said B.b must have a subselection. But B.b does not exist. We confused the return type of the field b and its parent type.

Now you correctly get an error saying that A.b must have a subselection.