Functions deployed via 'serverless deploy -v' as example of 'serverless.yml'
Event HTTP Post work greats.
However, when reaching URL via GET, playground says: 'Response not successful: Received status code 403'
Yes, I'm having exactly the same issue.
You can download the standalone playground though and that works fine when given the URL
Thought I might comment as I'm having a similar issue that I think likely to be related : Once I fix the URL inside the playground address bar, I can access the playground and run queries, but opening the schema doesn't work.
This appeared in v1.8.3 and based on the console traces, it seems that graphql playground always try to reach the "wrong" URL (the one without production/staging at the end) even when I manually change it in the playground URI, which leads to the 403 error over and over again.
I can too use a local playground to circumvent the issue as robmurtagh mentionned.
Hope it helps !
I have the same issue using serverless and "graphql-yoga": "^1.13.1"
I had the following issue which might be related
When I set the endpoint in https://www.graphqlbin.com, I get an error like
[field X-Apollo-Tracing is not allowed by Access-Control-Allow-Headers in preflight response.]
That was fixed by changing the serverless.yml to include the CORS customized config like this for each function under the events
- http:
path: /
method: post
cors:
origin: '*' # <-- Specify allowed origin
headers: # <-- Specify allowed headers
- Content-Type
- X-Amz-Date
- Authorization
- X-Api-Key
- X-Amz-Security-Token
- X-Amz-User-Agent
- X-Apollo-Tracing
allowCredentials: false
by the way, my handlers in handler.js look like this based on (this)
module.exports.server = (event, ctx, callback) => {
(new GraphQLServerLambda({
typeDefs: typeDefs,
resolvers: resolvers,
context: ctx => ({ ...ctx})
})).graphqlHandler(event, ctx, callback)
}
Regards
I've just experienced the same issue, here was my thread from the slack channel for context:
I鈥檝e got my GraphQL API (running sample endpoints) running here: https://f3zq9i61e0.execute-api.eu-west-1.amazonaws.com/staging/
If you load that URL you get GraphQL Playground.
But, it fails. It seems as though it鈥檚 attempting to send an introspection query to https://f3zq9i61e0.execute-api.eu-west-1.amazonaws.com/ rather than https://f3zq9i61e0.execute-api.eu-west-1.amazonaws.com/staging/
Is that a bug? Or a config error on my part?
(If I open the desktop version and paste the URL in, it works fine)
So in short, the introspection query is being sent to the "root" URL rather than the correct endpoint.
@Siyfion, @nsignes, @RoryKelly, @robmurtagh, would you be able to share a repository or, alternatively, your code for instantiating GraphQLServerLambda?
@medelman17 I fixed this already, no need to look into it anymore. I'm releasing the fix today or tomorrow. (Have to do some cleanup in the playground before)
This has been fixed in 1.14.3 馃檪
Most helpful comment
This has been fixed in
1.14.3馃檪