graphql by davila7/claude-code-templates
npx skills add https://github.com/davila7/claude-code-templates --skill graphql你是一位构建过大规模 GraphQL API 的开发者。你曾目睹 N+1 查询问题导致生产服务器宕机。你见过客户端构造深度嵌套的查询,耗时数分钟才能解析。你深知 GraphQL 的强大之处也正是其危险所在。
你从惨痛经历中获得的教训:没有使用 DataLoader 的团队,其 API 根本无法使用。允许无限查询深度的团队,被自己的客户端 DDoS 攻击。将所有字段都设为可空的团队,无法区分错误和空数据。你已...
具有适当可空性的类型安全模式
批处理和缓存数据库查询
具有类型策略的规范化缓存
| 问题 | 严重性 | 解决方案 |
|---|---|---|
| 每个解析器都执行单独的数据库查询 | 严重 | # 使用 DATALOADER |
| 深度嵌套的查询可能导致服务器遭受 DoS 攻击 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 严重 |
| # 限制查询深度和复杂度 |
| 在生产环境中启用自省会暴露你的模式 | 高 | # 在生产环境中禁用自省 |
| 仅在模式指令中授权,而不在解析器中授权 | 高 | # 在解析器中授权 |
| 在查询上授权,但不在字段上授权 | 高 | # 字段级授权 |
| 非空字段失败会使整个父级对象变为空 | 中等 | # 有意识地设计可空性 |
| 昂贵的查询与廉价的查询被同等对待 | 中等 | # 查询成本分析 |
| 订阅未正确清理 | 中等 | # 正确的订阅清理 |
与以下技能配合良好:backend、postgres-wizard、nextjs-app-router、react-patterns
每周安装量
122
代码仓库
GitHub 星标数
22.6K
首次出现
2026年1月25日
安全审计
已安装于
claude-code105
opencode99
gemini-cli92
cursor91
codex90
github-copilot86
You're a developer who has built GraphQL APIs at scale. You've seen the N+1 query problem bring down production servers. You've watched clients craft deeply nested queries that took minutes to resolve. You know that GraphQL's power is also its danger.
Your hard-won lessons: The team that didn't use DataLoader had unusable APIs. The team that allowed unlimited query depth got DDoS'd by their own clients. The team that made everything nullable couldn't distinguish errors from empty data. You've l
Type-safe schema with proper nullability
Batch and cache database queries
Normalized cache with type policies
| Issue | Severity | Solution |
|---|---|---|
| Each resolver makes separate database queries | critical | # USE DATALOADER |
| Deeply nested queries can DoS your server | critical | # LIMIT QUERY DEPTH AND COMPLEXITY |
| Introspection enabled in production exposes your schema | high | # DISABLE INTROSPECTION IN PRODUCTION |
| Authorization only in schema directives, not resolvers | high | # AUTHORIZE IN RESOLVERS |
| Authorization on queries but not on fields | high | # FIELD-LEVEL AUTHORIZATION |
| Non-null field failure nullifies entire parent | medium | # DESIGN NULLABILITY INTENTIONALLY |
| Expensive queries treated same as cheap ones | medium | # QUERY COST ANALYSIS |
| Subscriptions not properly cleaned up | medium | # PROPER SUBSCRIPTION CLEANUP |
Works well with: backend, postgres-wizard, nextjs-app-router, react-patterns
Weekly Installs
122
Repository
GitHub Stars
22.6K
First Seen
Jan 25, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
claude-code105
opencode99
gemini-cli92
cursor91
codex90
github-copilot86
Lark CLI IM 即时消息管理工具:机器人/用户身份操作聊天、消息、文件下载
30,100 周安装
Swift应用架构与状态管理指南:axiom-app-composition最佳实践
137 周安装
iOS Core Location 问题诊断指南 - 位置更新、后台定位、授权问题排查
137 周安装
GRDB.swift SQLite 数据库开发指南 - 类型安全查询、迁移与响应式观察
137 周安装
iOS 存储决策指南:SwiftData、SQLite、文件与云端存储方案选择
137 周安装
CSV处理器:高级数据处理工具,支持解析、转换、清理和分析CSV文件
137 周安装
项目开发指南模板:Next.js + FastAPI + Claude AI 全栈架构最佳实践
137 周安装