Command Palette

Search for a command to run...

Назад к скиллам
скилл № 70318

GraphQL

Designs, debugs, and hardens GraphQL schemas, resolvers, and clients: N+1 batching, nullability, cost limits, subscriptions, federation. Use when writing or…

БесплатноБез исполняемых скриптов
clawicот clawic★ 23 звезды на GitHub

Установить GraphQL в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

User preferences and memory live in ~/Clawic/data/graphql/ (see setup.md on first use, memory-template.md for the file format). If you have data at an old location (~/graphql/ or ~/clawic/graphql/), move it to ~/Clawic/data/graphql/, and say in one line that you moved it and from where.

When To Use

  • Writing or reviewing a schema, SDL, resolvers, mutations, or a Relay-style connection
  • Diagnosing GraphQL-specific failures: N+1 query storms, non-null propagation blanking a response, partial data with errors, caches that never update
  • Hardening a public or partner endpoint: depth, alias, token and complexity limits, trusted documents, introspection policy, error masking
  • Evolving a live schema without breaking clients: deprecation, breaking-change checks in CI, field usage telemetry
  • Splitting or composing a graph: federation subgraphs, entity keys, reference resolvers
  • Not for calling somebody else's GraphQL API (their rate limits, their cursors, their auth) — that is api; not for REST resource design — that is rest-api

Quick Reference

Situation Play
One list query fires hundreds of SQL statements A per-request DataLoader on every relation field (→ n-plus-one.md), never a module-level loader
Cannot return null for non-nullable field X.y The resolver returned null or threw; the error climbs to the nearest nullable ancestor (→ Null Propagation)
Response has data AND errors Normal. Branch on errors[].extensions.code, never on the message (→ Error Codes, errors.md)
Whole response is data: null Every ancestor up to the root field was non-null — make one of them nullable (→ Null Propagation)
Designing a list field Relay connection with first/after, capped at max_page_size (→ pagination.md)
Designing a mutation <Verb><Entity>Input in, payload with the modified entity plus typed user errors out (→ mutations.md)
Public endpoint, unknown clients Trusted documents first, cost limits second (→ security.md, Cost Model)
Deciding who may see a field Enforce inside the resolver on the loaded row, not at the gateway (→ authorization.md)
Apollo/Relay cache stale after a mutation The payload lacks id + __typename, or the change was a list insert (→ client.md)
Subscription never fires, or fires once and dies Protocol mismatch, single-instance pub/sub, or expired connection token (→ subscriptions.md)
PersistedQueryNotFound in a loop APQ hash mismatch between client, server and CDN (→ caching.md)
Same entity resolved by two services Federation entity keys and reference resolvers (→ federation.md)
Schema change about to ship Run the breaking-change matrix and a check against recorded operations (→ schema-evolution.md)
Types drifting from the schema Generate them; never hand-write resolver or operation types (→ codegen.md)
"Should this be GraphQL at all" Cost-benefit against a REST or BFF baseline (→ rest-migration.md)
Anything else Reproduce with the smallest document that still fails, then delete one field at a time until it passes — the field you deleted names the file to open

Depth on demand: debug.md symptom→cause chains · schema.md type design · resolvers.md execution and context · n-plus-one.md batching · pagination.md connections and cursors · mutations.md writes and uploads · errors.md failure modelling · authorization.md access control · security.md DoS and disclosure · performance.md cost and latency · caching.md HTTP, CDN, APQ, entity cache · subscriptions.md realtime · federation.md multi-service graphs · client.md Apollo, Relay, urql · codegen.md typed schema and operations · testing.md tests that catch real regressions · schema-evolution.md shipping changes safely · production.md transport, timeouts, observability · rest-migration.md adoption and coexistence · commands.md toolkit.

Core Rules

  1. Every field that touches a datastore goes through a per-request batch loader. Round trips without batching for a page of N parents each exposing M relation fields: 1 + N×M; with loaders: 1 + M. A page of 50 posts with author and comments is 101 queries versus 3. Build loaders in the per-request context factory — a module-level loader caches one viewer's rows and serves them to the next request (→ n-plus-one.md).
  2. Nullable by default; non-null only where the value cannot fail. String! is a promise about your worst day, not your happy path. A non-null field that resolves to null nulls its nearest nullable ancestor, and [Post!]! turns one bad row into a nulled branch (→ Null Propagation).
  3. Every list field is paginated and capped. Reject first > max_page_size (default 100) with a BAD_USER_INPUT error inside the resolver; clamping without saying so is only safe when clients terminate on pageInfo.hasNextPage rather than on how many items came back. An uncapped list
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • _meta.json
  • authorization.md
  • caching.md
  • client.md
  • codegen.md
  • commands.md
  • debug.md
  • errors.md
  • federation.md
  • memory-template.md
  • mutations.md
  • n-plus-one.md
  • pagination.md
  • performance.md
  • production.md
  • resolvers.md
  • rest-migration.md
  • schema-evolution.md
  • schema.md
  • security.md
  • setup.md
  • subscriptions.md
  • testing.md

FAQ

Что делает скилл GraphQL?

Designs, debugs, and hardens GraphQL schemas, resolvers, and clients: N+1 batching, nullability, cost limits, subscriptions, federation. Use when writing or reviewing a schema, SDL, or resolvers; when a query is slow or fires hundreds of database queries; when the response says "Cannot return null for non-nullable field", comes back with an errors array, or nulls a whole branch; when designing mutations, cursor pagination, custom scalars, unions, or input types; when an Apollo, Relay, or urql cache will not update after a mutation; when subscriptions drop or never fire; when adding depth, alias, complexity, or persisted-query limits, disabling introspection, or masking errors; when a schema change breaks clients; or when composing Apollo Federation subgraphs and entity references. Not for consuming someone else's GraphQL API (api) or for designing REST endpoints (rest-api).

Как установить скилл GraphQL?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл GraphQL запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить GraphQL с