graphdoc icon indicating copy to clipboard operation
graphdoc copied to clipboard

Syntax Error GraphQL (740:50) Unexpected character "&".

Open garfieldmoore opened this issue 5 years ago • 1 comments

While using graphdoc I get the above error when processing a schema.

The issue seems to be the use of multiple interfaces on a type. For example;

type MyObject implements MyInterface & MySecondInterface {
...
}

we are using the following project to create our API;

https://github.com/graphql-dotnet/graphql-dotnet

garfieldmoore avatar Oct 23 '20 10:10 garfieldmoore

Ran into this as well. Turns out that for one reason or another, this library uses v0.7.2 of its graphql package dependency (before implementing multiple interfaces was even in the spec) instead of the version ^15.4.0 listed in its package.json.

Adding this to my package.json fixed it for me:

"resolutions": {
  "graphql": "^15.5.3" // or whatever version of graphql you use
}

kai-tock avatar Sep 08 '21 01:09 kai-tock