5.1.10 • Published 4 years ago

@keystone-next/app-graphql-playground-legacy v5.1.10

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

GraphQL Playground App

View changelog

A KeystoneJS App that creates an Apollo GraphQL playground.

Usage

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

// 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