{"id":13515266,"url":"https://github.com/gmac/schema-stitching-handbook","last_synced_at":"2025-04-06T07:14:28.478Z","repository":{"id":44552580,"uuid":"315821699","full_name":"gmac/schema-stitching-handbook","owner":"gmac","description":"Guided examples exploring GraphQL Tools v6+ Schema Stitching","archived":false,"fork":false,"pushed_at":"2023-02-13T18:55:34.000Z","size":811,"stargazers_count":346,"open_issues_count":1,"forks_count":37,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-03-30T06:07:17.485Z","etag":null,"topics":["graphql","graphql-tools","remote-schemas","schema-stitching"],"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/gmac.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}},"created_at":"2020-11-25T03:46:05.000Z","updated_at":"2025-03-06T21:45:03.000Z","dependencies_parsed_at":"2024-01-10T12:01:20.551Z","dependency_job_id":"1e729439-302a-4f20-ba7c-1d723dc95c75","html_url":"https://github.com/gmac/schema-stitching-handbook","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/gmac%2Fschema-stitching-handbook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmac%2Fschema-stitching-handbook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmac%2Fschema-stitching-handbook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmac%2Fschema-stitching-handbook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gmac","download_url":"https://codeload.github.com/gmac/schema-stitching-handbook/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247445681,"owners_count":20939961,"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":["graphql","graphql-tools","remote-schemas","schema-stitching"],"created_at":"2024-08-01T05:01:08.602Z","updated_at":"2025-04-06T07:14:28.463Z","avatar_url":"https://github.com/gmac.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# ![Schema Stitching Handbook](./images/banner-1.jpg)\n\nGuided examples of [GraphQL Stitching](https://the-guild.dev/graphql/stitching/docs) doing useful things. While this book focuses on [GraphQL Tools](https://github.com/ardatan/graphql-tools) (JavaScript) and its specific capabilities, many of these general schema stitching concepts apply to implementations across languages, see similar projects:\n\n- [Bramble](https://github.com/movio/bramble) (Golang)\n- [graphql-stitching-ruby](https://github.com/gmac/graphql-stitching-ruby) (Ruby)\n\n## Table of Contents\n\n### Installation\n\nFrom the root directory, run:\n\n```sh\nyarn install\n```\n\n### Foundation\n\n- **[Combining local and remote schemas](./combining-local-and-remote-schemas)**\n\n  - Adding a locally-executable schema.\n  - Adding a remote schema, fetched via introspection.\n  - Adding a remote schema, fetched from a custom SDL service.\n  - Avoiding schema conflicts using transforms.\n  - Authorization headers.\n  - Basic error handling.\n\n- **[Mutations \u0026amp; subscriptions](./mutations-and-subscriptions)**\n\n  - Adding a remote mutation service.\n  - Adding a remote subscription service.\n  - Adding a subscriber proxy.\n\n- **[Single-record type merging](./type-merging-single-records)**\n\n  - Type merging using single-record queries.\n  - Query/execution batching.\n\n- **[Array-batched type merging](./type-merging-arrays)**\n\n  - Type merging using array queries.\n  - Handling array errors.\n  - Nullability \u0026 error remapping.\n\n- **[Merged types with multiple keys](./type-merging-multiple-keys)**\n\n  - Configuring multiple key entry points for a merged type.\n\n- **[Nullable merges](./type-merging-nullables)**\n\n  - Selecting nullability for merged fields.\n  - Returning nullable and not-nullable results.\n\n- **[Custom merge resolvers](./custom-merge-resolvers)**\n\n  - Using `valuesFromResults` to normalize resulting query data.\n  - Adapting type merging to query through namespaced scopes.\n  - Adapting type merging to query through non-root fields.\n  - Using `batchDelegateToSchema` and `delegateToSchema`.\n\n- **[Cross-service interfaces](./type-merging-interfaces)**\n\n  - Distributing a GraphQL interface across services.\n\n- **[Computed fields](./computed-fields)**\n\n  - Configuring computed fields.\n  - Sending complex inputs to subservices.\n  - Normalizing subservice deprecations in the gateway.\n\n- **[Stitching directives SDL](./stitching-directives-sdl)**\n\n  - `@key` directive for type-level selection sets.\n  - `@merge` directive for type merging services.\n  - `@computed` directive for computed fields.\n  - `@canonical` directive for preferred element definitions.\n\n### Architecture\n\n- **[Hot schema reloading](./hot-schema-reloading)**\n\n  - Hot reload of the combined gateway schema (no server restart).\n  - Polling for remote subschema changes.\n  - Mutations for adding/removing remote subservices.\n  - Handling subservice request timeouts.\n\n- **[Versioning schema releases](./versioning-schema-releases)**\n\n  - Using GitHub API to manage a simple schema registry.\n  - Hot reloading from a remote Git registry.\n  - Running development and production environments.\n\n- **[Continuous Integration (CI) testing](./continuous-integration-testing)**\n\n  - Adding test coverage to a stitched schema.\n  - Mocking subservices as local test fixtures.\n\n- **[Public and private APIs](./public-and-private-apis)**\n\n  - Filtering unwanted fields from the final stitched schema.\n  - Serving public (filtered) and private (unfiltered) API versions.\n\n### Other Integrations\n\n- **[Federation services](./federation-services)**\n\n  - Integrating Apollo Federation services into a stitched schema.\n  - Fetching and parsing Federation SDLs.\n\n- **[Subservice languages](./subservice-languages)**\n\n  - **[JavaScript](./subservice-languages/javascript)** schemas created with:\n\n    - `graphql-js`\n    - `nexus`\n    - `type-graphql`\n\n  - **[Ruby](./subservice-languages/ruby)** schemas created with:\n\n    - Class-based definitions\n    - Parsed definitions string\n\n- **[GraphQL Upload](./graphql-upload)**\n\n  - Adding GraphQL Upload to the gateway server\n\n### Appendices\n\n- [What is Array Batching?](https://github.com/gmac/schema-stitching-demos/wiki/Batching-Arrays-and-Queries#what-is-array-batching)\n- [What is Query Batching?](https://github.com/gmac/schema-stitching-demos/wiki/Batching-Arrays-and-Queries#what-is-query-batching)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmac%2Fschema-stitching-handbook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgmac%2Fschema-stitching-handbook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmac%2Fschema-stitching-handbook/lists"}