graphql-api-koa v9.1.3
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 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
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:
compilerOptions.allowJsshould betrue.compilerOptions.maxNodeModuleJsDepthshould be reasonably large, e.g.10.compilerOptions.moduleshould be"node16"or"nodenext".
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:
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago