AGENT SKILL

graphql-api-design

Design well-structured, evolvable, and performant GraphQL APIs with clear schemas, pagination, and error handling. Use when building or reviewing GraphQL endpoints, schemas, or resolvers.

License 许可
MIT
最近更新
2026-07-22
Stars
★ 7
Forks
1

01 前言 Front Matter

name
graphql-api-design
description
Design well-structured, evolvable, and performant GraphQL APIs with clear schemas, pagination, and error handling. Use when building or reviewing GraphQL endpoints, schemas, or resolvers.

03 SKILL.md 正文

GraphQL API Design

Overview

GraphQL gives clients flexibility but shifts complexity to the server. Good schema design, authorization, and performance controls are essential.

When to Use

  • Designing new GraphQL APIs or schemas
  • Reviewing resolver structure, N+1 risks, or authorization
  • Evolving existing GraphQL contracts

Key Practices

  • Design the schema around client use cases and domain concepts
  • Use clear naming and consistent patterns for connections/pagination
  • Protect against expensive queries (depth limiting, complexity analysis, timeouts)
  • Handle errors with a consistent structure
  • Apply authorization at the field/resolver level where needed
  • Prefer explicit input types and avoid overly generic mutations
  • Versioning is usually evolutionary — deprecate fields carefully

Common Pitfalls

  • N+1 query problems in resolvers
  • Over-fetching allowed by unbounded queries
  • Weak authorization (assuming the client will only ask for allowed data)
  • Giant “god” types or mutations

Verification

  • Critical queries and mutations are efficient and authorized
  • Schema changes follow a deprecation strategy
  • Expensive query protection is in place

04 同仓库更多 Skills

itsual
itsual/agent-skills-collection

win-loss-analysis

Analyze won and lost deals to learn why buyers choose you or alternatives — and feed insights into product, marketing, and sales. Use when improving win rates, refining positioning, or diagnosing systematic deal losses.

★ 7
itsual
itsual/agent-skills-collection

social-selling

Use social platforms to build relationships, share insight, and open sales conversations without hard-sell spam. Use when prospecting via LinkedIn or similar networks, or building a seller’s professional presence.

★ 7
itsual
itsual/agent-skills-collection

sales-strategy

Define sales strategy — target segments, motions, capacity, and goals — that aligns with product, marketing, and revenue targets. Use when designing go-to-market sales motions, choosing PLG vs sales-led balance, or planning sales org structure.

★ 7
itsual
itsual/agent-skills-collection

sales-playbooks

Create sales playbooks that codify how to win specific segments, use cases, or competitive situations with repeatable process and talk tracks. Use when standardizing successful motions, onboarding reps, or scaling what top performers do.

★ 7
itsual
itsual/agent-skills-collection

sales-enablement

Equip sales teams with the content, training, tools, and processes they need to sell effectively and consistently. Use when building enablement programs, onboarding reps, or improving win rates through better readiness.

★ 7
itsual
itsual/agent-skills-collection

sales-compensation-basics

Design or evaluate sales compensation plans that align seller behavior with company revenue goals and are simple enough to motivate. Use when creating comp plans, diagnosing misaligned incentives, or explaining plan mechanics to reps.

★ 7