返回顶部
g

graphql-schema

Deep GraphQL schema workflow—modeling types, queries and mutations, N+1 and complexity limits, errors and pagination, federation risks, and evolution. Use when designing or reviewing GraphQL APIs.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
106
下载量
0
收藏
概述
安装方式
版本历史

graphql-schema

# GraphQL Schema (Deep Workflow) GraphQL concentrates complexity on the server: **resolver graphs**, **N+1** fetches, **schema evolution**, and **field-level authorization**. ## When to Offer This Workflow **Trigger conditions:** - Designing a new GraphQL API or federated subgraph - Latency or complexity incidents from client queries - Need for safe schema deprecation and versioning **Initial offer:** Use **six stages**: (1) domain modeling, (2) operations surface, (3) performance patterns, (4) errors & partial results, (5) security & authz, (6) versioning & evolution). Confirm client patterns (Apollo, Relay) and gateway (if any). --- ## Stage 1: Domain Modeling **Goal:** Types reflect domain concepts; avoid dumping everything on `Query`; use input objects for mutations with validation. --- ## Stage 2: Operations Surface **Goal:** Queries for reads; mutations for writes; subscriptions only when justified (scaling and operational cost). ### Pagination - Prefer cursor-based connections for large lists (Relay-style edges/nodes) --- ## Stage 3: Performance Patterns **Goal:** DataLoader or batching for N+1; query complexity/depth/cost limits; optional persisted queries for public APIs. --- ## Stage 4: Errors & Partial Results **Goal:** Document semantics of `errors` alongside partial `data`; map domain failures to structured extensions. --- ## Stage 5: Security & Authz **Goal:** Enforce authorization at field/object level—not only at the top resolver. --- ## Stage 6: Versioning & Evolution **Goal:** Prefer additive changes; `@deprecated` with migration window; in federation, clear ownership of types and entities. --- ## Final Review Checklist - [ ] Schema reflects domain and operations - [ ] Pagination and mutations idiomatic - [ ] Batching and complexity limits in place - [ ] Error behavior documented for clients - [ ] Field-level authz enforced - [ ] Deprecation policy defined ## Tips for Effective Guidance - N+1 is the default failure mode—plan batching early. - Pair with **rest-best-practices** when REST and GraphQL coexist at the edge. ## Handling Deviations - Public APIs: consider persisted queries or allowlists to limit abusive queries.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 graphql-schema-1776028704 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 graphql-schema-1776028704 技能

通过命令行安装

skillhub install graphql-schema-1776028704

下载 Zip 包

⬇ 下载 graphql-schema v1.0.0

文件大小: 1.81 KB | 发布时间: 2026-4-13 10:29

v1.0.0 最新 2026-4-13 10:29
- Initial release of the GraphQL Schema deep workflow skill.
- Covers all key stages: domain modeling, operation surface, performance patterns (including N+1 handling), errors and partial results, security/authz, and schema evolution.
- Provides a structured six-stage workflow for designing and reviewing GraphQL APIs.
- Includes a comprehensive review checklist to ensure schema quality.
- Offers specific recommendations on pagination, complexity limits, federation, and deprecation practices.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部