1.0.1 • Published 5 years ago

@keystone-alpha/app-graphql-playground v1.0.1

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

GraphQL Playground App

A KeystoneJS App that creates an Apollo GraphQL playground.

Usage

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

// Ensure that the GraphQLApp and GraphQLAppPlayground are referring to the same endpoint
const apiPath = '/admin/api';
module.exports = {
  new Keystone(),
  apps: [
    // This should come before the GraphQLApp, as it sets up the dev query middleware
    new GraphQLAppPlayground({ 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