SKILL

graphql

GraphQL 让客户端精确获取所需数据,不多也不少;提供单一端点、带类型的 schema 和内省。但赋予它力量的灵活性也带来危险,缺乏恰当控制时,客户端可构造使服务器崩溃的查询。本技能涵盖 schema 设计、解析器、用 DataLoader 预防 N+1、微服务联邦,以及 Apollo/urql 客户端集成。核心观点:GraphQL 是契约,schema 就是 API 文档,应谨慎设计。

译文已校对
查看英文原文

GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.

适用对象:设计与内容创作。自动收录 · 待核查。

在 Cursor 中使用

该组合的专门教程待补充,尚未核实适配。

准备条件

  • 本条仅收录原作者的技能元数据;请阅读完整说明,确认依赖、许可与使用条件。

选择已有说明的 AI 工具,或在页面加载后保存待办及提出教程请求。

查看原作者说明 ↗