There have been quite a few questions about configuring cors with graphql-yoga, especially when using GraphQLServerLambda (example with more context).
Does the following work?
const options = {
cors: {
'origin': ['http://localhost:8080/'],
'methods': ['GET', 'HEAD', 'POST'],
'preflightContinue': false,
'optionsSuccessStatus': 200
}
}
lambda = new GraphQLServerLambda({
options,
schema,
})
exports.server = lambda.graphqlHandler
If so, this should be properly documented.
If not, this should be added as a feature.
This is what's currently preventing me from deploying to Lambda. 馃憤
If you are using typescript, you will see that there is no cors option.
Due to inactivity of this issue we have marked it stale. It will be closed if no further activity occurs.
Hey :wave:, It seems like this issue has been inactive for some time. In need for maintaining clear overview of the issues concerning the latest version of graphql-yoga we'll close it.
Feel free to reopen it at any time if you believe we should futher discuss its content. :slightly_smiling_face:
Due to inactivity of this issue we have marked it stale. It will be closed if no further activity occurs.
nono mr stale pls don't I think this is important!
Due to inactivity of this issue we have marked it stale. It will be closed if no further activity occurs.
Hey :wave:, It seems like this issue has been inactive for some time. In need for maintaining clear overview of the issues concerning the latest version of graphql-yoga we'll close it.
Feel free to reopen it at any time if you believe we should futher discuss its content. :slightly_smiling_face: