Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Jun 6, 2024

Conversation

goto-bus-stop
Copy link
Member

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.

Given:

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

and a selection against `A`:
```graphql
{ 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.
@goto-bus-stop goto-bus-stop merged commit 916b28c into main Jun 6, 2024
12 checks passed
@goto-bus-stop goto-bus-stop deleted the renee/fix-missing-subselection-coordinate branch June 6, 2024 11:40
SimonSapin added a commit to apollographql/router that referenced this pull request Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants