graphql

Design and implement GraphQL schemas, resolvers, and federated services.

1|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/iceflower/agent-skills --skill graphql-iceflower
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: graphql
Source: https://github.com/iceflower/agent-skills/tree/main/graphql
Command: npx skills add https://github.com/iceflower/agent-skills --skill graphql-iceflower

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

GraphQL API design and implementation patterns including schema design principles, type system (Object, Input, Interface, Union, Enum), resolver patterns, N+1 problem prevention with DataLoader, pagination (Cursor-based, Relay Connection), error handling, query complexity and depth limiting, authentication/authorization at field level, and Federation (Apollo). Covers Spring for GraphQL, Netflix DGS Framework, and GraphQL security (OWASP GraphQL Cheat Sheet). Use when designing GraphQL schemas, implementing resolvers, optimizing query performance, setting up GraphQL Federation, or reviewing GraphQL API security.

Core Features & Use Cases

  • Schema design principles (SDL-first vs Code-first), resolver patterns, and proper organization of GraphQL schemas for maintainability.
  • DataLoader-based batching to avoid N+1 queries, with cursor-based pagination and Relay connections.
  • Error handling strategies, query depth and complexity limits, and field-level authentication/authorization patterns.
  • Federation guidance for composing a unified graph with multiple subgraphs and security considerations.
  • Real-world use cases across Spring for GraphQL and Netflix DGS frameworks, plus OWASP GraphQL security guidance.

Quick Start

Define a GraphQL schema using SDL-first or code-first approaches, implement resolvers with a service layer, and enable DataLoader to optimize data fetching.

Frequently Asked Questions about graphql

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

FAQPage Schema
How do I prevent the N+1 problem in GraphQL resolvers?

To prevent the N+1 problem in GraphQL, implement DataLoader batching to group and cache multiple database requests into a single fetch per request cycle. This pattern optimizes data fetching and significantly reduces query latency.

What is the best way to implement cursor-based pagination in a GraphQL API?

The best way to implement cursor-based pagination in a GraphQL API is using Relay Connection specifications. This pattern provides standardized edges, nodes, and cursors for traversing large datasets efficiently without offset overhead.

How do I secure a GraphQL API against malicious queries?

Secure a GraphQL API against malicious queries by applying query depth and complexity limits to block deeply nested or expensive operations. Additionally, enforce field-level authentication and follow OWASP GraphQL security cheat sheet guidelines.

Does this GraphQL design guidance apply to Spring and Netflix DGS frameworks?

Yes, this GraphQL design guidance applies directly to Spring for GraphQL and Netflix DGS frameworks. It covers real-world use cases including schema organization, resolver patterns, and DataLoader integration across these specific environments.

When should I use SDL-first versus code-first GraphQL schemas?

Use SDL-first GraphQL schemas when you want a language-agnostic contract for team collaboration, and code-first when you prefer generating schemas directly from TypeScript or Python types. Both approaches require proper schema organization for maintainability.

How does Apollo Federation compose a unified graph from multiple subgraphs?

Apollo Federation composes a unified graph from multiple subgraphs using federation directives to resolve references across services. This approach lets you split a large monolithic schema into manageable domain-specific microservices while presenting a single endpoint.