5.2.3 • Published 11 months ago
@keystonejs/app-graphql-playground v5.2.3
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.
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
Option | Type | Default | Description |
---|---|---|---|
apiPath | String | /admin/api | Change the API path |
graphiqlPath | String | /admin/graphiql | Change the Apollo GraphQL playground path |