agentleFS
ku5icku5ic/claude-kit/skills/graphql-patterns/SKILL.md

graphql-patterns

Skill2 starsChanged 7 days agoMITView on GitHub

GraphQL client patterns for operation and fragment authoring, typed documents with graphql-codegen's client preset, Apollo Client 4 caching and error handling, and review-time anti-patterns. Use whenever the project contains `.graphql`/`.gql` files, a `codegen.ts`, or `graphql`, `@apollo/client`, `urql`, or `graphql-request` in `package.json`, OR the user asks about GraphQL queries, mutations, fragments, the Apollo cache, or generated GraphQL types, even if GraphQL is not mentioned by name.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Default assumption: a TypeScript client on Apollo Client 4.3 with documents typed by @graphql-codegen/client-preset 6.x.

    line 8
  2. Very specific:

    Document rules (reference/documents.md) hold for every client: Apollo, urql, graphql-request.

    line 10

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

GraphQL patterns

Default assumption: a TypeScript client on Apollo Client 4.3 with documents typed by @graphql-codegen/client-preset 6.x.

  • Document rules (reference/documents.md) hold for every client: Apollo, urql, graphql-request.
  • Apollo Client 3 projects: the v4 deltas (entry points, the unified error, LocalState) are called out in reference/apollo-client.md.
  • Adapt advice to the version in the project's package.json or lockfile.

Reference files

FileCovers
reference/documents.mdOperation names, variables, fragments and colocation
reference/codegen.mdClient preset config, the graphql() function, fragment masking
reference/apollo-client.mdv4 entry points, error handling, errorPolicy, fetch policies, cache normalization
reference/anti-patterns.mdSix review-time anti-patterns with severity calls

References

Version notes

Checked: 2026-09-26 against npm registry, Context7 /apollographql/apollo-client and /dotansimha/graphql-code-generator

  • @apollo/client 4.3.1 (2026-09-18), 4.0.0 (2025-08-21): v4 moved React hooks to @apollo/client/react, replaced ApolloError with CombinedGraphQLErrors and a single error property, and moved local resolvers to LocalState.
  • @graphql-codegen/client-preset 6.2.0 (2026-09-13), @graphql-codegen/cli 7.4.3 (2026-09-24): no guidance change.
  • graphql (graphql-js) 17.0.2; 17.0.0 (2026-06-15) followed 16.14. Server-side changes are out of this pack's scope.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.