question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Serverless - Syntax error in module 'graphql': SyntaxError

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
rodrigoolercommented, Aug 17, 2018

Solved and thank you @webchi

0reactions
coreyfergusoncommented, Mar 14, 2019

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

GraphQL gql Syntax Error: Expected Name, found
This error occurs mostly when there are unclosed curly braces or when some fields are not properly defined while calling the query.
Read more >
serverless/serverless - Gitter
Basically I have created this Lambda function to connect to a mysql DB using the node package ... Syntax error in module 'handler':...
Read more >
Getting Graphql error while doing serverless deploy
I am using serverless appsync plugin and deploying it to my aws account by following Part 03: AWS AppSync: Resolver Mapping Templates ...
Read more >
Migrating to Apollo Server 4
Apollo Server 4 takes a different approach to integrations by providing a stable web framework integration API, which includes explicit support for serverless...
Read more >
graphqlerror: syntax error: expected name, found "!".
GraphQL gql Syntax Error: Expected Name, found } - Stack Overflow ... Jan 18, 2018 ... This error occurs mostly when there are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found