handler icon indicating copy to clipboard operation
handler copied to clipboard

Schema introspection failure with Apollo Fetch API

Open kaskelotti opened this issue 6 years ago • 0 comments

I'm working with Apollo Node application that merges schemas from multiple remote GraphQL API. One of the remotes uses graphql-go and graphql-go/handler. There is an issue with schema introspection when using Link API of Apollo resulting to graphql-go to not accept the request.

The response to introspection query is

{"0":{"message":"Must provide an operation.","locations":[]}}

The graphql-go/handler documentation says that the operation name is mandatory when the query contains multiple operations. AFAIK, the introspection only has one operation.

When using Apollo Fetcher API, the introspection seems works. Cannot 100% verify at the moment, since I need to run some more tests.

Based on what I've read from the Apollo documentation and viewed their source code, the introspection should be very similar with both. Even in the source code the Apollo Link is converted to Apollo Fetch.

Of course I cannot be certain that the bug is on Go side of the GraphQL, but I'm assuming so, since the other remote service that publish GraphQL APIs work with both Link/Fetcher. The other services use Apollo server.

Go Handler version used is 0.2.1

The documentation for the above mentioned Apollo APIs

kaskelotti avatar Nov 24 '18 18:11 kaskelotti