- 遵循查询、变更和片段的命名约定:
- 查询(Queries):
- 使用
get或fetch前缀,后跟实体名称和可选的复数形式。 - 示例:
getUsers、getUserById、fetchProductDetails。
- 使用
- 变更(Mutations):
- 使用动词前缀表示操作类型,后跟实体名称。
- 示例:
createUser、updateProduct、deleteComment。
- 订阅(Subscriptions):
- 使用
on前缀,后跟事件名称。 - 示例:
onNewMessage、onUserUpdated。
- 使用
- 片段(Fragments):
- 使用实体名称,后跟
Fields或Details后缀。 - 示例:
UserFields、ProductDetails。
- 使用实体名称,后跟
- 类型(Types)和字段(Fields):
- 类型名称使用 PascalCase(大驼峰命名法)。
- 字段名称使用 camelCase(小驼峰命名法)。
- 示例:
User类型中的firstName字段。
- 枚举(Enums):
- 枚举类型名称使用 PascalCase,枚举值使用 ALL_CAPS(全大写)。
- 示例:
OrderStatus枚举中的PENDING、COMPLETED。
- 变量(Variables):
- 变量名称使用 camelCase。
- 示例:
$userId、$input。
- 通用原则:
- 保持命名清晰、简洁、一致,能够直观地表达其用途和所操作的数据。
- 避免缩写,除非是广为人知的缩写(如
ID)。
- 查询(Queries):
Apollo GRAPHQL GRAPHQL Naming Conventions
要求遵循查询、变更和片段的命名约定
Apollo GRAPHQL GRAPHQL Naming Conventions by liaosw97 · 4e0d108
npx skillmds@latest add liaosw97/apollo-graphql-graphql-naming-conventions File contents
---name: apollo-graphql-graphql-naming-conventionsdescription: 要求遵循查询、变更和片段的命名约定---- **遵循查询、变更和片段的命名约定**: - **查询(Queries)**: - 使用 `get` 或 `fetch` 前缀,后跟实体名称和可选的复数形式。 - 示例:`getUsers`、`getUserById`、`fetchProductDetails`。 - **变更(Mutations)**: - 使用动词前缀表示操作类型,后跟实体名称。 - 示例:`createUser`、`updateProduct`、`deleteComment`。 - **订阅(Subscriptions)**: - 使用 `on` 前缀,后跟事件名称。 - 示例:`onNewMessage`、`onUserUpdated`。 - **片段(Fragments)**: - 使用实体名称,后跟 `Fields` 或 `Details` 后缀。 - 示例:`UserFields`、`ProductDetails`。 - **类型(Types)和字段(Fields)**: - 类型名称使用 PascalCase(大驼峰命名法)。 - 字段名称使用 camelCase(小驼峰命名法)。 - 示例:`User` 类型中的 `firstName` 字段。 - **枚举(Enums)**: - 枚举类型名称使用 PascalCase,枚举值使用 ALL_CAPS(全大写)。 - 示例:`OrderStatus` 枚举中的 `PENDING`、`COMPLETED`。 - **变量(Variables)**: - 变量名称使用 camelCase。 - 示例:`$userId`、`$input`。 - **通用原则**: - 保持命名清晰、简洁、一致,能够直观地表达其用途和所操作的数据。 - 避免缩写,除非是广为人知的缩写(如 `ID`)。
liaosw97/awesome-rules-skills/tree/main/plugins/apollo-graphql/skills/apollo-graphql-graphql-naming-conventions commit 4e0d10801a
Frequently asked questions
Run npx skillmds@latest add liaosw97/apollo-graphql-graphql-naming-conventions in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
要求遵循查询、变更和片段的命名约定 It is listed under Integrations & APIs on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Capability flags: makes network calls. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
liaosw97 (@liaosw97) published this skill. Their other Agent Skills are listed on their SkillMD profile.