Skip to content
New issue

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

Serverless - Syntax error in module 'graphql': SyntaxError #1532

Closed
rodrigooler opened this issue Aug 15, 2018 · 5 comments
Closed

Serverless - Syntax error in module 'graphql': SyntaxError #1532

rodrigooler opened this issue Aug 15, 2018 · 5 comments

Comments

@rodrigooler
Copy link

I am currently creating a test project to test serverless with apollo-server, while running the command to run serverless-offline the project works standard, but when I perform serverless deploy I am not getting access to the playground ... I am getting the error below when running serverless log on function playground.

I am using version 2.

service: test
app: test
tenant: test

plugins:
  - serverless-offline
provider:
  name: aws
  runtime: nodejs6.10
functions:
  graphql:
    handler: graphql.graphqlHandler
    events:
    - http:
        path: graphql
        method: post
        cors: true
  playground:
    handler: graphql.graphqlHandler
    events:
    - http:
        path: playground
        method: get
        cors: true

captura de tela 2018-08-15 as 02 29 03

@webchi
Copy link

webchi commented Aug 15, 2018

As documentation sad - "Apollo Server enables GraphQL Playground on the same URL as the GraphQL"
So no need additional playground function, I think...

@rodrigooler
Copy link
Author

@webchi I'll take a look to see if there is a co relation with the above error, but thanks peal hint really was not able to set up the playground in the same function

@webchi
Copy link

webchi commented Aug 15, 2018

I have working playground on /graphql path with serverless-offline. But on aws its also dont work because "error": "Response not successful: Received status code 403"

@rodrigooler
Copy link
Author

Solved and thank you @webchi

@coreyferguson
Copy link

What was the solution here? I'm getting the same error.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants