Package Exports
- graphql-api-koa/errorHandler.mjs
- graphql-api-koa/execute.mjs
- graphql-api-koa/package.json
Readme
graphql-api-koa
GraphQL execution and error handling middleware written from scratch for Koa.
Installation
To install graphql-api-koa and the graphql peer dependency with npm, run:
npm install graphql-api-koa graphqlSetup the Koa middleware in this order:
errorHandler, to catch errors from following middleware for a correctly formatted GraphQL response.- A GraphQL multipart request processor like
graphqlUploadKoafromgraphql-upload, to support file uploads (optional). - A request body parser like
koa-bodyparser. execute, to execute GraphQL.
See the execute middleware examples to get started.
Requirements
- Node.js:
^14.17.0 || ^16.0.0 || >= 18.0.0
Exports
These ECMAScript modules are published to npm and exported via the package.json exports field: