{"id":21715500,"url":"https://github.com/gkarthiks/nodejs-graphql","last_synced_at":"2026-04-10T02:32:36.908Z","repository":{"id":52022669,"uuid":"118215682","full_name":"gkarthiks/nodeJS-GraphQL","owner":"gkarthiks","description":"https://gkarthiks.github.io/nodeJS-GraphQL/         A simple nodeJS GraphQL application","archived":false,"fork":false,"pushed_at":"2023-03-01T13:46:58.000Z","size":6221,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-25T17:43:09.262Z","etag":null,"topics":["docker-image","graphiql","graphql","k8s","minikube","nodejs-graphql"],"latest_commit_sha":null,"homepage":"","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/gkarthiks.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":"2018-01-20T06:24:28.000Z","updated_at":"2023-01-11T11:59:53.000Z","dependencies_parsed_at":"2023-02-09T12:45:54.528Z","dependency_job_id":null,"html_url":"https://github.com/gkarthiks/nodeJS-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/gkarthiks%2FnodeJS-GraphQL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkarthiks%2FnodeJS-GraphQL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkarthiks%2FnodeJS-GraphQL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkarthiks%2FnodeJS-GraphQL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gkarthiks","download_url":"https://codeload.github.com/gkarthiks/nodeJS-GraphQL/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244676454,"owners_count":20491828,"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":["docker-image","graphiql","graphql","k8s","minikube","nodejs-graphql"],"created_at":"2024-11-26T00:45:00.256Z","updated_at":"2026-04-10T02:32:31.826Z","avatar_url":"https://github.com/gkarthiks.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Sample Node JS application with GraphQL\r\nThis is a sample `GraphQL` implementation over the `NodeJS` `express` server listening on port 4000.\r\n\r\nThe data for this server if feed by the hardcoded file [in here](https://github.com/gkarthiks/nodeJS-GraphQL/blob/master/assets/dummy-data.js). This data is used for only reading i.e., only by the `query` type.\r\n\r\nVia `mutation`, whatever data is sent to the server; all of those are stored in the server session and returned to the `query` while upon *reading*.\r\n\r\n#### Requirements\r\n* [node](https://docs.npmjs.com/getting-started/installing-node)\r\n* [npm](https://www.npmjs.com/get-npm)\r\n* [docker](https://www.docker.com/) (for containerizing the app)\r\n* [docker registry account](https://hub.docker.com/)\r\n* [k8s](https://kubernetes.io/) [minikube](https://kubernetes.io/docs/getting-started-guides/minikube/) (for deploying the container into cluster)\r\n* [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) (to interact with the Kubernetes)\r\n\r\n#### Install \u0026 Run in k8s\r\nFollow the below steps to download and run the application in minikube.\r\n\r\nDownload the source code\r\n\r\n\u003e git clone https://github.com/gkarthiks/nodeJS-GraphQL.git\r\n\r\nBuild the source code and run it locally for testing.\r\n\r\n\u003e\r\n```\r\n  cd nodeJS-GraphQL\r\n  npm run-script build\r\n  npm run-script run\r\n```\r\n\r\nThe above steps will run the `nodeJS` application listening on port 4000. try hitting `localhost:4000/graphql`\r\n\r\nNoe create a `docker image` by executing the below command.\r\n\r\n\u003e\r\n```\r\ndocker build -t graphqlexample .\r\n```\r\n\r\nThis will create a docker image with `node:slim` as base. Check whether the image is created or not by listing the docker images via below command.\r\n\r\n\u003e docker image ls\r\n\r\nTag the docker image with the following command and push it to your docker hub.\r\n\r\n\u003e\r\n```\r\ndocker tag graphqlexample \u003cusername\u003e/graphqlexample\r\ndocker push \u003cusername\u003e/graphqlexample\r\n```\r\n  \r\nFind quick docker commands [here](https://github.com/gkarthiks/quick-commands-cheat-sheet).\r\n\r\nNow that docker image is created, that can be tested with docker itself by runing it locally with the below command.\r\n\r\n\u003e docker run -p 4000:4000 \u003cusername\u003e/graphqlexample\r\n  \r\nOnce after successfull testing, it can be deployed in the `minikube` by creating the `Deployment`, `Service` and `Route` objects.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgkarthiks%2Fnodejs-graphql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgkarthiks%2Fnodejs-graphql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgkarthiks%2Fnodejs-graphql/lists"}