{"id":"d1c0e83d-13a9-46a1-b18c-7fc1b651f5e7","shortId":"T5cwut","kind":"skill","title":"Apollo Connectors","tagline":"Skills skill by Apollographql","description":"# Apollo Connectors Schema Assistant\n\n## MCP Tools\n\nIf GraphOS MCP Tools are available, use them:\n- **connectors-spec**: Fetch the complete Connectors specification before starting any connector work\n- **apollo_docs_search**: Search for relevant documentation\n- **apollo_docs_read**: Read specific documentation pages by slug\n\n**Documentation paths by topic:**\n- Requests: `/graphos/connectors/requests/url`, `/headers`, `/body`, `/batching`\n- Responses: `/graphos/connectors/responses/fields`, `/error-handling`\n- Mapping: `/graphos/connectors/mapping`, `/arrays`, `/enums`, `/literals`\n- Entities: `/graphos/connectors/entities`, `/patterns`\n\n## Process\n\nFollow this 5-step process. **DO NOT skip any steps.**\n\n### Step 1: Research\n\n- [ ] Understand the API being called and the structure of responses\n- [ ] Ask the user for example API responses if not provided\n- [ ] Fetch relevant documentation from MCP tools or reference files\n- [ ] DO NOT write any code until research is complete\n\n### Step 2: Implement\n\n- [ ] Create the schema using the template below\n- [ ] Follow the grammar, methods, and variables in the reference files\n- [ ] Ask clarifying questions if unsure about requirements\n\n### Step 3: Validate (Compose)\n\n- [ ] Run `rover supergraph compose --config ./supergraph.yaml`\n- [ ] Fix any composition errors before proceeding\n\n### Step 4: Execute\n\n- [ ] Run `rover connector run --schema <file> -c \"<Type.field>\" -v \"{}\"`\n- [ ] Verify the connector executes correctly\n\n### Step 5: Test\n\n- [ ] Create or update test files under `/tests/`\n- [ ] Run `rover connector test`\n- [ ] Ensure full test coverage for each connector\n\n## Schema Template\n\n```graphql\n# 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.\n\nextend schema\n  @link(url: \"https://specs.apollo.dev/federation/v2.12\")\n  @link(url: \"https://specs.apollo.dev/connect/v0.3\", import: [\"@source\", \"@connect\"])\n\n@source(name: \"api_name\", http: { baseURL: \"https://api.example.com\" })\n\ntype Query {\n  example(id: ID!): Example\n    @connect(\n      source: \"api_name\"\n      http: { GET: \"/example/{$args.id}\" }\n      selection: \"\"\"\n      id\n      name\n      \"\"\"\n    )\n}\n\ntype Example {\n  id: ID!\n  name: String\n}\n```\n\n**Version Requirements:** Always use `federation/v2.12` and `connect/v0.3` unless specified otherwise.\n\n## Reference Files\n\nBefore implementing connectors, read the relevant reference files:\n\n- [Grammar](references/grammar.md) - Selection mapping EBNF syntax\n- [Methods](references/methods.md) - Available transformation methods\n- [Variables](references/variables.md) - Available mapping variables\n- [Entities](references/entities.md) - Entity patterns and batching\n- [Validation](references/validation.md) - Rover commands for validation\n- [Troubleshooting](references/troubleshooting.md) - Common errors and solutions\n\n## Key Rules\n\n### Selection Mapping\n\n- Prefer sub-selections over `->map` for cleaner mappings\n- Do NOT use `$` 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","tags":["apollo","connectors","skills","apollographql"],"capabilities":["skill","source-apollographql","category-skills"],"categories":["skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/apollographql/skills/apollo-connectors","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"install_from":"skills.sh"}},"qualityScore":"0.300","qualityRationale":"deterministic score 0.30 from registry signals: · indexed on skills.sh · published under apollographql/skills","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill:v1","enrichmentVersion":1,"enrichedAt":"2026-04-22T18:40:53.502Z","embedding":null,"createdAt":"2026-04-18T20:36:00.807Z","updatedAt":"2026-04-22T18:40:53.502Z","lastSeenAt":"2026-04-22T18:40:53.502Z","tsv":"'+1':490 '/api':471 '/arrays':64 '/batch':502 '/batching':58 '/body':57 '/connect/v0.3':243 '/enums':65 '/error-handling':61 '/example':266 '/federation/v2.12':238 '/graphos/connectors/entities':68 '/graphos/connectors/mapping':63 '/graphos/connectors/requests/url':55 '/graphos/connectors/responses/fields':60 '/headers':56 '/literals':66 '/patterns':69 '/supergraph.yaml':158 '/tests':189 '1':82,445 '2':123 '3':150 '4':166 '5':73,181 'accept':531 'add':393 'ai':206 'alias':354 'alway':279,535,544,552 'api':86,99,249,262,499,539 'api.example.com':253 'apollo':1,7,34,41,211,573 'apollographql':6 'args.a':458,462 'args.id':267 'array':374 'ask':94,142,536 'assist':10 'author':474 'authorit':432 'avail':18,227,305,310 'b':452 'baseurl':252 'batch':318,487,493 'batch.id':505 'bearer':476 'bodi':455,456,460,503 'boolean':448 'c':173 'call':88 'category-skills' 'chang':551 'clarifi':143 'cleaner':342 'client':486 'code':117,543 'command':322 'common':327 'complet':26,121 'compos':152,156,466,549 'composit':161 'config':157,564 'connect':246,260,394,435,497 'connect/v0.3':283 'connector':2,8,22,27,32,170,177,192,200,212,219,291 'connectors-spec':21,218 'content':367 'convert':488 'correct':179,459 'coverag':197 'creat':125,183,406,423,553 'dev':570 'direct':350,369,387,520 'doc':35,42 'document':40,46,50,106 'e.g':421 'ebnf':301 'edit':229 'elv2':529 'elv2-license':528 'ensur':194 'entiti':67,313,315,392,402,407,425,428,554 'env':562 'env.api':477 'environ':566 'error':162,328 'exampl':98,256,259,272,538 'execut':167,178 'extend':232 'federation/v2.12':281 'fetch':24,104 'field':349,353,388,420,560 'fieldnam':363 'file':112,141,187,231,288,296 'firstnam':376 'fix':159 'follow':71,132 'forward':482 'friend':207 'full':195 'get':265,470 'grammar':134,297 'grapho':14 'graphql':203,468,494 'ground':513 'header':467,472 'hello':449 'http':251,264,469,500 'human':533 'id':257,258,269,273,274,384,390,413,419,504,507,509,510,559 'implement':124,290 'import':244 'key':331,404,478 'lastnam':378 'licens':530 'link':234,239 'liter':436,441 'local':575 'make':399,516 'map':62,300,311,334,340,343,365,444 'mcp':11,15,108,221 'method':135,303,307 'n':489 'name':248,250,263,270,275,385,391,473,479,508,511 'name.first':377 'name.last':379 'need':405 'nest':366 'never':515,526 'newnam':355 'note':204 'number':446 'object':453 'one':431 'originalfield':356 'otherwis':286 'page':47 'parent':410 'path':51 'pattern':316,491 'post':501 'prefer':335,561 'proceed':164 'process':70,75 'product':496 'productid':422 'provid':103 'queri':255 'question':144 'read':43,44,292 'refer':111,140,287,295 'references/entities.md':314 'references/grammar.md':298 'references/methods.md':304 'references/troubleshooting.md':326 'references/validation.md':320 'references/variables.md':309 'relationship':426,555 'relev':39,105,294 'renam':359 'request':54 'requir':148,278 'research':83,119 'respons':59,93,100,540 'result':375 'root':352,383 'router':574 'rover':154,169,191,321,547,569 'rule':332,514 'run':153,168,171,190,572 'schema':9,127,172,201,213,233 'search':36,37 'see':417,558 'select':268,299,333,338,348,362,372,389,411,506 'skill':3,4 'skip':78 'slug':49 'solut':330 'sourc':245,247,261,498 'source-apollographql' 'spec':23,220 'specif':28,45,525 'specifi':285 'specs.apollo.dev':237,242 'specs.apollo.dev/connect/v0.3':241 'specs.apollo.dev/federation/v2.12':236 'start':30 'step':74,80,81,122,149,165,180 'string':276,450,512 'structur':91 'stub':408 'sub':337,361,371 'sub-select':336,360,370 'subgraph':433 'supergraph':155,548 'syntax':302,518 'templat':130,202 'test':182,186,193,196 'tool':12,16,109,222 'topic':53 'transform':306 'troubleshoot':325 'true':447 'type':254,271,397,495 'understand':84 'unless':284 'unnecessari':382 'unsur':146 'updat':185 'url':235,240 'use':19,128,216,280,346,438,492,527,568 'user':96,412 'userid':414 'v':174 'valid':151,319,324,545 'valu':437,442,475,521 'variabl':137,308,312,567 'verifi':175 'version':277 'work':33 'wrapper':439 'write':115,542 'wrong':463 'x':481,485 'x-client':484 'x-forward':480","prices":[{"id":"ddd89a18-560e-4692-a9a6-32d961626423","listingId":"d1c0e83d-13a9-46a1-b18c-7fc1b651f5e7","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"apollographql","category":"skills","install_from":"skills.sh"},"createdAt":"2026-04-18T20:36:00.807Z"}],"sources":[{"listingId":"d1c0e83d-13a9-46a1-b18c-7fc1b651f5e7","source":"github","sourceId":"apollographql/skills/apollo-connectors","sourceUrl":"https://github.com/apollographql/skills/tree/main/skills/apollo-connectors","isPrimary":false,"firstSeenAt":"2026-04-18T22:17:20.886Z","lastSeenAt":"2026-04-22T12:56:30.885Z"},{"listingId":"d1c0e83d-13a9-46a1-b18c-7fc1b651f5e7","source":"skills_sh","sourceId":"apollographql/skills/apollo-connectors","sourceUrl":"https://skills.sh/apollographql/skills/apollo-connectors","isPrimary":true,"firstSeenAt":"2026-04-18T20:36:00.807Z","lastSeenAt":"2026-04-22T18:40:53.502Z"}],"details":{"listingId":"d1c0e83d-13a9-46a1-b18c-7fc1b651f5e7","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"apollographql","slug":"apollo-connectors","source":"skills_sh","category":"skills","skills_sh_url":"https://skills.sh/apollographql/skills/apollo-connectors"},"updatedAt":"2026-04-22T18:40:53.502Z"}}