From apollo-skills
Guides integrating REST APIs into GraphQL supergraphs using Apollo Connectors with @source/@connect directives. Follows a 5-step process with rover CLI validation.
How this skill is triggered — by the user, by Claude, or both
Slash command
/apollo-skills:apollo-connectorsThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
If GraphOS MCP Tools are available, use them:
If GraphOS MCP Tools are available, use them:
Documentation paths by topic:
/graphos/connectors/requests/url, /headers, /body, /batching/graphos/connectors/responses/fields, /error-handling/graphos/connectors/mapping, /arrays, /enums, /literals/graphos/connectors/entities, /patternsFollow this 5-step process. DO NOT skip any steps.
rover supergraph compose --config ./supergraph.yamlrover connector run --schema <file> -c "<Type.field>" -v "{}"/tests/rover connector test# Note to AI Friends: This is an Apollo Connectors schema. You should use your connectors-spec MCP tool if you have it available before editing this file.
extend schema
@link(url: "https://specs.apollo.dev/federation/v2.12")
@link(url: "https://specs.apollo.dev/connect/v0.3", import: ["@source", "@connect"])
@source(name: "api_name", http: { baseURL: "https://api.example.com" })
type Query {
example(id: ID!): Example
@connect(
source: "api_name"
http: { GET: "/example/{$args.id}" }
selection: """
id
name
"""
)
}
type Example {
id: ID!
name: String
}
Version Requirements: Always use federation/v2.12 and connect/v0.3 unless specified otherwise.
Before implementing connectors, read the relevant reference files:
->map for cleaner mappings$ when selecting fields directly from rootnewName: originalField (only when renaming)fieldName { ... } (to map nested content)# DO - Direct sub-selection for arrays
$.results {
firstName: name.first
lastName: name.last
}
# DO NOT - Unnecessary root $
$ {
id
name
}
# DO - Direct field selection
id
name
@connect on a type to make it an entity (no @key needed)user: { id: userId }productId), create an entity relationship@connectUse $() wrapper for literal values in mappings:
$(1) # number
$(true) # boolean
$("hello") # string
$({"a": "b"}) # object
# In body
body: "$({ a: $args.a })" # CORRECT
body: "{ a: $args.a }" # WRONG - will not compose
http: {
GET: "/api"
headers: [
{ name: "Authorization", value: "Bearer {$env.API_KEY}" },
{ name: "X-Forwarded", from: "x-client" }
]
}
Convert N+1 patterns using $batch:
type Product @connect(
source: "api"
http: {
POST: "/batch"
body: "ids: $batch.id"
}
selection: "id name"
) {
id: ID!
name: String
}
--elv2-license accept (for humans only)rover supergraph compose after changes$env over $config for environment variablesrover dev for running Apollo Router locallynpx claudepluginhub apollographql/skills --plugin apollo-skillsDesigns GraphQL schemas with Apollo Federation, implements resolvers using DataLoader, and optimizes query performance. Useful for schema-first design, real-time subscriptions, and query complexity analysis.
Provides patterns for building GraphQL APIs with Apollo Server, covering schema design, resolvers, data sources, federation, error handling, and production setup.
Generates version-correct YAML config for Apollo Router v1.x and v2.x. Guides setup of CORS, JWT auth, telemetry, Rhai scripts, coprocessors, and connectors.