graphql-mesh icon indicating copy to clipboard operation
graphql-mesh copied to clipboard

Failing to fetch from Fastly

Open avale-ne opened this issue 10 months ago • 4 comments

Issue workflow progress

Progress of the issue based on the Contributor Workflow


Describe the bug

The GraphQL handler is failing to fetch from Amplience GraphQL, which seems to be hosted on Fastly. Fastly is responding with a 400 Bad request.

It seems related to the "Host" request header.

avale-ne avatar Sep 01 '23 23:09 avale-ne

Is it possible for you to create a reproduction?

ardatan avatar Sep 01 '23 23:09 ardatan

Difficult because I can not disclose the origin server. I was able to narrow down the problem to the Host header, using Postman.

The yaml file is pretty much out of the box, just the endpoint. No authorization needed.

avale-ne avatar Sep 02 '23 00:09 avale-ne

I was able to make introspection work by using the source property pointing to a dump of the Amplience Schema. The runtime ( operations ) won't work though ( same 400 bad request ).

avale-ne avatar Sep 02 '23 00:09 avale-ne

Is the problem the Host header we send or something else? If us, you can pass a custom Host header by using schemaHeaders.

ardatan avatar Sep 02 '23 00:09 ardatan