Js-graphql-intellij-plugin: Question: How to use gatsbyjs generated schema?

Created on 2 Aug 2019  路  1Comment  路  Source: jimkyndemeyer/js-graphql-intellij-plugin

Hi there,

I am using the latest version of the plugin and I am trying to get the schema imported, that is built by gatsbyjs. I am using gatsby-source-wordpress and gatsby builds a schema itself by fetching through the whole api.

With gatsby develop a GraphiQl explorer is served under http://localhost:8000/___graphql but this doesn't work as endpoint.

My .graphqlconfig:

{
  "name": "Untitled GraphQL Schema",
  "schemaPath": "schema.graphql",
  "extensions": {
    "endpoints": {
      "Default GraphQL Endpoint": {
        "url": "http://localhost:8000/___graphql",
        "introspect": true
      }
    }
  }
}

It would be great if anyone could help out.

Most helpful comment

Okay, just figured it out myself, but I guess it's worth mentioning for other people who run into the same problem.

Gatsby gives the possibility to expose the served develop environment in your local network with the following command gatsby develop -H 0.0.0.0

Then you can use the /___graphql and instead of localhost, use your local network ip that is exposed by the command above.

Thanks for the great plugin.

>All comments

Okay, just figured it out myself, but I guess it's worth mentioning for other people who run into the same problem.

Gatsby gives the possibility to expose the served develop environment in your local network with the following command gatsby develop -H 0.0.0.0

Then you can use the /___graphql and instead of localhost, use your local network ip that is exposed by the command above.

Thanks for the great plugin.

Was this page helpful?
0 / 5 - 0 ratings