graphql-federation

graphql-federation is a skill for Claude Code, Codex from wundergraph/graphql-federation-skill. It costs 134 tokens per session (2,009 once invoked), scanned A, original, Apache-2.0.

A guide for building GraphQL Federation subgraphs, which are separate GraphQL services combined into one graph. It explains entities, schema directives, composition rules, and how a router joins data from subgraphs.

In plain words
What is it for?
Creating subgraphs, defining entities with @key, extending types across services, and applying federation directives such as @external, @requires, and @shareable.
Why use it?
It helps prevent schema designs that fail when the separate services are composed into a single federated graph.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Creating subgraphs, defining entities with @key, extending types across services, and applying federation directives such as @external, @requires, and @shareable.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wundergraph/graphql-federation-skill/graphql-federation
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add wundergraph/graphql-federation-skill --skill graphql-federation
Clone the repo
git clone --depth 1 https://github.com/wundergraph/graphql-federation-skill

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin graphql-federation/plugin install graphql-federation after adding the marketplace above.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for graphql-federation

README.md
[![agentmods](https://agentmods.dev/badge/skills/wundergraph/graphql-federation-skill/graphql-federation/github.svg)](https://agentmods.dev/skills/wundergraph/graphql-federation-skill/graphql-federation)
Your own site
<a href="https://agentmods.dev/skills/wundergraph/graphql-federation-skill/graphql-federation"><img src="https://agentmods.dev/badge/skills/wundergraph/graphql-federation-skill/graphql-federation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for graphql-federation

Your own site · 80×15
<a href="https://agentmods.dev/skills/wundergraph/graphql-federation-skill/graphql-federation"><img src="https://agentmods.dev/badge/skills/wundergraph/graphql-federation-skill/graphql-federation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 134 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,009 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00134 $0.02009
Opus 5 $0.00067 $0.01005
Sonnet 5 $0.00027 $0.00402
Haiku 4.5 $0.00013 $0.00201

Measured 9d ago against content hash 22a9eb313a3d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

graphql-federation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/graphql-federation/SKILL.md · 341 lines

How it starts

The opening of the file, as written. The whole thing — 341 lines — stays where its author put it; the contents beside it link to each section on GitHub.

GraphQL Federation Skill

Create correct GraphQL federation subgraphs following WunderGraph Cosmo composition rules.

Core Concepts

Subgraph: A GraphQL microservice contributing to the federated graph. Federated Graph/Supergraph: The composed GraphQL interface for clients. Router: Plans operations, routes requests to subgraphs, joins data. Entity: A type with @key directive resolvable across subgraphs. Router Schema vs Client Schema: Router sees all fields; clients don't see @inaccessible items.

Essential Directives

@key - Define Entities

# Basic entity
type User @key(fields: "id") {
  id: ID!
  name: String!
}

# Multiple keys
type Product @key(fields: "id") @key(fields: "sku") {
  id: ID!
  sku: String!
  name: String!
}

# Composite key
type Review @key(fields: "author { id } product { id }") {
  author: User!
  product: Product!
  rating: Int!
}

# Non-resolvable key (reference only, can't resolve this entity)
type User @key(fields: "id", resolvable: false) {
  id: ID!
}

Key Rules:

  • Key fields cannot have arguments
  • Key fields cannot be abstract types (interfaces/unions)
  • Key fields must select leaf scalars or nested objects with selections
  • Multiple keys provide alternative resolution paths

@shareable - Allow Multiple Definitions

# When same field exists in multiple subgraphs
type User @key(fields: "id") {
  id: ID!
  name: String! @shareable  # Can be defined in other subgraphs
}

# Object-level shareable applies to all fields
type User @key(fields: "id") @shareable {
  id: ID!
  name: String!
  email: String!
}

Shareable Rules:

  • Fields defined in multiple subgraphs MUST be @shareable
  • Key fields used in other subgraphs' keys must be @shareable
  • Root type fields (Query, Mutation) are implicitly shareable

@external - Reference External Fields

# Mark fields resolved by another subgraph
extend type User @key(fields: "id") {
  id: ID! @external
  name: String! @external
  reviews: [Review!]!  # This subgraph resolves reviews
}

Read the full file on GitHub · 341 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 341 lines · 134 tokens per session scan A 22a9eb313a3d

Subscribe to this mod's changes

graphql-federation is a skill published in the GitHub repository wundergraph/graphql-federation-skill (7 stars, last pushed 6mo ago), licensed Apache-2.0. It adds 134 tokens to every session and 2,009 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories