apollo-connectors
This skill helps integrate REST APIs into GraphQL supergraphs using Apollo Connectors with @source and @connect directives.
Identity proven by a skills index on apollographql.com
- Agents
- Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode, claude.ai and API
- License
- MIT (permissive)
- Pin
- 5f02fcfpinned Oct 9, 2026
- Context cost
- about 1,600 tokenswhen the skill loads
- GitHub stars
- 117on apollographql/skills
- Scripts
- None found
What it does
“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 and verification. Guide for integrating REST APIs into GraphQL supergraphs using Apollo Connectors with @source and @connect directives. Use this skill when the user: (1) mentions "connectors", "Apollo Connectors", or "REST Connector", (2) wants to integrate a REST API into GraphQL, (3) references @source or @connect directives, (4) works with files containing "# Note to AI Friends: This is an Apollo Connectors schema".”
Generated summary from the skill's own text
This skill helps integrate REST APIs into GraphQL supergraphs using Apollo Connectors with @source and @connect directives. It provides a 5-step process for implementing connector schemas, from research through validation and testing. The skill is deprecated and recommends users install the graphos-factory skill instead for building new connector subgraphs.
When to use it
- Making quick edits to an existing Apollo Connectors schema
- Adding REST API endpoints to a GraphQL supergraph
- Working with @source and @connect directives in schemas
- Debugging or maintaining current Connectors implementations
When not to
- Building a new connector subgraph from scratch, use graphos-factory instead
- Projects without rover CLI installed
- Extending or creating major connector features
Install
These commands install from the publisher's repository and need no account.
skills CLI
npx skills add apollographql/skills --skill apollo-connectorsInstalls from the repository's default branch, which may have changed since the commit we checked.
GitHub CLI 2.90 or later
gh skill install apollographql/skills apollo-connectors@5f02fcfcebec678e2e55777b639e32346622a963Installs the commit we checked (5f02fcf).
Copy by hand
Download the folder at 5f02fcf and put it in .claude/skills/apollo-connectors for Claude Code and in .agents/skills/apollo-connectors for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.
Claude Code plugin
/plugin install apollo-skills@claude-plugins-officialThe publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.
Copy for your agent
A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.
Prompt
Install the agent skill "apollo-connectors" by Apollo GraphQL. Source, pinned to commit 5f02fcfcebec678e2e55777b639e32346622a963: https://github.com/apollographql/skills/tree/5f02fcfcebec678e2e55777b639e32346622a963/skills/apollo-connectors 1. Download that folder at exactly this commit. Do not use the default branch. 2. Copy every file unchanged, keeping the folder structure, into .claude/skills/apollo-connectors/ for Claude Code and .agents/skills/apollo-connectors/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist. 3. Do not edit the files, and do not run any script in the folder unless I ask you to. 4. When you are done, list the files you copied and where you put them. Listing and checks: https://www.agentnative.dev/skills/apollo-graphql/apollo-connectors
SKILL.md at the pin
---
name: apollo-connectors
description: >
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 and verification.
Guide for integrating REST APIs into GraphQL supergraphs using Apollo Connectors
with @source and @connect directives. Use this skill when the user:
(1) mentions "connectors", "Apollo Connectors", or "REST Connector",
(2) wants to integrate a REST API into GraphQL,
(3) references @source or @connect directives,
(4) works with files containing "# Note to AI Friends: This is an Apollo Connectors schema".
license: MIT
compatibility: Requires rover CLI installed. Works with Claude Code and similar AI coding assistants.
metadata:
author: apollographql
version: "1.1.2"
allowed-tools: Bash(rover:*) Read Write Edit Glob Grep
---
# Apollo Connectors Schema Assistant
> **Deprecated.** This skill is superseded by the
> [graphos-factory](https://github.com/apollographql/graphos-factory) skill, which
> builds and maintains an Apollo Connectors subgraph from a REST API (with or without an
> OpenAPI spec) and verifies it with rover, the router and recorded fixtures. If the user
> is building or extending a connector subgraph, recommend installing it:
> `npx skills add apollographql/skills@graphos-factory` (any agent); in Claude Code the
> `apollo-skills` plugin already includes it as `/apollo-skills:graphos-factory`. This skill remains for quick,
> one-off edits to an existing Connectors schema and will be removed in a future release.
## MCP Tools
If GraphOS MCP Tools are available, use them:
- **connectors-spec**: Fetch the complete Connectors specification before starting any connector work
- **apollo_docs_search**: Search for relevant documentation
- **apollo_docs_read**: Read specific documentation pages by slug
**Documentation paths by topic:**
- Requests: `/graphos/connectors/requests/url`, `/headers`, `/body`, `/batching`
- Responses: `/graphos/connectors/responses/fields`, `/error-handling`
- Mapping: `/graphos/connectors/mapping`, `/arrays`, `/enums`, `/literals`
- Entities: `/graphos/connectors/entities`, `/patterns`
## Process
Follow this 5-step process. **DO NOT skip any steps.**
### Step 1: Research
- [ ] Understand the API being called and the structure of responses
- [ ] Ask the user for example API responses if not provided
- [ ] Fetch relevant documentation from MCP tools or reference files
- [ ] DO NOT write any code until research is complete
### Step 2: Implement
- [ ] Create the schema using the template below
- [ ] Follow the grammar, methods, and variables in the reference files
- [ ] Ask clarifying questions if unsure about requirements
### Step 3: Validate (Compose)
- [ ] Run `rover supergraph compose --config ./supergraph.yaml`
- [ ] Fix any composition errors before proceeding
### Step 4: Execute
- [ ] Run `rover connector run --schema <file> -c "<Type.field>" -v "{}"`
- [ ] Verify the connector executes correctly
### Step 5: Test
- [ ] Create or update test files under `/tests/`
- [ ] Run `rover connector test`
- [ ] Ensure full test coverage for each connector
## Schema Template
```graphql
# 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.15")
@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
Use the latest Long-Term Support (LTS) versions of Apollo Federation and Apollo Connectors. Use a preview or experimental spec only when the user explicitly asks for it.
Confirm the current LTS before writing `@link` URLs or `federation_version`. Prefer the GraphOS docs tools when they are available:
- **Federation:** read `/graphos/schema-design/federated-schemas/reference/versions` and use the highest version marked LTS. That version is the schema `@link` (`https://specs.apollo.dev/federation/vX.Y`). Set `federation_version` in `supergraph.yaml` to the latest patch of that same LTS line.
- **Connectors:** read `/graphos/connectors/getting-started/version-requirements` and `/graphos/connectors/reference/changelog`. Use the latest Connectors spec that is generally available (not marked experimental) and compatible with that Federation LTS (`https://specs.apollo.dev/connect/vX.Y`).
The template above uses the current LTS: Federation `v2.15` and Connectors `v0.3`. If the docs list a newer LTS, use the docs.
## Reference Files
Before implementing connectors, read the relevant reference files:
- [Grammar](references/grammar.md) - Selection mapping EBNF syntax
- [Methods](references/methods.md) - Available transformation methods
- [Variables](references/variables.md) - Available mapping variables
- [Entities](references/entities.md) - Entity patterns and batching
- [Validation](references/validation.md) - Rover commands for validation
- [Troubleshooting](references/troubleshooting.md) - Common errors and solutions
## Key Rules
### Selection Mapping
- Prefer sub-selections over `->map` for cleaner mappings
- Do NOT use `$` when selecting fields directly from root
- Field aliasing: `newName: originalField` (only when renaming)
- Sub-selection: `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
```
### Entities
- Add `@connect` on a type to make it an entity (no `@key` needed)
- Create entity stubs in parent selections: `user: { id: userId }`
- When you see an ID field (e.g., `productId`), create an entity relationship
- Each entity should have ONE authoritative subgraph with `@connect`
### Literal Values
Use `$()` 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
```
### Headers
```graphql
http: {
GET: "/api"
headers: [
{ name: "Authorization", value: "Bearer {$env.API_KEY}" },
{ name: "X-Forwarded", from: "x-client" }
]
}
```
### Batching
Convert N+1 patterns using `$batch`:
```graphql
type Product @connect(
source: "api"
http: {
POST: "/batch"
body: "ids: $batch.id"
}
selection: "id name"
) {
id: ID!
name: String
}
```
## Ground Rules
- NEVER make up syntax or directive values not in this specification
- NEVER use `--elv2-license accept` (for humans only)
- ALWAYS ask for example API responses before writing code
- ALWAYS validate with `rover supergraph compose` after changes
- ALWAYS create entity relationships when you see ID fields
- Prefer `$env` over `$config` for environment variables
- Use `rover dev` for running Apollo Router locally
From apollographql/skills at 5f02fcf, shown as plain text under its license: MIT (permissive). The license text is in skills/apollo-connectors/SKILL.md.
View SKILL.md on GitHub at 5f02fcfFiles
- SKILL.md7.3 KB · 0bc198f8438a
- references/
- entities.md7.1 KB · b1867dc53b7d
- grammar.md4.0 KB · aea9ec3e60c9
- methods.md5.7 KB · 054cdb4b0534
- troubleshooting.md8.4 KB · dc2aa6412b88
- validation.md8.0 KB · fc4bbeaba8f9
- variables.md7.3 KB · 29e00f73cb00
7 files, 48 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.
Skill folder on GitHub at 5f02fcfMore from Apollo GraphQL
apollo-client
This skill guides building React applications with Apollo Client 4.x for managing GraphQL queries, mutations, and state.
Claude Code, Codex, Cursor +4 · about 1.7K tokens · pinned 7 days ago
apollo-federation
This skill guides agents in authoring Apollo Federation subgraph schemas using Federation 2.x directives like @key, @shareable, @external, and @requires.
Claude Code, Codex, Cursor +4 · about 830 tokens · pinned 7 days ago
apollo-ios
This skill guides building GraphQL-powered Apple apps with Apollo iOS, a strongly-typed Swift client.
Contains scripts
Claude Code · about 1.8K tokens · pinned 7 days ago
apollo-kotlin
This skill guides building GraphQL applications with Apollo Kotlin, a strongly typed client library for Android, JVM, and Kotlin Multiplatform projects.
Contains scripts
Claude Code, Codex, Cursor +3 · about 370 tokens · pinned 7 days ago
apollo-router
Generates version-correct Apollo Router configuration (v1.x or v2.x) for federated GraphQL supergraphs.
Claude Code, Codex, Cursor +4 · about 5.1K tokens · pinned 7 days ago
apollo-router-plugin-creator
This skill guides creating native Rust plugins for Apollo Router.
Claude Code, Codex, Cursor +4 · about 3.9K tokens · pinned 7 days ago
Related in Backend and APIs
api-integration-surface-strategy
Helps platform teams decide which integration surfaces to build, REST, GraphQL, webhooks, SDKs, MCP, SQL, embedded components, and in what order, guided by…
by samberCommunity
Claude Code, Codex, Cursor +4 · about 4.2K tokens · pinned 7 days ago
supabase
This skill enables the agent to work with Supabase products including Database, Auth, Edge Functions, Realtime, Storage, and Vectors.
by SupabaseOfficial publisher
Claude Code, Codex, Cursor +4 · about 3.3K tokens · pinned 7 days ago
shopify-admin
This skill is deprecated and has been replaced by the shopify skill.
by ShopifyOfficial publisher
Claude Code, Codex, Cursor +4 · about 66 tokens · pinned 7 days ago
shopify-customer
This skill is deprecated and no longer maintained.
by ShopifyOfficial publisher
Claude Code, Codex, Cursor +4 · about 69 tokens · pinned 7 days ago
vercel-connect
Vercel Connect lets applications obtain short-lived scoped credentials from third-party services like Slack, GitHub, and Linear without storing API keys in…
by VercelOfficial publisher
Claude Code, Codex, Cursor +3 · about 4.4K tokens · pinned 7 days ago
commerce-app-api-mesh
This skill scaffolds or updates an Adobe API Mesh configuration to extend a Commerce GraphQL schema with new fields resolved by runtime actions or external…
by Adobe, Inc.Official publisher
Claude Code, Codex, Cursor +4 · about 2.1K tokens · pinned 7 days ago