# @keystone-alpha/app-graphql

> KeystoneJS GraphQL App.

Latest version **8.2.1** (published 2019-10-23) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @keystone-alpha/app-graphql
pnpm add @keystone-alpha/app-graphql
yarn add @keystone-alpha/app-graphql
bun add @keystone-alpha/app-graphql
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 8.2.1 |
| Published | 2019-10-23 |
| First published | 2019-05-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8.4.0 |
| Dependencies | 12 |
| Unpacked size | 26.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | The KeystoneJS Development Team |
| Maintainers | dominikwilkowski, jedwatson, jesstelford, mitchellhamilton, molomby, timl |

## Links

- npm: https://www.npmjs.com/package/@keystone-alpha/app-graphql
- npm.io page: https://npm.io/package/@keystone-alpha/app-graphql

## Dependencies (12)

- [cuid](https://npm.io/package/cuid.md) ^2.1.6
- [graphql](https://npm.io/package/graphql.md) ^14.4.2
- [nanoassert](https://npm.io/package/nanoassert.md) ^2.0.0
- [stack-utils](https://npm.io/package/stack-utils.md) ^1.0.2
- [ensure-error](https://npm.io/package/ensure-error.md) ^1.0.0
- [apollo-errors](https://npm.io/package/apollo-errors.md) ^1.9.0
- [serialize-error](https://npm.io/package/serialize-error.md) ^3.0.0
- [@keystone-alpha/utils](https://npm.io/package/@keystone-alpha/utils.md) ^3.0.2
- [apollo-server-express](https://npm.io/package/apollo-server-express.md) ^2.9.1
- [@keystone-alpha/logger](https://npm.io/package/@keystone-alpha/logger.md) ^2.0.1
- [@keystone-alpha/session](https://npm.io/package/@keystone-alpha/session.md) ^3.0.2
- [@keystone-alpha/app-graphql-playground](https://npm.io/package/@keystone-alpha/app-graphql-playground.md) ^1.0.1

## Recent versions

- 8.2.1 (latest) — 2019-10-23
- 8.2.0 — 2019-10-09
- 8.1.1 — 2019-09-27
- 8.1.0 — 2019-09-19
- 8.0.0 — 2019-09-12
- 7.0.0 — 2019-09-02
- 6.3.1 — 2019-07-19
- 6.3.0 — 2019-07-05
- 6.2.0 — 2019-06-25
- 6.1.0 — 2019-06-14
- 6.0.0 — 2019-05-21

## README

<!--[meta]
section: api
subSection: apps
title: GraphQL API
draft: true
[meta]-->

# GraphQL App

A KeystoneJS App that creates a GraphQL API and Apollo GraphQL playground.

For information about writing queries and mutations for KeystoneJS see the [Introduction to KeystoneJS' GraphQL API](https://keystonejs.com/guides/intro-to-graphql).

## Usage

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

module.exports = {
  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 Apollo GraphQL playground path        |
| `schemaName`   | `String` | `admin`           | Change the graphQL schema name (not recommended) |
| `apollo`       | `Object` | `{}`              | Options passed directly to Apollo Server         |

---
_Source: https://npm.io/package/@keystone-alpha/app-graphql · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
