Skip to content

Repository files navigation

egg-plugin-graphql

NPM versionbuild statusTest coverageDavid depsKnown Vulnerabilitiesnpm download

Egg GraphQL 插件。

使用方法

安装

$ npm i egg-plugin-graphql --save

开启插件

// config/plugin.jsexports.graphql={enable: true,package: 'egg-plugin-graphql',};

配置

// config.default.js// 配置 graphqlexports.graphql={router: '/graphql',// 是否创建默认的空 schemadefaultEmptySchema: false,// 是否加载开发者工具 (playground), 默认开启, 路由同 router 字段, 使用浏览器打开该可见playground: true,};// 使用 graphql 插件,拦截请求exports.middleware=['graphql'];

Example

GraphQL 实践系列文章

提问交流

请到 issues 异步交流。

License

MIT

About

egg graphql plugin

Topics

Resources

Stars

10 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages