graphql-conventions
Step 6 of the pipeline (WORKFLOW.md). Frames the design and review of a GraphQL API, whatever the server
language; skills/api-design stays the block for HTTP and gRPC contracts. Every rule below holds in a repo with
nothing installed (CONVENTIONS.md, rule A). Special status: like go-conventions, no in-house
production experience sits behind this block yet. The content comes from the GraphQL project's learning
guides, read on 2026-10-02 on their main branch; the guides themselves say they are conventions, not gospel, and
the GraphQL-over-HTTP specification they cite was still a draft, so treat this as a base to confront with the
first real GraphQL service, not as proven doctrine.
When
As soon as a schema, a resolver, a mutation, a pagination field or the HTTP serving of a GraphQL endpoint is
designed or modified, during design or code (6).
Steps
Read only the sections the task touches. One file per section under references/.
| § |
Covers |
Read it when |
File |
| 1 |
Schema: naming, nullability, mutations, pagination, evolution |
a type, a field, an argument, a mutation or a deprecation is written |
01-schema-design.md |
| 2 |
Server: errors, authorization, batching, HTTP, demand control |
a resolver, an error path, an authorization check, the endpoint or an abuse limit is written |
02-server-security.md |
Output / checkpoint
A schema and resolvers compliant with the sections read; the project's schema lint and breaking-change check
green where it has them; every list field either paginated or bounded; no authorization decision inside a
resolver body. Checked by gate (7) and review (8). Where the project cannot run its toolchain (no
environment), the checkpoint records it rather than reporting a pass, and nothing is installed to make it run
(CONVENTIONS.md: a block names a dependency and stops).
Guardrails
No comments in the code produced (schema descriptions are documentation and stay). These rules govern new
schema; a published field is never removed or retyped to satisfy a rule, it is deprecated (§1.9). Never loosen a
limit or an authorization rule to get a diff through. For the error body outside GraphQL and for
idempotency, skills/api-design; for authentication and sessions, skills/auth-session-conventions.
Origin
Rewritten from the GraphQL project's learning guides; the full provenance, licence and the audit of what was left
out are in references/origin.md. Read it when checking a rule's freshness, not when
applying one.
1---2name: graphql-conventions3description: "Use when designing or reviewing a GraphQL API: schema naming and nullability, mutation payloads, pagination, evolving the schema without versions, errors, authorization placement, batching and demand control."4paths: "**/*.graphql, **/*.gql, **/schema.*, **/resolvers/**, **/graphql/**"5metadata:6 source: https://skillmd.com/skills/techmefr/graphql-conventions7---89# graphql-conventions1011Step 6 of the pipeline (`WORKFLOW.md`). Frames the design and review of a GraphQL API, whatever the server12language; `skills/api-design` stays the block for HTTP and gRPC contracts. Every rule below holds in a repo with13**nothing installed** (`CONVENTIONS.md`, rule A). **Special status**: like `go-conventions`, no in-house14production experience sits behind this block yet. The content comes from the GraphQL project's learning15guides, read on 2026-10-02 on their main branch; the guides themselves say they are conventions, not gospel, and16the GraphQL-over-HTTP specification they cite was still a draft, so treat this as a base to confront with the17first real GraphQL service, not as proven doctrine.1819## When20As soon as a schema, a resolver, a mutation, a pagination field or the HTTP serving of a GraphQL endpoint is21designed or modified, during `design` or `code` (6).2223## Steps2425**Read only the sections the task touches.** One file per section under `references/`.2627| § | Covers | Read it when | File |28|---|---|---|---|29| 1 | Schema: naming, nullability, mutations, pagination, evolution | a type, a field, an argument, a mutation or a deprecation is written | [`01-schema-design.md`](./references/01-schema-design.md) |30| 2 | Server: errors, authorization, batching, HTTP, demand control | a resolver, an error path, an authorization check, the endpoint or an abuse limit is written | [`02-server-security.md`](./references/02-server-security.md) |3132## Output / checkpoint33A schema and resolvers compliant with the sections read; the project's schema lint and breaking-change check34green where it has them; every list field either paginated or bounded; no authorization decision inside a35resolver body. Checked by `gate` (7) and `review` (8). Where the project cannot run its toolchain (no36environment), the checkpoint records it rather than reporting a pass, and nothing is installed to make it run37(`CONVENTIONS.md`: a block names a dependency and stops).3839## Guardrails40No comments in the code produced (schema descriptions are documentation and stay). These rules govern **new**41schema; a published field is never removed or retyped to satisfy a rule, it is deprecated (§1.9). Never loosen a42limit or an authorization rule to get a diff through. For the error body outside GraphQL and for43idempotency, `skills/api-design`; for authentication and sessions, `skills/auth-session-conventions`.4445## Origin46Rewritten from the GraphQL project's learning guides; the full provenance, licence and the audit of what was left47out are in [`references/origin.md`](./references/origin.md). Read it when checking a rule's freshness, not when48applying one.