{"id":16061151,"url":"https://github.com/kbrandwijk/graphcool-gateway-common-features","last_synced_at":"2026-04-20T19:05:01.962Z","repository":{"id":68299005,"uuid":"108336763","full_name":"kbrandwijk/graphcool-gateway-common-features","owner":"kbrandwijk","description":"This demo uses the Graphcool API Gateway pattern to reuse common functionality in multiple projects","archived":false,"fork":false,"pushed_at":"2017-11-07T13:53:03.000Z","size":17,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T22:58:01.872Z","etag":null,"topics":["api-gateway","apollo-server","graphcool","graphql"],"latest_commit_sha":null,"homepage":"https://launchpad.graphql.com/9q0nxlk9r","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kbrandwijk.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}},"created_at":"2017-10-25T23:19:35.000Z","updated_at":"2017-11-03T11:13:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"f1373ba4-b7b0-4b59-a09e-eadfde7d3ce1","html_url":"https://github.com/kbrandwijk/graphcool-gateway-common-features","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/kbrandwijk%2Fgraphcool-gateway-common-features","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbrandwijk%2Fgraphcool-gateway-common-features/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbrandwijk%2Fgraphcool-gateway-common-features/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbrandwijk%2Fgraphcool-gateway-common-features/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kbrandwijk","download_url":"https://codeload.github.com/kbrandwijk/graphcool-gateway-common-features/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247312093,"owners_count":20918344,"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":["api-gateway","apollo-server","graphcool","graphql"],"created_at":"2024-10-09T04:08:00.847Z","updated_at":"2026-04-20T19:04:56.932Z","avatar_url":"https://github.com/kbrandwijk.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# graphcool-gateway-common-features\n\nThis demo uses the Graphcool API Gateway pattern to reuse common functionality in multiple projects. It uses a common Graphcool service that provides weather information, and makes it available through schema stitching in another project that holds address information. This pattern is useful for all kinds of common features (weather, directions, mail sending etc.) that you can now easily reuse across projects.\n\n### Architecture\n\nOne service holds information about users and their addresses according to this schema:\n```graphql\ntype User @model {\n  id: ID! @isUnique\n  name: String!\n  dateOfBirth: DateTime\n  address: Address @relation(name: \"UserAddress\")\n}\n\ntype Address @model {\n  id: ID! @isUnique\n  city: String!\n  user: User @relation(name: \"UserAddress\")\n}\n```\n\nThe other service just contains one resolver function:\n```graphql\ntype WeatherPayload {\n  temperature: Float\n}\n\nextend type Query {\n  getWeatherByCity(city: String): WeatherPayload\n}\n```\n\nThis application (the API Gateway) stitches them together, by extending the `Address` Type with a `weather` field.\n\n### Running this example\n\nThe easiest way to run this example is to use the Apollo Launchpad: https://launchpad.graphql.com/9q0nxlk9r\n\n### Local development\n\n- Create a `.env` file in the root of your project folder with the following keys:\n  - `GRAPHCOOL_ADDRESS_ENDPOINT`\n  - `GRAPHCOOL_WEATHER_ENDPOINT`\n\n```\nGRAPHCOOL_ADDRESS_ENDPOINT=https://api.graph.cool/simple/v1/...\nGRAPHCOOL_ADDRESS_ENDPOINT=https://api.graph.cool/simple/v1/...\n```\n\u003e If you don't provide these keys, the application will use demo endpoints (read-only)\n\n- Run `yarn install` or `npm install`\n\n- Run `yarn start` or `npm start`\n\n- Open http://localhost:3000/playground and execute queries\n\n![image](https://user-images.githubusercontent.com/852069/32027816-74599806-b9eb-11e7-9842-8a580bee9b78.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkbrandwijk%2Fgraphcool-gateway-common-features","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkbrandwijk%2Fgraphcool-gateway-common-features","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkbrandwijk%2Fgraphcool-gateway-common-features/lists"}