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

Improve GQL query error handling #1214

Merged
merged 2 commits into from Jun 20, 2017
Merged

Improve GQL query error handling #1214

merged 2 commits into from Jun 20, 2017

Conversation

0x80
Copy link
Contributor

@0x80 0x80 commented Jun 20, 2017

No description provided.

@KyleAMathews
Copy link
Contributor

KyleAMathews commented Jun 20, 2017

Deploy preview failed.

Built with commit 21b01b8

https://app.netlify.com/sites/using-contentful/deploys/5948cd6f6f4c500686d3d04f

@gatsbybot
Copy link
Collaborator

gatsbybot commented Jun 20, 2017

Deploy preview ready!

Built with commit 21b01b8

https://deploy-preview-1214--using-drupal.netlify.com

@gatsbybot
Copy link
Collaborator

gatsbybot commented Jun 20, 2017

Deploy preview ready!

Built with commit 21b01b8

https://deploy-preview-1214--gatsbygram.netlify.com

@gatsbybot
Copy link
Collaborator

gatsbybot commented Jun 20, 2017

Deploy preview ready!

Built with commit 21b01b8

https://deploy-preview-1214--gatsbyjs.netlify.com

@KyleAMathews
Copy link
Contributor

What does an error message look like with this PR?

@0x80
Copy link
Contributor Author

0x80 commented Jun 20, 2017

Instead of only an unhandled rejection error pointing to getGraphQLTag you'll see something like this

ERROR in ./src/pages/index.js
Module build failed: Error: /Users/me/project/src/pages/index.js: BabelPluginGraphQL: GraphQL syntax error in query:

query IndexPage {
  site {
    siteMetadata {
      title
      description
    }
  }
  allWorkJson() {
    edges {
      node {
        title
        slug
        type
        summary
      }
    }
  }
}


message:

Syntax Error GraphQL (8:15) Expected Name, found )

@KyleAMathews
Copy link
Contributor

Looks great, thanks!

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

Successfully merging this pull request may close these issues.

None yet

3 participants