graphql

Designs and reviews GraphQL schemas, operations, resolvers, and federated subgraphs.

22|Updated Sep 10, 2026
One-click install
npx skills add https://github.com/Lynricsy/HyperSkills --skill graphql-lynricsy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: graphql
Source: https://github.com/Lynricsy/HyperSkills/tree/main/skills/graphql
Command: npx skills add https://github.com/Lynricsy/HyperSkills --skill graphql-lynricsy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? GraphQL APIs fail in predictable ways: non-null fields that blank entire screens when one service degrades, offset pagination that duplicates rows, N+1 resolvers firing hundreds of queries per request, and schema changes that silently break shipped clients. This Skill encodes the adjudicated rules for designing, reviewing, and evolving a GraphQL API so these failures are caught before production. ## Core Features & Use Cases - Schema design and review: nullability audits, Relay Connection pagination, error modelling with payload userErrors versus result unions, enums, input objects, and global object identification. - Performance and demand control: per-request DataLoader batching with the keys.length contract, depth and complexity limits, trusted documents, and GET/CDN caching. - Federation and evolution: Apollo Federation 2 directives (@key, @shareable, @override, @requires), composition checks, and additive schema evolution gated by graphql-inspector diffs. - Use Case: A home-feed request fires several hundred SQL statements and one HTTP call per post. The Skill identifies the shared module-level DataLoader leaking data across users, rewrites the batch functions to return keys.length results in order, and adds depth and complexity limits so cyclical queries are rejected at validation time. ## Quick Start Ask the agent to review your GraphQL schema file for nullability, pagination, and error-handling problems using the graphql skill.

Frequently Asked Questions about graphql

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix N+1 queries in GraphQL resolvers?

Add a DataLoader per database or service boundary, constructed per request and placed on the context. Each batch function must return exactly keys.length values in the same order as keys, using null or an Error for misses. Batch list relationships into one grouped query keyed by parent id.

How should GraphQL pagination be designed?

Use the Relay cursor Connection shape: edges with node and cursor, pageInfo with hasNextPage and endCursor, and first/after plus last/before arguments. Cursors must be opaque and encode the sort key plus a unique tiebreaker, with a default and server-enforced maximum page size.

Why does my GraphQL response return data null?

An execution error at a non-null position propagates to its parent, and if every position from the root to the failure is non-null the entire data entry becomes null. Fix it by making positions that can fail independently nullable rather than adding try/catch in resolvers.

What is the difference between Apollo Server and GraphQL Yoga error handling?

Yoga masks unexpected errors to 'Unexpected error.' by default and requires throwing GraphQLError for intended messages. Apollo Server passes messages through and includes stack traces unless NODE_ENV is production or test, so masking must be implemented via formatError.

How do I change a GraphQL schema without breaking clients?

Classify each change as additive or breaking, then use the additive equivalent: add a new field beside the old one, deprecate the old with a reason naming the replacement, and remove only after measured per-field usage reaches zero. Gate every change with a graphql-inspector diff.

When should I not use GraphQL federation?

Federation is infrastructure requiring a gateway, schema registry, and composition in CI. A single graph contributed to by multiple teams through one repository is a legitimate destination; federate only when team boundaries force it, not by default.