Skip to content
Back to skills

Graphql Apis

ASecurity

Design and change GraphQL schemas and resolvers: nullability, pagination, N+1 with DataLoader, auth and limits

  • 5 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 30, 2026
developmentnodeapidatabase

Works with

  • cursor
  • cli
  • api

Security analysis

A100/100

Scanned November 30, 2026

npx -y skills add AdityaaaTiwari/ANVIL --skill graphql-apis --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Graphql Apis?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Graphql Apis
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/adityaaatiwari-graphql-apis/badge)](https://www.skillsdirectory.com/skills/adityaaatiwari-graphql-apis)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: graphql-apis
description: "Design and change GraphQL schemas and resolvers: nullability, pagination, N+1 with DataLoader, auth and limits"
---

<!-- Generated by `anvil plugin build` from catalog/. Edit the catalog, not this file. -->

# 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.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.