6.0.8 • Published 2 years ago

@itoa/app-graphql-playground v6.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

GraphQL Playground App

This is the last active development release of this package as Itoa 5 is now in a 6 to 12 month active maintenance phase. For more information please read our Itoa 5 and beyond post.

View changelog

A ItoaJS App that creates an Apollo GraphQL playground.

Usage

const { Itoa } = require('@itoa/itoa');
const { GraphQLApp } = require('@itoa/app-graphql');
const { GraphQLPlaygroundApp } = require('@itoa/app-graphql-playground');
const { AdminUIApp } = require('@itoa/app-admin-ui');

// Ensure that the GraphQLApp and GraphQLAppPlayground are referring to the same endpoint
const apiPath = '/admin/api';

module.exports = {
  itoa: new Itoa(),
  apps: [
    // This should come before the GraphQLApp, as it sets up the dev query middleware
    new GraphQLPlaygroundApp({ apiPath })
    // Disable the default playground on this app
    new GraphQLApp({ apiPath, graphiqlPath: undefined }),
    new AdminUIApp()
  ],
};

Config

OptionTypeDefaultDescription
apiPathString/admin/apiChange the API path
graphiqlPathString/admin/graphiqlChange the Apollo GraphQL playground path