brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
when selecting fields directly from root\n- Field aliasing: `newName: originalField` (only when renaming)\n- Sub-selection: `fieldName { ... }` (to map nested content)\n\n```\n# DO - Direct sub-selection for arrays\n$.results {\n firstName: name.first\n lastName: name.last\n}\n\n# DO NOT - Unnecessary root $\n$ {\n id\n name\n}\n\n# DO - Direct field selection\nid\nname\n```\n\n### Entities\n\n- Add `@connect` on a type to make it an entity (no `@key` needed)\n- Create entity stubs in parent selections: `user: { id: userId }`\n- When you see an ID field (e.g., `productId`), create an entity relationship\n- Each entity should have ONE authoritative subgraph with `@connect`\n\n### Literal Values\n\nUse `$()` wrapper for literal values in mappings:\n\n```\n$(1) # number\n$(true) # boolean\n$(\"hello\") # string\n$({\"a\": \"b\"}) # object\n\n# In body\nbody: \"$({ a: $args.a })\" # CORRECT\nbody: \"{ a: $args.a }\" # WRONG - will not compose\n```\n\n### Headers\n\n```graphql\nhttp: {\n GET: \"/api\"\n headers: [\n { name: \"Authorization\", value: \"Bearer {$env.API_KEY}\" },\n { name: \"X-Forwarded\", from: \"x-client\" }\n ]\n}\n```\n\n### Batching\n\nConvert N+1 patterns using `$batch`:\n\n```graphql\ntype Product @connect(\n source: \"api\"\n http: {\n POST: \"/batch\"\n body: \"ids: $batch.id\"\n }\n selection: \"id name\"\n) {\n id: ID!\n name: String\n}\n```\n\n## Ground Rules\n\n- NEVER make up syntax or directive values not in this specification\n- NEVER use `--elv2-license accept` (for humans only)\n- ALWAYS ask for example API responses before writing code\n- ALWAYS validate with `rover supergraph compose` after changes\n- ALWAYS create entity relationships when you see ID fields\n- Prefer `$env` over `$config` for environment variables\n- Use `rover dev` for running Apollo Router locally\n","licenseDocuments":[]}}
apollo-connectorsDEPRECATED: 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 us…
Independent GitHub snapshot · Automated classification · Original documentation governs
Deprecated. This skill is superseded by the 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 theapollo-skillsplugin 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.
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.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
}
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:
/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./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.
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 locally