This module is not yet compatible with Nuxt 3
Head over to v2.nuxt.com

@pin-pon/nuxt-graphql-playground

@pin-pon/nuxt-graphql-playground

A Nuxt.js module that injects a server route to serve the GraphQL Playground

Setup

  1. Add @pin-pon/nuxt-graphql-playground dependency to your project
yarn add @pin-pon/nuxt-graphql-playground # or npm install @pin-pon/nuxt-graphql-playground
  1. Add @pin-pon/nuxt-graphql-playground to the modules section of nuxt.config.js
export default {
  modules: [
    // Simple usage
    '@pin-pon/nuxt-graphql-playground',

    // With options
    ['@pin-pon/nuxt-graphql-playground', { /* module options */ }]
  ]
}

Using top level options

export default {
  modules: [
    '@pin-pon/nuxt-graphql-playground'
  ],
  gqlPlayground: {
    /* module options */
  }
}

Options

endpoint

The GraphQL server endpoint (can be absolute)

  • Type: String
  • Default: /api/graphql

route

The path where the playground should be server

  • Type: String
  • Default: /api/playground

License

MIT License

Copyright (c) - Pin Pon SAS