Skip to content
Back to skills

Graphql

ASecurity

GraphQL — schema design (nullability, connections, input types), resolvers and DataLoader batching against N+1, query cost and depth limits, persisted queries, authorization per field, federation, schema evolution and deprecation. Use for GraphQL schemas or servers (GraphQL, schema, resolver, DataLoader, federation, persisted queries).

  • 5 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 3, 2026
ai-agentsgoapidatabase

Works with

  • cli
  • api

Security analysis

A100/100

Scanned December 3, 2026

npx -y skills add vectora-os/kit --skill graphql --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Graphql?

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

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

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
description: GraphQL — schema design (nullability, connections, input types), resolvers and DataLoader batching against N+1, query cost and depth limits, persisted queries, authorization per field, federation, schema evolution and deprecation. Use for GraphQL schemas or servers (GraphQL, schema, resolver, DataLoader, federation, persisted queries).
metadata:
  category: api
---

# GraphQL

## Purpose

Offer flexible data access without unbounded cost or authorization gaps.

**Use when:** clients need flexible, aggregated reads.

**Not for:** simple CRUD with one client.

## Inputs

- Client data needs, domain model.

## Outputs

- SDL schema, resolver design, cost limits, auth rules.

## Read first

- [Project Brain](../../../project-brain/README.md) — `npm run brain -- query "graphql"` for prior decisions, patterns and anti-patterns.
- [API design standard](../../../standards/api-design.md)

## Steps

1. **Schema.** Design from client needs; connections for lists; explicit nullability.
   Done when schema reviewed by consumers.
2. **Resolvers.** Batch with DataLoader per request.
   Done when no N+1 in traces.
3. **Protection.** Depth and cost limits, persisted queries for public clients.
   Done when expensive queries are rejected.
4. **Authz.** Authorize in the domain layer, not only at the gateway.
   Done when field-level rules are tested.

## Best practices

- Deprecate fields with `@deprecated` before removal.
- Mutations return payload types with errors.

## Common mistakes

- Exposing the database schema 1:1.
- No query cost limits.

## Example

`orders(first, after)` connection with DataLoader for customers; max cost 1000; persisted queries for the mobile app.

## Reusable prompt

```text
Apply the GraphQL skill (.agents/skills/graphql/SKILL.md).
Context: {{task card or question; links to PRD, ADRs, code paths}}
Constraints: {{approved thresholds, deadlines, allowed files}}
Design the schema, batching, cost limits and authorization rules for the GraphQL API.
Return: SDL schema, resolver design, cost limits, auth rules..
Cite evidence (file:line, command output, source) for every claim; list open questions separately.
```

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 ai-agents →

Comments

Loading comments…

Newsletter

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