用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/G1Joshi/Agent-Skills --skill graphql命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | graphql |
| description | GraphQL API query language with schema. Use for flexible APIs. |
GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. It gives clients the power to ask for exactly what they need and nothing more.
# The Schema
type User {
id: ID!
name: String!
orders: [Order]
}
type Query {
user(id: ID!): User
}
// The Query (Client)
query {
user(id: "123") {
name
orders {
total
status
}
}
}
The schema (.graphql) is the contract. Teams agree on the schema before writing code.
Functions that fetch the data for a specific field in the schema.
Every field has a specific type (Int, String, Object). Validation happens automatically.
Fetching a list of users and then firing a separate DB query for each user's address.
WHERE id IN (...)).Splitting a single GraphQL graph across multiple services (Microservices). Apollo Federation is the standard.
Do:
user { friends { friends { friends ... } } }).Don't:
| Error | Cause | Solution |
|---|---|---|
Cannot query field | Typo or field restricted. | Check Schema and Introspection. |
N+1 Performance | Slow response on lists. | Implement DataLoader. |
Caching | Hard to cache via HTTP. | Use Normalized Caching in Client (Apollo Client/Urql). |