{"id":18400875,"url":"https://github.com/magicmark/fancyintrospectandcompose","last_synced_at":"2026-04-27T00:31:42.023Z","repository":{"id":208754473,"uuid":"721903383","full_name":"magicmark/FancyIntrospectAndCompose","owner":"magicmark","description":"A fancier version of @apollo/gateway's IntrospectAndCompose","archived":false,"fork":false,"pushed_at":"2023-11-24T22:09:48.000Z","size":88,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-15T04:28:56.586Z","etag":null,"topics":["apollo","federation","graphql"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/magicmark.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-11-22T02:38:36.000Z","updated_at":"2023-11-24T22:02:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"06bdad82-aaf3-404a-a98c-5159d6944b4a","html_url":"https://github.com/magicmark/FancyIntrospectAndCompose","commit_stats":null,"previous_names":["magicmark/fancyintrospectandcompose"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/magicmark/FancyIntrospectAndCompose","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicmark%2FFancyIntrospectAndCompose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicmark%2FFancyIntrospectAndCompose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicmark%2FFancyIntrospectAndCompose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicmark%2FFancyIntrospectAndCompose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magicmark","download_url":"https://codeload.github.com/magicmark/FancyIntrospectAndCompose/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicmark%2FFancyIntrospectAndCompose/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32318417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"ssl_error","status_checked_at":"2026-04-26T23:26:25.802Z","response_time":129,"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","federation","graphql"],"created_at":"2024-11-06T02:37:10.134Z","updated_at":"2026-04-27T00:31:42.005Z","avatar_url":"https://github.com/magicmark.png","language":"TypeScript","readme":"# FancyIntrospectAndCompose\n\nA fancier version of Apollo's `IntrospectAndCompose` (from `@apollo/gateway`).\n\nAdds the following features:\n\n-   **Modify the schema after composition.** (Useful for adding gateway-only directives)\n-   **Provide static subgraphs.** (Useful for short-circuiting introspection requests to subgraphs that will not change)\n\n## Install\n\n```bash\n$ yarn add fancy-introspect-and-compose\n```\n\n## Example Usage\n\n```js\nnew ApolloGateway({\n    supergraphSdl: new FancyIntrospectAndCompose({\n        pollIntervalInMs: 1000,\n        modifySchema: sdl =\u003e {\n            return `directive @MyNewDirective on QUERY\\n${sdl}`;\n        },\n        subgraphs: [\n            {\n                name: 'subgraph_foo',\n                url: 'http://foo.mesh.example.com/graphql',\n            },\n        ],\n        staticSubgraphs: [\n            {\n                name: 'subgraph_bar',\n                sdl: fs.readFileSync('/path/to/bar.graphql'),\n            },\n        ],\n    }),\n});\n```\n\n_See the [tests](tests/index.test.ts) for more._\n\n## API\n\n`FancyIntrospectAndCompose` extends `IntrospectAndCompose`. It has the same methods and accepts the same constructor options:\n\nhttps://www.apollographql.com/docs/apollo-server/using-federation/api/apollo-gateway/#options-2\n\n### Additional Options\n\n`FancyIntrospectAndCompose` accepts the following additional constructor options:\n\n| parameter         | type                                                            | description                                                     |\n| ----------------- | --------------------------------------------------------------- | --------------------------------------------------------------- |\n| `modifySchema`    | `(sdl: string) =\u003e string`                                       | a callback to modify the composed schema                        |\n| `staticSubgraphs` | `Array\u003c{ name: string, sdl: string \\| () =\u003e Promise\u003cstring\u003e }\u003e` | a list of subgraphs + static sdl (will not be polled/refetched) |\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicmark%2Ffancyintrospectandcompose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagicmark%2Ffancyintrospectandcompose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicmark%2Ffancyintrospectandcompose/lists"}