TylerBarnes / using-gatsby-source-wordpress-experimental

A starter for the upcoming gatsby-source-wordpress@v4
https://www.npmjs.com/package/gatsby-source-wordpress-experimental
MIT License
86 stars 29 forks source link

bug: Bad error message on http #5

Closed moonmeister closed 4 years ago

moonmeister commented 4 years ago

I was getting

 ERROR 

 gatsby-source-wordpress  GraphQL Request must include at least one of those two parameters: "query" or "queryId" (request)

 If you haven't already, try adding define( 'GRAPHQL_DEBUG', true ); to your wp-config.php for more detailed error messages.

 ERROR 

 gatsby-source-wordpress  Encountered errors. See above for details.

not finished createSchemaCustomization - 1.796s
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I couldn't figure out the issue till I noticed the URL I'd specified was http. Changing it to https resolved the issue.

TylerBarnes commented 4 years ago

@moonmeister I believe I fixed this a few weeks ago but it's hard to tell without being able to reproduce. I think the problem was that some types of redirects are happening in browser from http to https. Since I can't follow in browser redirects it was just returning the html of the 404 or error page. I'm now providing a more useful error message when that happens. Let me know if you run into this again!