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

GraphQL parsing errors could have a location #56

Open
pcarrier opened this issue Mar 8, 2022 · 1 comment
Open

GraphQL parsing errors could have a location #56

pcarrier opened this issue Mar 8, 2022 · 1 comment

Comments

@pcarrier
Copy link

pcarrier commented Mar 8, 2022

Description

When running a composition and one of the schemas does not parse successfully, a location (including ideally a reference to the schema file) could be displayed.

Repro where this is missing:

pcarrier@cat ~/repro> cupa *
--- 8< --- 8< --- demo.graphql --- 8< --- 8< ---
"Demo"
extend type Demo { id: ID! }
--- 8< --- 8< --- supergraph.yaml --- 8< --- 8< ---
subgraphs:
  demo:
    routing_url: undefined
    schema:
      file: ./demo.graphql
--- >8 --- >8 --- >8 --- >8 --- >8 ---
pcarrier@cat ~/repro> ~/.rover/bin/rover supergraph compose --config supergraph.yaml
error[E029]: Encountered 1 build error while trying to build a supergraph.

Caused by:
    Encountered 1 build error while trying to build the supergraph.
    UNKNOWN: Syntax Error: Unexpected Name "extend".

        The subgraph schemas you provided are incompatible with each other. See https://www.apollographql.com/docs/federation/errors/ for more information on resolving build errors.
@EverlastingBugstopper EverlastingBugstopper transferred this issue from apollographql/rover Mar 8, 2022
@EverlastingBugstopper
Copy link
Contributor

this would be great to have! this would require changes to apollo_federation_types::build::BuildError and the JS interop code.

dingxiangfei2009 pushed a commit to dingxiangfei2009/federation-rs that referenced this issue Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants