Technical & DevelopmentIntermediate
apollo-federation
Write Apollo Federation 2 subgraph schemas and compose them into a ...
Developer Setup
Setup & Installation
bash
npx skills add https://github.com/apollographql/skills --skill apollo-federationnpx skills add https://github.com/apollographql/skills --skill apollo-federationOr paste this URL into your assistant to install:
Overview
What This Skill Does
Write Apollo Federation 2 subgraph schemas and compose them into a supergraph
Application
When to use this Skill
- Integrating apollo federation into your development workflow.
- Following best practices for write apollo federation 2 subgraph schemas and compose them into a supergraph.
- Automating repetitive tasks with AI-assisted tooling.
- Building production-grade applications with proper standards.
- Debugging and troubleshooting common implementation issues.
Documentation
Show Skills.md file
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:
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") |
Lines 1 - 25 of 103
Recommendations
Explore other random skills
EnterpriseAdvanced
query-token-audit
Audit token security to detect scams, honeypots, and malicious contracts across BSC, Base, Solana, and Ethereum
CreativeAdvanced
query-token-info
Search tokens and fetch metadata, real-time market data, and K-Line candlestick charts by keyword or contract address
CreativeIntermediate
trading-signal
Monitor on-chain Smart Money buy/sell signals with price, max gain, and exit rate data on Solana and BSC