{"id":16582687,"url":"https://github.com/nodejh/egg-plugin-graphql","last_synced_at":"2025-03-21T12:33:04.809Z","repository":{"id":35162765,"uuid":"214608047","full_name":"nodejh/egg-plugin-graphql","owner":"nodejh","description":"egg graphql plugin","archived":false,"fork":false,"pushed_at":"2022-04-12T23:26:42.000Z","size":751,"stargazers_count":10,"open_issues_count":28,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-26T22:03:43.317Z","etag":null,"topics":["egg-graphql","egg-plugin","graphql"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nodejh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-12T08:20:08.000Z","updated_at":"2021-07-30T04:07:17.000Z","dependencies_parsed_at":"2022-07-24T18:17:44.352Z","dependency_job_id":null,"html_url":"https://github.com/nodejh/egg-plugin-graphql","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodejh%2Fegg-plugin-graphql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodejh%2Fegg-plugin-graphql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodejh%2Fegg-plugin-graphql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodejh%2Fegg-plugin-graphql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nodejh","download_url":"https://codeload.github.com/nodejh/egg-plugin-graphql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244799581,"owners_count":20512279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["egg-graphql","egg-plugin","graphql"],"created_at":"2024-10-11T22:33:45.211Z","updated_at":"2025-03-21T12:33:04.375Z","avatar_url":"https://github.com/nodejh.png","language":"JavaScript","readme":"# egg-plugin-graphql\n\n[![NPM version][npm-image]][npm-url]\n[![build status][travis-image]][travis-url]\n[![Test coverage][codecov-image]][codecov-url]\n[![David deps][david-image]][david-url]\n[![Known Vulnerabilities][snyk-image]][snyk-url]\n[![npm download][download-image]][download-url]\n\n[npm-image]: https://img.shields.io/npm/v/egg-plugin-graphql.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/egg-plugin-graphql\n[travis-image]: https://img.shields.io/travis/nodejh/egg-plugin-graphql.svg?style=flat-square\n[travis-url]: https://travis-ci.org/nodejh/egg-plugin-graphql\n[codecov-image]: https://img.shields.io/codecov/c/github/nodejh/egg-plugin-graphql.svg?style=flat-square\n[codecov-url]: https://codecov.io/github/nodejh/egg-plugin-graphql?branch=master\n[david-image]: https://img.shields.io/david/nodejh/egg-plugin-graphql.svg?style=flat-square\n[david-url]: https://david-dm.org/nodejh/egg-plugin-graphql\n[snyk-image]: https://snyk.io/test/npm/egg-plugin-graphql/badge.svg?style=flat-square\n[snyk-url]: https://snyk.io/test/npm/egg-plugin-graphql\n[download-image]: https://img.shields.io/npm/dm/egg-plugin-graphql.svg?style=flat-square\n[download-url]: https://npmjs.org/package/egg-plugin-graphql\n\n\nEgg GraphQL 插件。\n\n\n## 使用方法\n\n### 安装\n\n```bash\n$ npm i egg-plugin-graphql --save\n```\n\n\n### 开启插件\n\n```js\n// config/plugin.js\nexports.graphql = {\n  enable: true,\n  package: 'egg-plugin-graphql',\n};\n```\n\n### 配置\n\n\n```js\n// config.default.js\n\n// 配置 graphql\nexports.graphql = {\n  router: '/graphql',\n  // 是否创建默认的空 schema\n  defaultEmptySchema: false,\n  // 是否加载开发者工具 (playground), 默认开启, 路由同 router 字段, 使用浏览器打开该可见\n  playground: true,\n};\n\n// 使用 graphql 插件，拦截请求\nexports.middleware = [ 'graphql' ];\n```\n\n\n## Example\n\n- [example/simple](example/simple/) 一个简单的例子\n- [example/modular-schema](example/modular-schema/) 模块化 schema\n\n## GraphQL 实践系列文章\n\n- [GraphQL 实践(一): GraphQL 简介](https://github.com/nodejh/nodejh.github.io/issues/51)\n\n## 提问交流\n\n请到 [issues](https://github.com/nodejh/egg-plugin-graphql/issues) 异步交流。\n\n## License\n\n[MIT](LICENSE)\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodejh%2Fegg-plugin-graphql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnodejh%2Fegg-plugin-graphql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodejh%2Fegg-plugin-graphql/lists"}