apollo-federation
Guide for authoring Apollo Federation subgraph schemas. Use this skill when: (1) creating new subgraph schemas for a federated supergraph, (2) defining or modifying entities with @key, (3) sharing types/fields across subgraphs with @shareable, (4) working with federation directives (@external, @requires, @provides, @override, @inaccessible), (5) troubleshooting composition errors, (6) any task involving federation schema design patterns.
npx skills add majiayu000/claude-skill-registry --skill apollo-federation --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Apollo Federation Schema Authoring Apollo Federation enables composing multiple GraphQL APIs (subgraphs) into a unified supergraph. ## Federation 2 Schema Setup Every Federation 2 subgraph must opt-in via `@link`: ```graphql extend schema @link(url: "https://specs.apollo.dev/federation/v2.12", import: ["@key", "@shareable", "@external", "@requires", "@provides"]) ``` Import only the directives your subgraph uses. ## Core Directives Quick Reference | Directive | Purpose | Example | |-----------|---------|---------| | `@key` | Define entity with unique key | `type Product @key(fields: "id")` | | `@shareable` | Allow multiple subgraphs to resolve field | `type Position @shareable { x: Int! }` | | `@external` | Reference field from another subgraph | `weight: Int @external` | | `@requires` | Computed field depending on external fields | `shippingCost: Int @requires(fields: "weight")` | | `@provides` | Conditionally resolve external field | `@provides(fields: "name")` | | `@override` | Migrate field to this subgraph | `@override(from: "Products")` | | `@inaccessible` | Hide from API schema | `internalId: ID! @inaccessible` | | `@interfaceObject` | Add fields to entity interface | `typ
- Federation 2 Schema Setup
- Core Directives Quick Reference
- Reference Files
- Key Patterns
- Entity Definition
- Entity Contributions Across Subgraphs
- Computed Fields with @requires
- Value Types with @shareable
- Entity Stub (Reference Without Contributing)
- Ground Rules
What does the apollo-federation skill do?
Guide for authoring Apollo Federation subgraph schemas. Use this skill when: (1) creating new subgraph schemas for a federated supergraph, (2) defining or modifying entities with @key, (3) sharing types/fields across subgraphs with @shareable, (4) working with federation directives (@external, @requires, @provides, @override, @inaccessible), (5) troubleshooting composition errors, (6) any task involving federation schema design patterns.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill apollo-federation --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
