Agent skill

Apollo Federation

by apollographql in apollographql/skills

Guide for authoring Apollo Federation subgraph schemas. An agent skill from apollographql/skills.

MITAuto-check passedBackend & APIs

Install Apollo Federation

skills CLI
$ npx skills add apollographql/skills --skill apollo-federation -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install apollographql/skills apollo-federation --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/apollographql/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/apollo-federation .claude/skills/apollo-federation && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
apollo-federation
GitHub stars
117
Token cost
~1k tokens
SKILL.md length
260 words
Files
4 (incl. references)
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

Guide for authoring Apollo Federation subgraph schemas. An agent skill from apollographql/skills.

  • Creating new subgraph schemas for a federated supergraph
  • SKILL.md covers Federation 2 Schema Setup, Core Directives Quick Reference, Reference Files and Key Patterns, plus 1 more section
  • Reaches specs.apollo.dev
  • Modifying entities with @key

What it does

Apollo Federation is an agent skill from apollographql/skills. 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.

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/composition.md`, `references/directives.md` and `references/schema-patterns.md`). Compatibility notes: Works with any Federation 2.x compatible subgraph library (Apollo Server, GraphQL Yoga, etc.)

It sits in Backend & APIs, covering GraphQL. The repository describes itself as: Apollo GraphQL Agent Skills. The licence is MIT.

When your agent uses it

  • Creating new subgraph schemas for a federated supergraph
  • Modifying entities with @key
  • Sharing types/fields across subgraphs with @shareable
  • Working with federation directives (@external

Example prompts

  • “/apollo-federation”

Requirements

  • Compatibility (from SKILL.md): Works with any Federation 2.x compatible subgraph library (Apollo Server, GraphQL Yoga, etc.)
  • Pre-approved tools (allowed-tools): Bash(rover:*), Read, Write, Edit, Glob, Grep

What it can do on your machine

Read from SKILL.md and the folder at commit 5f02fcf. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash(rover:*)
    • Read
    • Write
    • Edit
    • Glob
    • Grep

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are graphql).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • specs.apollo.dev

    Also links to:

    • apollographql.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Works with any Federation 2.x compatible subgraph library (Apollo Server, GraphQL Yoga, etc.)

    From compatibility in the SKILL.md frontmatter.

Context cost

Apollo Federation loads about 1k tokens when it runs, and up to ~9.7k if it reads all its reference files. Until then it costs about 115 tokens; SKILL.md has 260 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~115
When it runs · the whole SKILL.md, loaded when a task matches
~1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~9.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from apollographql/skills at commit 5f02fcf, republished under its MIT licence (© apollographql). 260 words, ~1,009 tokens.

Download SKILL.mdSave it as .claude/skills/apollo-federation/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
apollo-federation
description
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.
allowed-tools
Bash(rover:*), Read, Write, Edit, Glob, Grep
compatibility
Works with any Federation 2.x compatible subgraph library (Apollo Server, GraphQL Yoga, etc.)
license
MIT
metadata.author
apollographql
metadata.version
1.0.2

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. The version shown (v2.12) is illustrative — check the Federation changelog for currently supported versions before copying it verbatim.

A subgraph's @link version is a floor, not the composition version — see Federation versions for the full explanation.

Core Directives Quick Reference

DirectivePurposeExample
@keyDefine entity with unique keytype Product @key(fields: "id")
@shareableAllow multiple subgraphs to resolve fieldtype Position @shareable { x: Int! }
@externalReference field from another subgraphweight: Int @external
@requiresComputed field depending on external fieldsshippingCost: Int @requires(fields: "weight")
@providesConditionally resolve external field@provides(fields: "name")
@overrideMigrate field to this subgraph@override(from: "Products")
@inaccessibleHide from API schemainternalId: ID! @inaccessible
@interfaceObjectAdd fields to entity interfacetype Media @interfaceObject

Reference Files

Detailed documentation for specific topics:

  • Directives - All federation directives with syntax, examples, and rules
  • Schema Patterns - Multi-subgraph patterns and recipes
  • Composition - Composition rules, error codes, and debugging

Key Patterns

Entity Definition
graphql
type Product @key(fields: "id") {
  id: ID!
  name: String!
  price: Int
}
Entity Contributions Across Subgraphs
graphql
# Products subgraph
type Product @key(fields: "id") {
  id: ID!
  name: String!
  price: Int
}

# Reviews subgraph
type Product @key(fields: "id") {
  id: ID!
  reviews: [Review!]!
  averageRating: Float
}
Computed Fields with @requires
graphql
type Product @key(fields: "id") {
  id: ID!
  size: Int @external
  weight: Int @external
  shippingEstimate: String @requires(fields: "size weight")
}
Value Types with @shareable
graphql
type Money @shareable {
  amount: Int!
  currency: String!
}
Entity Stub (Reference Without Contributing)
graphql
type Product @key(fields: "id", resolvable: false) {
  id: ID!
}

Ground Rules

  • ALWAYS use Federation 2.x syntax with @link directive
  • ALWAYS import only the directives your subgraph uses
  • NEVER use @shareable without ensuring all subgraphs return identical values for that field
  • PREFER @key with single ID field for simple entity identification
  • USE rover supergraph compose to validate composition locally
  • USE rover subgraph check to validate against production supergraph

© apollographql, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in skills/apollo-federation of apollographql/skills.

  • SKILL.md
  • references/composition.md
  • references/directives.md
  • references/schema-patterns.md

Open the folder on GitHubat commit 5f02fcf

Compare with similar skills

Apollo Federation next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Apollo Federation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Apollo Federation this skillapollographql/skills117—~1kAutomated safety check: PassMIT
Backend Guidelightly-ai/lightly-studio896—~1.2kAutomated safety check: PassApache-2.0
Ar Io Gateway Operatorar-io/ar-io-node127—~8.8kAutomated safety check: NotesAGPL-3.0
Add Resolverdevlint/GitWand180—~1.6kAutomated safety check: PassMIT
Foundationdb Advanced LayersSnowBankSDK/foundationdb-dotnet-client158—~3.4kAutomated safety check: PassBSD-3-Clause
Datajunction QueryDataJunction/dj162—~2kAutomated safety check: PassMIT

Similar skills

  • Backend Guide

    lightly-ai/lightly-studio

    Read before adding or changing backend code in lightlystudio - FastAPI routes, services, resolvers, SQLModel tables, or database access.

    896 GitHub stars~1.2k tokensUpdated today
    Backend & APIsAuto-check passed
  • Ar Io Gateway Operator

    ar-io/ar-io-node

    Operate any AR.IO node deployment — architecture, daily ops, diagnostics, and recurring pitfalls that apply to every operator.

    127 GitHub stars~8.8k tokensUpdated today
    Backend & APIsAuto-check: notes
  • Add Resolver

    devlint/GitWand

    Add a format-specific resolver to GitWand core. An agent skill from devlint/GitWand.

    180 GitHub stars~1.6k tokensUpdated today
    Backend & APIsAuto-check passed
  • Foundationdb Advanced Layers

    SnowBankSDK/foundationdb-dotnet-client

    Advanced engineering for sophisticated FoundationDB layers with the .NET client (FoundationDB.Client / SnowBank) — the cluster model and transaction lifecycle (proxies, resolvers, tlogs, storage…

    158 GitHub stars~3.4k tokensUpdated today
    Backend & APIsAuto-check passed
  • Datajunction Query

    DataJunction/dj

    Activate this skill for querying DataJunction (DJ) — finding nodes, generating SQL, fetching metric data, exploring lineage, visualizing results — via the DJ UI, MCP tools, or REST/GraphQL APIs.

    162 GitHub stars~2k tokensUpdated today
    Backend & APIsAuto-check passed
  • Official

    Audit already-implemented Data warehouse import sources for endpoints, schemas, and tables the vendor's API offers but we never wired up.

    40k GitHub stars~3.7k tokensUpdated today
    Backend & APIsAuto-check passed

More from apollographql/skills

All 12 skills in this repo
  • Graphos Factory

    apollographql/skills

    Build and iterate on an Apollo Connectors subgraph for a GraphOS supergraph from a REST API, with or without an OpenAPI or Swagger spec, in a dedicated git workspace that records what the API…

    117 GitHub stars~15k tokensUpdated 2 days ago
    Auto-check passed
  • Apollo Client

    apollographql/skills

    Guide for building React applications with Apollo Client 4.x.

    117 GitHub stars~1.9k tokensUpdated 2 days ago
    Auto-check passed
  • Apollo Connectors

    apollographql/skills

    DEPRECATED: superseded by the graphos-factory skill (npx skills add apollographql/skills@graphos-factory), which builds and maintains a Connectors subgraph from a REST API with recorded decisions…

    117 GitHub stars~1.8k tokensUpdated 2 days ago
    Auto-check passed
  • Apollo iOS

    apollographql/skills

    Guide for building Apple-platform applications with Apollo iOS, the strongly-typed GraphQL client for Swift.

    117 GitHub stars~2k tokensUpdated 2 days ago
    Auto-check passed
  • Apollo Router Plugin Creator

    apollographql/skills

    Guide for writing Apollo Router native Rust plugins. An agent skill from apollographql/skills.

    117 GitHub stars~4.1k tokensUpdated 2 days ago
    Auto-check passed
  • Apollo Server

    apollographql/skills

    Guide for building GraphQL servers with Apollo Server 5.x. An agent skill from apollographql/skills.

    117 GitHub stars~1.8k tokensUpdated 2 days ago
    Auto-check passed

Questions about Apollo Federation

What does Apollo Federation do?

Guide for authoring Apollo Federation subgraph schemas. An agent skill from apollographql/skills. Apollo Federation is an agent skill from apollographql/skills. Guide for authoring Apollo Federation subgraph schemas.

When should I use Apollo Federation?

Apollo Federation fits situations like: creating new subgraph schemas for a federated supergraph; modifying entities with @key; sharing types/fields across subgraphs with @shareable; working with federation directives (@external.

How do I install Apollo Federation in Claude Code?

Run `npx skills add apollographql/skills --skill apollo-federation -a claude-code`. Or copy the skill folder (skills/apollo-federation in apollographql/skills) into .claude/skills/apollo-federation in your project. Claude Code loads it when a task matches its description.

How do I install Apollo Federation in Codex?

Run `npx skills add apollographql/skills --skill apollo-federation -a codex`. Or copy the skill folder (skills/apollo-federation in apollographql/skills) into .agents/skills/apollo-federation in your project. Codex loads it when a task matches its description.

Can I use Apollo Federation in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add apollographql/skills --skill apollo-federation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/apollo-federation, .gemini/skills/apollo-federation, .github/skills/apollo-federation and .opencode/skills/apollo-federation in your project.

What does Apollo Federation need to run?

SKILL.md names no scripts, command-line tools or credentials: Apollo Federation is instructions for the agent only. Its frontmatter pre-approves these tools: Bash(rover:*), Read, Write, Edit, Glob, Grep. Compatibility (from SKILL.md): Works with any Federation 2.x compatible subgraph library (Apollo Server, GraphQL Yoga, etc.).

Does Apollo Federation access the network?

SKILL.md names 2 domains. In commands or code: specs.apollo.dev; the agent is likely to contact it when it follows the instructions. As links in the text: apollographql.com. This is read from the text; nothing was executed.

Is Apollo Federation safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Apollo Federation use?

Apollo Federation is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Apollo Federation use?

About 1k tokens (SKILL.md is roughly 4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 8.7k tokens, read only when the agent opens those files.

What are the alternatives to Apollo Federation?

Skills that share tags, products or a category with Apollo Federation: Backend Guide (lightly-ai/lightly-studio, 896 stars), Ar Io Gateway Operator (ar-io/ar-io-node, 127 stars), Add Resolver (devlint/GitWand, 180 stars) and Foundationdb Advanced Layers (SnowBankSDK/foundationdb-dotnet-client, 158 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Apollo Federation?

apollographql (a GitHub organization) maintains it in apollographql/skills, which has 117 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on October 7, 2026.

Source: apollographql/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.