Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Graphql Apis?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ansh44233-graphql-apis)
---
description: Design and change GraphQL schemas and resolvers: nullability, pagination, N+1 with DataLoader, auth and limits
profile: standard
tags: graphql, api
---
# GraphQL APIs
Use when changing a GraphQL schema or resolvers.
## Schema design
- Make fields non-null only when they truly always resolve; a non-null field that errors nulls out its parent.
- Cursor-based pagination (connections with `edges`, `node`, `pageInfo`) for lists that can grow.
- Input types for mutations, and mutation payloads that return the changed object plus user-facing errors.
- Evolve without breaking clients: add fields, deprecate with `@deprecated(reason: ...)`, remove only after usage drops. Check with a schema diff tool (graphql-inspector) in CI.
## Resolvers
- Batch and cache per request with DataLoader to avoid N+1 queries; create loaders per request, never globally.
- Authorize inside resolvers or the service layer for each object, not only at the top-level query.
- Keep resolvers thin; call service functions that are tested on their own.
## Protection
Depth and complexity limits, persisted queries or an allow-list for public APIs, timeouts on resolvers, and introspection disabled in production if the API is private. Do not leak internal error messages.
## Verify
Schema check (codegen or `graphql-inspector diff`), resolver unit tests, and an integration test that counts database queries for a nested list query.