graphql-schema-design
GraphQL API 设计准则:Relay 游标分页、DataLoader 批量防 N+1 查询与 Schema 优雅演进。
Skill by 2428424081cn
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/2428424081cn-graphql-schema-design
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design, backend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/graphql-schema-design
What's inside
- Skill name
graphql-schema-design- Description
- GraphQL API 设计准则:Relay 游标分页、DataLoader 批量防 N+1 查询与 Schema 优雅演进。
- License
- MIT
- Instructions
- 43 lines in SKILL.md · view on GitHub
Files (2)
- SKILL.md
- skill.json
SKILL.md (first lines)
# GraphQL Schema 设计与 DataLoader 性能优化
## 1. Relay 规范游标分页 (Cursor Pagination)
大数据量分页必须采用 Connection / Edge 规范,禁止使用脆弱的 Offset 分页:
```graphql
type Query {
users(first: Int, after: String): UserConnection!
}
type UserConnection {
edges: [UserEdge!]!
pageInfo: PageInfo!
totalCount: Int!
}
type UserEdge {
cursor: String!
node: User!
}
type PageInfo {
hasNextPage: Boolean!
endCursor: String
}
```
## 2. 强制使用 DataLoader 解决 N+1 问题
在 GraphQL 解析器遍历列表子字段时,严禁在 Resolver 中发起单条 SQL 查询,必须使用 DataLoader 批处理缓存:
```ts
import DataLoader from 'dataloader';
export function createUserLoader(db: Database) {
return new DataLoader<string, User>(async (userIds) => {
const users = await db.users.findMany({ where: { id: { in: [...userIds] } } });
const map = new Map(users.map(u => [u.id, u]));
return userIds.map(id => map.get(id) || null);
});
}
```From 2428424081cn/Skill-mcp, MIT.
More from 2428424081cn/Skill-mcp
- 0.544score
permissioned-github
2428424081cn
Guidelines for interacting with GitHub and request permissions from the user when commands fail due to restrictions in the agent environment.
SkillBFreshness: B★ 1Claude Code +9 - 0.544score
agy-customizations
2428424081cn
Comprehensive guide and reference for the Antigravity Customization System.
SkillBFreshness: B★ 1Claude Code +9 - 0.541score
golang-idiomatic-patterns
2428424081cn
Go (Golang) 原生工程惯用法:错误链包装、Context 生命周期、Goroutine 泄漏防御与表驱动测试。
SkillBFreshness: B★ 1Claude Code +9 - 0.538score
architecture-decision-records
2428424081cn
架构决策记录 (ADR) 标准规范:技术选型、架构权衡论证与变更生命周期管理。
SkillBFreshness: B★ 1Claude Code +9 - 0.538score
nestjs-prisma-drizzle
2428424081cn
NestJS 模块化依赖注入架构与 Prisma / Drizzle ORM 端到端类型安全后端规范。
SkillBFreshness: B★ 1Claude Code +9 - 0.538score
spring-boot-clean-architecture
2428424081cn
Spring Boot 3 / Java 企业级 DDD 领域驱动设计与六边形 (Hexagonal) 干净架构规范。
SkillBFreshness: B★ 1Claude Code +9 - 0.538score
fastapi-rest-service
2428424081cn
FastAPI / Pydantic v2 高性能异步后端开发指南。涵盖依赖注入、异步数据库连接池与统一响应封装。
SkillBFreshness: B★ 1Claude Code +9 - 0.538score
redis-cache-patterns
2428424081cn
Redis 缓存实战架构模式。防击穿/雪崩/穿透、滑动窗口限流与分布式锁标准实现。
SkillBFreshness: B★ 1Claude Code +9 - 0.538score
structured-output-json-schema
2428424081cn
大模型严格结构化输出 JSON Schema 约束设计与 Function Calling 容错修复机制。
SkillBFreshness: B★ 1Claude Code +9 - 0.538score
llm-prompt-injection-defense
2428424081cn
大模型 Prompt 注入防御与越狱防护准则:非可信数据定界隔离、系统提示词防嗅探与输入清洗。
SkillBFreshness: B★ 1Claude Code +9 - 0.538score
prompt-ab-testing
2428424081cn
大模型 Prompt 提示词 A/B 测试与版本迭代指南。提供提示词量化评估指标与防御性提示词设计。
SkillBFreshness: B★ 1Claude Code +9 - 0.538score
sql-query-optimizer
2428424081cn
SQL 性能优化与慢查询诊断。提供索引覆盖(Covering Index)、分页深度优化与 JOIN 性能建议。
SkillBFreshness: B★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Aug 24, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/2428424081cn/Skill-mcp
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from 2428424081cn
- 0.544score
agy-customizations
2428424081cn
Comprehensive guide and reference for the Antigravity Customization System.
SkillBFreshness: B★ 1Claude Code +9 - 0.544score
permissioned-github
2428424081cn
Guidelines for interacting with GitHub and request permissions from the user when commands fail due to restrictions in the agent environment.
SkillBFreshness: B★ 1Claude Code +9 - 0.541score
golang-idiomatic-patterns
2428424081cn
Go (Golang) 原生工程惯用法:错误链包装、Context 生命周期、Goroutine 泄漏防御与表驱动测试。
SkillBFreshness: B★ 1Claude Code +9 - 0.538score
structured-output-json-schema
2428424081cn
大模型严格结构化输出 JSON Schema 约束设计与 Function Calling 容错修复机制。
SkillBFreshness: B★ 1Claude Code +9 - 0.538score
spring-boot-clean-architecture
2428424081cn
Spring Boot 3 / Java 企业级 DDD 领域驱动设计与六边形 (Hexagonal) 干净架构规范。
SkillBFreshness: B★ 1Claude Code +9 - 0.538score
nestjs-prisma-drizzle
2428424081cn
NestJS 模块化依赖注入架构与 Prisma / Drizzle ORM 端到端类型安全后端规范。
SkillBFreshness: B★ 1Claude Code +9
Cite this page
graphql-schema-design skill. Agent Mart. https://agentmart.dev/skills/2428424081cn-graphql-schema-design (last updated 2026-10-24)