{"id":19797533,"url":"https://github.com/davidecarvalho/node_graphql","last_synced_at":"2026-04-13T15:31:44.467Z","repository":{"id":76703606,"uuid":"111962058","full_name":"DavideCarvalho/node_graphql","owner":"DavideCarvalho","description":"Project to learn how GraphQL works","archived":false,"fork":false,"pushed_at":"2022-06-26T09:26:13.000Z","size":186,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-28T11:59:40.193Z","etag":null,"topics":["apollo-engine","consign","express","graphql","graphql-tools","jwt","mongoose","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/DavideCarvalho.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":"2017-11-24T23:15:09.000Z","updated_at":"2019-07-16T03:26:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"b92d57d9-33db-4d9d-a5d8-38d507138cdf","html_url":"https://github.com/DavideCarvalho/node_graphql","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DavideCarvalho/node_graphql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavideCarvalho%2Fnode_graphql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavideCarvalho%2Fnode_graphql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavideCarvalho%2Fnode_graphql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavideCarvalho%2Fnode_graphql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DavideCarvalho","download_url":"https://codeload.github.com/DavideCarvalho/node_graphql/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavideCarvalho%2Fnode_graphql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31759259,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T15:25:13.801Z","status":"ssl_error","status_checked_at":"2026-04-13T15:25:09.162Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-engine","consign","express","graphql","graphql-tools","jwt","mongoose","nodejs"],"created_at":"2024-11-12T07:25:39.817Z","updated_at":"2026-04-13T15:31:44.449Z","avatar_url":"https://github.com/DavideCarvalho.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node_graphql\n\u003e Project to learn how GraphQL works\n\nI've made this project just to learn how GraphQL works with NodeJS and possible tools to work with it\n\nIt's really simple to use\n- Git clone it\n- If you have docker, just ``docker-compose up --build``\n  - Don't forget to put your database uri on ``app.js`` file\n- if you have yarn:\n  - ``yarn run start:hotreload`` to run with nodemon, it will reload the server once you change one file inside the project\n  - ``yarn run start`` to run as a normal node app\n- if you don't have yarn:\n  - ``npm run start:hotreload`` to run with nodemon, it will reload the server once you change one file inside the project\n  - ``npm run start`` to run as a normal node app\n  \nThis project uses ApolloEngine. It's a gateway to your GraphQL projects that outputs a bunch of metrics for you. Since performance reports\nuntil what are the most used querys.\nInside ``initialization/express.js`` there is\n```javascript\nconst engine = new ApolloEngine({\n  apiKey: 'service:DavideCarvalho-Demolay:0oe2ZfdbsEoHV6mNXe8Zuw'\n })\n```\nChange this apiKey to yours (just go to [Apollo Engine Website](https://www.apollographql.com/engine) and click on \"Get Api Key\"). It will\ntake you to the page where you can create an account using your github account and then create a project. Inside this project, get your\napi key.\n\nBefore continuing. I recommend you to use [Insomnia](https://insomnia.rest/) to make those queries, it's a lightweight simple to use \nREST and GraphQL Client.\n\nThis project has an authentication layer with JWT too. When the project starts, it create an user called ``root`` with password ``root``\nand cid ``1`` so you can make a query to GraphQL like this:\n```javascript\nquery ($login: LoginInput) {\n  login(login: $login) {\n    name\n  }\n}\n```\n\npassing those as query variables:\n```json\n{\n\t\"login\": {\n\t\t\"cid\": \"1\",\n\t\t\"password\": \"root\"\n\t}\n}\n```\nGet the token from the header (It's named \"Authentication\") and put it on the header of the rest of the requests.\n\nOr you can change this line of code on ``initialization/express.js``\n```javascript\nconsign()\n  .include('middlewares')\n  .then('models')\n  .then('graphql')\n  .then('api')\n  .then('routes')\n  .into(app);\n  ```\n  \n  To this:\n  ```javascript\nconsign()\n  .include('models')\n  .then('graphql')\n  .then('api')\n  .then('routes')\n  .into(app);\n  ```\n  \n  Now you're free to send requests without getting the token.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidecarvalho%2Fnode_graphql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidecarvalho%2Fnode_graphql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidecarvalho%2Fnode_graphql/lists"}