apollographql / apollographql/federation

Improve DX when encountering a syntax error within `composeAndValidate` on `@provides`/`@key`/`@requires`

Open
#679 4 comments 0 reactions 0 assignees View on GitHub
:hugs: improvement component/composition motivation/ergonomics status/ready
Dominant language
TypeScript
Stars
725
Forks
276
Avg merge
1h 47m
Merged PRs (30d)
1

Description

`composeAndValidate()` unexpectedly throws in `@apollo/federation@0.23.0` with the error `Syntax Error: Expected Name, found ":".`, for subgraph schemas that are valid GraphQL (running `graphql@15.5.0`). Reproduction in this [Slack message](https://apollograph.slack.com/archives/C01JTQYPRQ9/p1619051804490000).

Contributor guide

Open the contributing guide

Research direction

Start at composeAndValidate() in @apollo/federation@0.23.0 and reproduce the Slack-linked case with graphql@15.5.0 using valid schemas containing @provides, @key, or @requires. Trace why the schema reaches the "Expected Name, found ':'" error path; done means valid subgraph schemas no longer throw this syntax error.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
api, backend-api-design
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.