9.1.3 • Published 2 years ago

graphql-api-koa v9.1.3

Weekly downloads
577
License
MIT
Repository
github
Last release
2 years ago

graphql-api-koa logo

graphql-api-koa

GraphQL execution and error handling middleware written from scratch for Koa.

Installation

To install graphql-api-koa and its graphql peer dependency with npm, run:

npm install graphql-api-koa graphql

Setup the Koa middleware in this order:

  1. errorHandler, to catch errors from following middleware for a correctly formatted GraphQL response.
  2. A GraphQL multipart request processor like graphqlUploadKoa from graphql-upload, to support file uploads (optional).
  3. A request body parser like koa-bodyparser.
  4. execute, to execute GraphQL.

See the execute middleware examples to get started.

Requirements

Supported runtime environments:

  • Node.js versions ^14.17.0 || ^16.0.0 || >= 18.0.0.

Projects must configure TypeScript to use types from the ECMAScript modules that have a // @ts-check comment:

Exports

The npm package graphql-api-koa features optimal JavaScript module design. It doesn’t have a main index module, so use deep imports from the ECMAScript modules that are exported via the package.json field exports:

9.1.3

2 years ago

9.1.2

2 years ago

9.1.1

2 years ago

9.1.0

2 years ago

9.0.0

2 years ago

8.0.0

3 years ago

7.0.0

3 years ago

6.0.0

4 years ago

5.1.0

4 years ago

5.0.0

4 years ago

4.1.2

4 years ago

4.1.1

4 years ago

4.1.0

4 years ago

4.0.0

4 years ago

3.0.0

4 years ago

2.2.0

5 years ago

2.1.0

5 years ago

2.0.0

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago