@koikorn/app-graphql

5.1.9 • Public • Published

GraphQL app

View changelog

A KeystoneJS app that creates a GraphQL API and GraphiQL playground.

Note: The GraphiQL playground is disabled in production mode.

For information about writing queries and mutations for KeystoneJS see the Introduction to KeystoneJS' GraphQL API.

Usage

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

module.exports = {
  keystone: new Keystone(),
  apps: [
    new GraphQLApp({
      // All config keys are optional. Default values are shown here for completeness.
      apiPath: '/admin/api',
      graphiqlPath: '/admin/graphiql',
      schemaName: 'admin',
      apollo: {},
    }),
    new AdminUIApp(),
  ],
};

Config

Option Type Default Description
apiPath String /admin/api Change the API path
graphiqlPath String /admin/graphiql Change the GraphiQL playground path
schemaName String admin Change the graphQL schema name (not recommended)
apollo Object {} Options passed directly to Apollo Server

Readme

Keywords

none

Package Sidebar

Install

npm i @koikorn/app-graphql

Weekly Downloads

2

Version

5.1.9

License

MIT

Unpacked Size

35 kB

Total Files

7

Last publish

Collaborators

  • lorenhaim