api-design-graphql
GraphQL schema and resolver contract design for type boundaries, nullability, authz, and query-cost safety. Trigger when SDL, resolver behavior, field contracts, or query safety controls are added/changed, and their contract impact is not yet explicitly specified. Do not use for REST/OpenAPI endpoint design, API version lifecycle governance, or standalone error taxonomy design.
Works with
--- name: api-design-graphql description: GraphQL schema and resolver contract design for type boundaries, nullability, authz, and query-cost safety. Trigger when SDL, resolver behavior, field contracts, or query safety controls are added/changed, and their contract impact is not yet explicitly specified. Do not use for REST/OpenAPI endpoint design, API version lifecycle governance, or standalone error taxonomy design. license: Apache-2.0 --- # API Design GraphQL ## Scope Boundaries - Use when GraphQL schema boundaries, resolver contracts, and query safety must be defined. - Use proactively when GraphQL SDL/resolver diffs appear in specs, manifests, or source. - Use when clients need flexible field selection but query safety and authz boundaries are not yet explicit. - Do not use for REST-first endpoint design; use `api-design-rest`. - Do not use for storage internals; use `db-*`. ## Goal Deliver GraphQL contracts that are safe to evolve and efficient at runtime. ## Shared API Contract (Canonical) - Use `../api-design-rest/references/api-governance-contract.md` as the canonical contract. - Optional consistency checks (only if your repository enforces manifest validation): - `python3 ../api-design-rest/scripts/validate_api_contract.py --manifest <path/to/manifest.json>` - Use valid templates in `../api-design-rest/assets/`. - Use transport decision reference: - `../api-design-rest/references/transport-selection-matrix.md` - Use threshold derivation reference: - `../api-design-rest/references/threshold-derivation-framework.md` - Do not redefine API artifact ID formats, states, or approval gates. ## Implementation Templates - GraphQL SDL template: - `../api-design-rest/assets/graphql-schema-template.graphql` ## Inputs - Required queries/mutations and consumer usage patterns - Entity ownership and field-level authorization requirements - Performance budgets for depth, complexity, and resolver latency ## Outputs - Schema contract (types, inputs, mutations, deprecation tags) - Resolver behavior contract (authz, caching, batching, nullability semantics) - Query safety controls (complexity/depth limits and abuse controls) ## Workflow 1. Define schema boundaries aligned with domain ownership, not backend table layout. 2. Model inputs and payloads for forward-compatible evolution and explicit nullability. 3. Set resolver authorization rules and avoid N+1 with batching strategy. 4. Decide whether GraphQL is the primary transport or a gateway facade, and document alternatives. 5. Define query complexity/depth limits and abuse safeguards for public access paths. 6. Define error extension fields and trace correlation behavior. 7. Derive threshold methods for query latency, complexity limits, and resolver concurrency. 8. Validate compatibility, operational readiness, and canonical API contract compliance. ## Quality Gates - Schema evolution rules are explicit, including deprecations and migration notes. - Resolver behavior is deterministic, authorized, and free of unbounded fan-out paths. - Query safety limits are defined and enforced. - Observability and error semantics are consistent with API governance contract. ## Failure Handling - Stop when schema changes break existing client contracts without approved version plan. - Stop when resolver performance or query safety controls are undefined. - Escalate when required security/governance approvers are missing.
More API Design skills
lark-event
larksuite/cli
Lark/Feishu real-time event listening / subscribing / consuming: stream events as NDJSON via `lark-cli event consume <EventKey>` (covers IM messages/reactions/chat changes, Approval status changes, Task updates, VC meeting started/joined/ended, Minutes generated, Whiteboard updated, etc.). Use for Lark bots, real-time message processing, long-running subscribers, streaming webhook/push handlers. Supports `--max-events` / `--timeout` bounded runs and a stderr ready-marker contract — designed for AI agents running as subprocesses.
lark-contact
larksuite/cli
飞书 / Lark 通讯录:按姓名 / 邮箱解析成 open_id,或按 open_id 反查姓名 / 部门 / 邮箱 / 联系方式 / 个人状态 / 签名,以及按关键词搜索当前用户可见的机器人 / 智能体(agent)。当用户提到一个名字要下一步发消息 / 排日程,或拿到 open_id 想查具体信息时使用。不负责部门树遍历、按部门列员工、组织架构图,这类需求走原生 OpenAPI。
lark-openapi-explorer
larksuite/cli
飞书/Lark 原生 OpenAPI 探索:从官方文档库中挖掘未经 CLI 封装的原生 OpenAPI 接口。当用户的需求无法被现有 lark-* skill 或 lark-cli 已注册命令满足,需要查找并调用原生飞书 OpenAPI 时使用。

