How to use gatsby-graphiql-explorer - 1 common examples

To help you get started, we’ve selected a few gatsby-graphiql-explorer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gatsbyjs / gatsby / packages / gatsby / src / commands / develop.ts View on Github external
/**
   * Pattern matching all endpoints with graphql or graphiql with 1 or more leading underscores
   */
  const graphqlEndpoint = `/_+graphi?ql`

  if (process.env.GATSBY_GRAPHQL_IDE === `playground`) {
    app.get(
      graphqlEndpoint,
      graphqlPlayground({
        endpoint: `/___graphql`,
      }),
      () => {}
    )
  } else {
    graphiqlExplorer(app, {
      graphqlEndpoint,
    })
  }

  app.use(
    graphqlEndpoint,
    graphqlHTTP(() => {
      const { schema, schemaCustomization } = store.getState()

      return {
        schema,
        graphiql: false,
        context: withResolverContext({
          schema,
          schemaComposer: schemaCustomization.composer,
          context: {},

gatsby-graphiql-explorer

GraphiQL IDE with custom features for Gatsby users

MIT
Latest version published 2 days ago

Package Health Score

98 / 100
Full package analysis

Popular gatsby-graphiql-explorer functions