1. Habit
  2. Skills
  3. GraphQL Operations Guide skill
apollographql · 4K installs

GraphQL Operations Guide skill
Runs by itself, operations change.

Operations match the schema and lint.

Install the GraphQL Operations Guide skill and make it a habit: follow https://gethabit.dev/skills/apollographql/graphql-operations.md

  1. 1Copy
  2. 2Paste into Claude Code, Codex or Cursor
  3. 3It runs by itself

4K installs118 starsMIT licenceSource on GitHub ↗

GraphQL Operations Guide

by apollographql · 4K installs

The skill

GraphQL Operations Guide (the graphql-operations skill) guides writing queries, mutations and fragments against the project schema: named operations, variables, lean field selection, fragments and type generation.

Only when you ask.

The habit

Operations match the schema and lint.

↻ Runs by itselfoperations change

How the habit works.
You don't have to.

Three questionsWhen does it start? How does it check its work? What does it remember?

One run, step by step.
Then it stops.

Stop ruleStops after one change set per run, with at most 2 fix retries.

  1. 01

    Find the schema

    Your agent finds the schema from codegen.ts, graphql.config or apollo.config, or the SDL files.

  2. 02

    Check fields

    It confirms every field, argument and enum value used is defined by the schema.

  3. 03

    Check naming

    It confirms each operation is named and uses variables instead of hardcoded values.

  4. 04

    Check selection

    It flags over-fetching and confirms id is requested on cacheable types.

  5. 05

    Run codegen

    It runs type generation to confirm the operations are type-safe.

  6. 06

    Lint

    It runs the GraphQL linter and records any findings in the run log.

What it may do.
Nothing more.

Safe by defaultIt writes only in its own folder and asks you before anything goes out.

Is it for you?
Use it when it fits.

Quick checkRead both lists. If the left one sounds like you, the GraphQL Operations Guide skill helps.

Use it when

  • ✓ writing GraphQL queries or mutations
  • ✓ organizing operations with fragments
  • ✓ setting up type generation or linting

Skip it when

  • – you work on the server schema only
  • – the project has no GraphQL

Questions

GraphQL Operations Guide skill, answered.

Does it change the server schema?

No. It writes operations against the existing schema and leaves the server schema unchanged unless you ask.

Why name every operation?

Named operations are easier to trace, cache and lint; the skill treats anonymous operations as a thing to avoid.

How do I install the GraphQL Operations Guide skill?

Copy the prompt at the top into your agent. It installs the skill from apollographql/skills and sets up the habit. Or run npx skills add apollographql/skills --skill graphql-operations.

Is the GraphQL Operations Guide skill free?

Yes. It is published under MIT. Habit is free too.

GraphQL Operations Guide. Now as a habit.

Install the GraphQL Operations Guide skill and make it a habit: follow https://gethabit.dev/skills/apollographql/graphql-operations.md

  • Free
  • No account
  • Undo in one line

All apollographql skills →More code skills →

Works in

  • Claude Code
  • Codex
  • Cursor
  • ChatGPT
  • Claude app

Made by apollographql, published under MIT. Habit links to the original and never changes it. Is this your skill?

Copying didn't work here. Select the line and copy it by hand.