{"id":16222322,"url":"https://github.com/kriswep/graphql-microservices","last_synced_at":"2025-10-11T09:34:44.477Z","repository":{"id":37735219,"uuid":"112841575","full_name":"kriswep/graphql-microservices","owner":"kriswep","description":"Showcasing a graphql microservice setup","archived":false,"fork":false,"pushed_at":"2025-09-25T18:48:32.000Z","size":1274,"stargazers_count":77,"open_issues_count":24,"forks_count":15,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-25T20:56:11.319Z","etag":null,"topics":["api","backend","docker","docker-compose","graphql","graphql-microservices","microservice","microservices","service-gateway","showcase"],"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/kriswep.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-12-02T12:47:52.000Z","updated_at":"2024-06-19T22:45:08.000Z","dependencies_parsed_at":"2024-02-04T09:28:01.583Z","dependency_job_id":"5d76f00b-1380-4db0-b3f5-f296bbf95118","html_url":"https://github.com/kriswep/graphql-microservices","commit_stats":{"total_commits":189,"total_committers":4,"mean_commits":47.25,"dds":0.4126984126984127,"last_synced_commit":"2947b3d0144392fe17f7a13c92d6a15598a94853"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kriswep/graphql-microservices","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kriswep%2Fgraphql-microservices","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kriswep%2Fgraphql-microservices/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kriswep%2Fgraphql-microservices/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kriswep%2Fgraphql-microservices/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kriswep","download_url":"https://codeload.github.com/kriswep/graphql-microservices/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kriswep%2Fgraphql-microservices/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006749,"owners_count":26084180,"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-10-11T02:00:06.511Z","response_time":55,"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":["api","backend","docker","docker-compose","graphql","graphql-microservices","microservice","microservices","service-gateway","showcase"],"created_at":"2024-10-10T12:12:46.467Z","updated_at":"2025-10-11T09:34:44.438Z","avatar_url":"https://github.com/kriswep.png","language":"JavaScript","readme":"# GRAPHQL-MICROSERVICES\n\nThis project showcases, how one could set up a graphql server using a (mildy simplified) microservice\narchitecture.\n\n[![CircleCI](https://circleci.com/gh/kriswep/graphql-microservices.svg?style=svg)](https://circleci.com/gh/kriswep/graphql-microservices)\n\n_Powered by [Apollo Server 2](https://github.com/apollographql/apollo-server/), using [Apollo Federation](https://www.apollographql.com/docs/apollo-server/federation/introduction/) to expose a single, 'monolithic' API and many more_\n\n## Start in docker - via docker compose\n\n`sudo docker-compose up -d`\n\nScale single services, eg the post-service, which has an identifier field for demo purposes build in\n\n`sudo docker-compose up -d --scale post=2`\n\nremove:\n`sudo docker-compose down`\n\nOpen the example API-Playground on http://localhost:3000 and issue GraphQL request.\n\nIt is composed of the separated user and post services, stitched together.\n\n## Start in docker env - manually\n\nsetup a new docker network initially.\n\n```bash\nsudo docker network create --driver bridge my-service\n```\n\n**service-post**\n\nBuild and run service-post container.\n\n```bash\ncd ./service-post\nsudo docker build -t my-service/service-post .\nsudo docker run -d \\\n--network=my-service \\\n--net-alias service-post \\\nmy-service/service-post\n```\n\nYou could start multiple services as well to get easy round robin load\nbalancing. We added a hash field to our post service to identify the handling\nprocess.\n\n**service-user**\n\nBuild and run service-user container.\n\n```bash\ncd ./service-user\nsudo docker build -t my-service/service-user .\nsudo docker run -d \\\n--network=my-service \\\n--net-alias service-user \\\nmy-service/service-user\n```\n\n**service-gateway**\n\nBuild and run service-gateway container.\n\n```bash\ncd ./service-gateway\nsudo docker build -t my-service/service-gateway .\nsudo docker run -d \\\n--network=my-service \\\n-p 3000:3000 \\\n--net-alias service-gateway \\\n-e POST_URL='http://service-post:3010/graphql' \\\n-e USER_URL='http://service-user:3020/graphql' \\\nmy-service/service-gateway\n```\n\n---\n\nSidenote: If you need to stop and remove all services do sthg like\n\n```bash\nsudo docker stop $(sudo docker ps -a -q)\nsudo docker rm $(sudo docker ps -a -q)\n```\n\nAttention: This stops and removes all your running docker images\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkriswep%2Fgraphql-microservices","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkriswep%2Fgraphql-microservices","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkriswep%2Fgraphql-microservices/lists"}