We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have found this issue, related to mine, but I could not found a solution to my problem.
#1560
serverless.yml:
serverless.yml
service: graphql-aws provider: name: aws runtime: nodejs8.10 functions: graphql: handler: graphql.graphqlHandler environment: SLS_DEBUG: true events: - http: path: graphql method: post cors: true integration: lambda-proxy - http: path: graphql method: get cors: true integration: lambda-proxy
graphql.js:
graphql.js
const { ApolloServer, gql } = require('apollo-server-lambda') const typeDefs = gql` type Query { hello: String } ` const resolvers = { Query: { hello: () => 'Hello world!', }, } const server = new ApolloServer({ typeDefs, resolvers }) exports.graphqlHandler = server.createHandler({ cors: { origin: '*', credentials: true, }, })
Test:
serverless invoke local --function graphql --data '{ "httpMethod": "POST", "body": { "query": "{ hello }" }}'
Error:
Cannot read property 'Access-Control-Request-Headers' of undefined
Can someone help me solving this?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have found this issue, related to mine, but I could not found a solution to my problem.
#1560
serverless.yml
:graphql.js
:Test:
serverless invoke local --function graphql --data '{ "httpMethod": "POST", "body": { "query": "{ hello }" }}'
Error:
Cannot read property 'Access-Control-Request-Headers' of undefined
Can someone help me solving this?
The text was updated successfully, but these errors were encountered: