{"id":13598848,"url":"https://github.com/adrien2p/nestjs-graphql","last_synced_at":"2025-10-02T14:31:59.632Z","repository":{"id":113647809,"uuid":"100596297","full_name":"adrien2p/nestjs-graphql","owner":"adrien2p","description":"nest-js starter which implement graphql module","archived":true,"fork":false,"pushed_at":"2018-11-20T08:17:46.000Z","size":301,"stargazers_count":107,"open_issues_count":2,"forks_count":12,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-09-23T16:06:10.767Z","etag":null,"topics":["apollo-server-express","dotenv","graphql","jsonwebtoken","jwt","nest","nest-js","node","nodejs","orm","sequelize","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/adrien2p.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-08-17T11:28:19.000Z","updated_at":"2024-12-02T16:54:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"f2192cae-b5be-4c85-b6f9-e9e3efbc6168","html_url":"https://github.com/adrien2p/nestjs-graphql","commit_stats":null,"previous_names":["adrien2p/nest-js-graphql"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/adrien2p/nestjs-graphql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrien2p%2Fnestjs-graphql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrien2p%2Fnestjs-graphql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrien2p%2Fnestjs-graphql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrien2p%2Fnestjs-graphql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adrien2p","download_url":"https://codeload.github.com/adrien2p/nestjs-graphql/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrien2p%2Fnestjs-graphql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277627160,"owners_count":25849796,"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","status":"online","status_checked_at":"2025-09-30T02:00:09.208Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["apollo-server-express","dotenv","graphql","jsonwebtoken","jwt","nest","nest-js","node","nodejs","orm","sequelize","typescript"],"created_at":"2024-08-01T17:00:57.443Z","updated_at":"2025-10-02T14:31:59.295Z","avatar_url":"https://github.com/adrien2p.png","language":"TypeScript","readme":"### [UNMAINTAINED]\n\n![Nest](assets/logo.png)\n\n### Project based on [nest-js-sequelize-jwt](https://github.com/adrien2p/nest-js-sequelize-jwt) and use\n\n- [graphql](http://graphql.org/)\n- [graphql-tools](https://github.com/apollographql/graphql-tools)\n- [graphql-type-json](https://github.com/taion/graphql-type-json)\n- [apollo-server-express](apollo-server-express)\n\n### How it works\n \n- To run lint and fix `npm run lint`\n- To run tests suite `npm run test`\n- Start the server `npm start`\n- To run up/down migration `npm run migrate {up/down}`\n\n### Configuration\n\nTo configure put all config file in the `./src/config/*`.\nTo use the env variable, remove `.demo` from `.env.demo`.\n\n### Request example\n\n#### To get users\n`POST http://localhost:3000/graphql` with the following body :\n```json\n{\n    \"query\": \"{ getUsers(filter: { search: \\\"toto\\\" }) { id, firstName, lastName, email }}\"\n}\n```\n\nWhere `getUsers` is a `Query` type which is difine in the `./modules/graphql/config/schema.ts` and implemented in `./modules/graphql/config/resolvers.ts`\n\nAnd the result of this request is :\n```json\n{\n    \"data\": {\n        \"getUsers\": [\n            {\n                \"id\": \"1\",\n                \"firstName\": \"firstName\",\n                \"lastName\": \"lastName\",\n                \"email\": \"toto@email.fr\"\n            }\n        ]\n    }\n}\n``` \n\n#### To get user with cars\n`POST http://localhost:3000/graphql` with the following body :\n```json\n{\n    \"query\": \"{ getUsers(filter: { email: \\\"toto\\\" }) { id, firstName, lastName, email, cars {id, brandName, purchaseDate }}}\"\n}\n```\n\nWhere `getUsers` is a `Query` type which is difine in the `./modules/graphql/config/schema.ts` and implemented in `./modules/graphql/config/resolvers.ts`\nand contain `cars` which is also define in `schema` and implemented in `resolver`\n\nAnd the result of this request is :\n```json\n{\n    \"data\": {\n        \"getUsers\": [\n            {\n                \"id\": \"1\",\n                \"firstName\": \"firstName\",\n                \"lastName\": \"lastName\",\n                \"email\": \"toto@email.fr\",\n                \"cars\": [\n                    {\n                        \"id\": \"1\",\n                        \"brandName\": \"tesla\",\n                        \"purchaseDate\": \"Thu Aug 17 2017 02:00:00 GMT+0200 (CEST)\"\n                    }\n                ]\n            }\n        ]\n    }\n}\n```\n\n#### To update user (is same implementation for all you want)\n`POST http://localhost:3000/graphql` with the following body :\n```json\n{\n    \"query\": \"mutation {updateUser(values:{ id:1, firstName:\\\"titi\\\" }){ id, firstName, lastName, email, cars { id, brandName, purchaseDate }}}\"\n}\n```\n\nThe `updateUser` resolver is implemented in the `Mutation` and apply in the `schema`\n\nAnd the result of this request is :\n```json\n{\n    \"data\": {\n        \"updateUser\": {\n            \"id\": \"1\",\n            \"firstName\": \"titi\",\n            \"lastName\": \"toto\",\n            \"email\": \"toto@toto.fr\",\n            \"cars\": [\n                {\n                    \"id\": \"1\",\n                    \"brandName\": \"tesla\",\n                    \"purchaseDate\": \"Thu Aug 17 2017 02:00:00 GMT+0200 (CEST)\"\n                }\n            ]\n        }\n    }\n}\n``` \n","funding_links":[],"categories":["资源"],"sub_categories":["集成"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrien2p%2Fnestjs-graphql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadrien2p%2Fnestjs-graphql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrien2p%2Fnestjs-graphql/lists"}