5.2.3 • Published 11 months ago

@keystonejs/app-graphql-playground v5.2.3

Weekly downloads
2,804
License
MIT
Repository
github
Last release
11 months ago

GraphQL Playground App

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

View changelog

A KeystoneJS App that creates an Apollo GraphQL playground.

Usage

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

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

module.exports = {
  keystone: new Keystone(),
  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