{"id":13598815,"url":"https://github.com/notadd/notadd-cli","last_synced_at":"2025-07-25T15:32:26.174Z","repository":{"id":33222407,"uuid":"211228191","full_name":"notadd/notadd-cli","owner":"notadd","description":"a simple tool to generate graphql for @nestjs/graphql","archived":false,"fork":false,"pushed_at":"2024-10-16T06:50:50.000Z","size":480,"stargazers_count":6,"open_issues_count":48,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-06T23:40:42.307Z","etag":null,"topics":["cli","graphql","grpc","nest","nestcli","nestjs","nodejs","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/notadd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-27T03:24:53.000Z","updated_at":"2020-05-15T23:48:02.000Z","dependencies_parsed_at":"2023-12-19T18:58:53.350Z","dependency_job_id":"55bfc9d7-7167-4d25-b2ea-5fa1a7d80783","html_url":"https://github.com/notadd/notadd-cli","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notadd%2Fnotadd-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notadd%2Fnotadd-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notadd%2Fnotadd-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notadd%2Fnotadd-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/notadd","download_url":"https://codeload.github.com/notadd/notadd-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227590917,"owners_count":17790556,"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":["cli","graphql","grpc","nest","nestcli","nestjs","nodejs","typescript"],"created_at":"2024-08-01T17:00:57.059Z","updated_at":"2024-12-01T16:20:51.715Z","avatar_url":"https://github.com/notadd.png","language":"TypeScript","funding_links":[],"categories":["资源"],"sub_categories":["集成"],"readme":"[English](README_EN.md) | 简体中文\n\u003e 支持nestjs/nger\n\n## 功能特点\n\n- 纯 Typescript 生成，无需维护 graphql 文件\n- 无依赖\n\n## TODO\n\n- [ ] 支持同时生成 proto 文件（grpc 用）    \n- [x] 支持 webapck 打包发布\n\n## @notadd/cli\n\u003e 一个轻量级的生成.graphql文件的工具\n\n##### 安装\n\n```sh\nnpm i -g @notadd/cli\n```\n\n##### build nodejs project\n生产模式\n```\nnotadd build --prod\n```\n开发模式\n```\nnotadd build --dev\n```\n\n##### use\n\n```ts\nnotadd graphql \n    -i main.ts // input file default `main.ts`\n    -o notadd.graphql // output file default `notadd.graphql`\n```\n\n##### demo.ts and run `notadd graphql`\n\n```ts\nimport { Resolver, Query } from \"@nestjs/graphql\";\nexport interface List\u003cT\u003e {\n    data: T[];\n    currentPage: number;\n    pageSize: number;\n    total: number;\n}\nexport interface User {\n    username: string;\n}\nexport interface Article {\n    title: string;\n}\n@Resolver()\nexport class DemoResolver {\n    @Query()\n    getUser(): List\u003cUser\u003e {\n        return {} as any;\n    }\n    @Query()\n    getArticles(): List\u003cArticle\u003e {\n        return {} as any;\n    }\n}\n```\n\n```graphql\ntype User {\n  username: String!\n}\n\ntype UserList {\n  data: [User]!\n  currentPage: Int!\n  pageSize: Int!\n  total: Int!\n}\n\ntype Article {\n  title: String!\n}\n\ntype ArticleList {\n  data: [Article]!\n  currentPage: Int!\n  pageSize: Int!\n  total: Int!\n}\n\ntype Query {\n  getUser: UserList!\n  getArticles: ArticleList!\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotadd%2Fnotadd-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnotadd%2Fnotadd-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotadd%2Fnotadd-cli/lists"}