{"id":19885799,"url":"https://github.com/konjoinfinity/gqltest","last_synced_at":"2026-03-17T19:44:06.637Z","repository":{"id":197131919,"uuid":"698036460","full_name":"konjoinfinity/gqltest","owner":"konjoinfinity","description":"A Dual Data Source GraphQL Stitching Example with Queries and Shared Property Mutations ","archived":false,"fork":false,"pushed_at":"2023-10-03T02:15:47.000Z","size":8079,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-18T22:27:31.586Z","etag":null,"topics":["apollo-gateway","apollo-server","apollo-server-express","express","express-graphql","fetch","graphql","graphql-example","graphql-express","graphql-stitching","graphql-tools","nodemon"],"latest_commit_sha":null,"homepage":"https://github.com/konjoinfinity/gqltest","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/konjoinfinity.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":"2023-09-29T02:24:01.000Z","updated_at":"2023-10-23T19:53:51.000Z","dependencies_parsed_at":"2023-10-03T08:27:39.903Z","dependency_job_id":null,"html_url":"https://github.com/konjoinfinity/gqltest","commit_stats":null,"previous_names":["konjoinfinity/gqltest"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/konjoinfinity/gqltest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konjoinfinity%2Fgqltest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konjoinfinity%2Fgqltest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konjoinfinity%2Fgqltest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konjoinfinity%2Fgqltest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/konjoinfinity","download_url":"https://codeload.github.com/konjoinfinity/gqltest/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konjoinfinity%2Fgqltest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30629877,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T17:32:55.572Z","status":"ssl_error","status_checked_at":"2026-03-17T17:32:38.732Z","response_time":56,"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-gateway","apollo-server","apollo-server-express","express","express-graphql","fetch","graphql","graphql-example","graphql-express","graphql-stitching","graphql-tools","nodemon"],"created_at":"2024-11-12T17:35:33.640Z","updated_at":"2026-03-17T19:44:06.618Z","avatar_url":"https://github.com/konjoinfinity.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gqltest - GraphQL Stitching\n\n## Getting Started\n\nFirst install the dependencies:\n\n```bash\nnpm install\n# Or with yarn\nyarn install\n```\nTo run the graphql server, run:\n\n```bash\nnodemon gateway.js\n```\n\nThen you should see:\n\n```bash\nGateway running at http://localhost:4000/\n```\n\nTo access the Apollo GraphQL Studio Explorer, go to:\n\n```js\nhttp://localhost:4000/\n```\n\n## A simple GraphQL instance that: \n\n- [x] Connects to two API data sources\n- [x] Combines both schemas using stitching\n- [x] Makes both data sources accessible using one query request\n- [x] Shared schema data properties are kept in sync\n- [x] Shared property mutations update both APIs\n\n\n## Example Query and Mutation\n\n#### Books Query\n```graphql\nquery Book {\n  books {\n    id\n    genre\n    publisher\n    title\n  }\n}\n```\n#### Example Response\n\n```json\n{\n  \"data\": {\n    \"books\": [\n      {\n        \"id\": \"1\",\n        \"genre\": \"capacitor\",\n        \"publisher\": \"Random House\",\n        \"title\": \"saepe dolores voluptas\"\n      },\n      {\n        \"id\": \"2\",\n        \"genre\": \"City Accounts Gender\",\n        \"publisher\": \"Greenholt - Nitzsche\",\n        \"title\": \"voluptatem sunt accusamus\"\n      },\n      {\n        \"id\": \"3\",\n        \"genre\": \"Coupe dismiss\",\n        \"publisher\": \"Green and Sons\",\n        \"title\": \"dolores ea veniam\"\n      },\n    ]\n  }\n}\n```\n\n\n#### Authors Query\n```graphql\nquery Author {\n  authors {\n    id\n    name\n    nationality\n    publisher\n  }\n}\n```\n\n#### Example Response\n\n```json\n{\n  \"data\": {\n    \"authors\": [\n      {\n        \"id\": \"1\",\n        \"name\": \"Elaine Bahringer\",\n        \"nationality\": \"Cuba\",\n        \"publisher\": \"Random House\"\n      },\n      {\n        \"id\": \"2\",\n        \"name\": \"Jermaine VonRueden\",\n        \"nationality\": \"Aruba\",\n        \"publisher\": \"Lindgren - Ernser\"\n      },\n      {\n        \"id\": \"3\",\n        \"name\": \"Ed Fisher\",\n        \"nationality\": \"Vietnam\",\n        \"publisher\": \"Kuphal - Hoppe\"\n      }\n    ]\n  }\n}\n```\n#### Stitched Books and Authors Query\n\n```graphql\nquery Book {\n  books {\n    id\n    genre\n    publisher\n    title\n  }\n  authors {\n    id\n    name\n    nationality\n    publisher\n  }\n}\n```\n\n#### Example Response\n```json\n{\n  \"data\": {\n    \"books\": [\n      {\n        \"id\": \"1\",\n        \"genre\": \"capacitor\",\n        \"publisher\": \"Random House\",\n        \"title\": \"saepe dolores voluptas\"\n      },\n      {\n        \"id\": \"2\",\n        \"genre\": \"City Accounts Gender\",\n        \"publisher\": \"O'Reilly Group\",\n        \"title\": \"voluptatem sunt accusamus\"\n      }\n    ],\n    \"authors\": [\n      {\n        \"id\": \"1\",\n        \"name\": \"Elaine Bahringer\",\n        \"nationality\": \"Cuba\",\n        \"publisher\": \"Random House\"\n      },\n      {\n        \"id\": \"2\",\n        \"name\": \"Jermaine VonRueden\",\n        \"nationality\": \"Aruba\",\n        \"publisher\": \"O'Reilly Group\"\n      }\n    ]\n  }\n}\n```\n\n\n#### Update Book and Author Publisher Mutation\n```graphql\nmutation UpdateBookAndAuthor($bookId: ID!, $authorId: ID!, \n$publisher: String!) {\n  updateBookAndAuthor(bookId: $bookId, authorId: $authorId, publisher: $publisher) {\n    book {\n      id\n      title\n      genre\n      publisher\n    }\n    author {\n      id\n      name\n      nationality\n      publisher\n    }\n  }\n}\n```\n\n\n#### Mutation Variables\n```json\n{\n\"bookId\": \"2\",\n\"authorId\": \"2\",\n\"publisher\": \"O'Reilly Group\"\n}\n\n```\n\n#### Example Response\n\n```json\n{\n  \"data\": {\n    \"updateBookAndAuthor\": {\n      \"book\": {\n        \"id\": \"2\",\n        \"title\": \"voluptatem sunt accusamus\",\n        \"genre\": \"City Accounts Gender\",\n        \"publisher\": \"O'Reilly Group\"\n      },\n      \"author\": {\n        \"id\": \"2\",\n        \"name\": \"Jermaine VonRueden\",\n        \"nationality\": \"Aruba\",\n        \"publisher\": \"O'Reilly Group\"\n      }\n    }\n  }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonjoinfinity%2Fgqltest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkonjoinfinity%2Fgqltest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonjoinfinity%2Fgqltest/lists"}