Skills Plugins MCP Prompt Model 博客 我的中心
开发编程 #design #api #security

graphql-schema

Guide for designing GraphQL schemas following industry best practices. Use this skill when: (1) designing a new GraphQL schema or API, (2) reviewing existing schema for improvements, (3) deciding on type structures or nullability, (4) implementing pagination or error patterns, (5) ensuring security in schema design.

DeepseekModel 官方收录技能 质量 优秀 · 78 v1.0.0

获取

https://deepseekmodel.com/api/download.php?id=apollographql-skills-skills-graphql-schema-skill-md&format=skill
下载 .skill 标准格式,含 system_prompt 与 model_config,导入任意 Agent 框架即可使用
.skill 文件中 system_prompt 字段的实际内容。
name graphql-schema description Guide for designing GraphQL schemas following industry best practices. Use this skill when: (1) designing a new GraphQL schema or API, (2) reviewing existing schema for improvements, (3) deciding on type structures or nullability, (4) implementing pagination or error patterns, (5) ensuring security in schema design. license MIT compatibility Any GraphQL implementation (Apollo Server, graphql-js, Yoga, etc.) metadata {"author":"apollographql","version":"1.0.1"} allowed-tools Bash(npm:*) Bash(npx:*) Read Write Edit Glob Grep GraphQL Schema Design Guide This guide covers best practices for designing GraphQL schemas that are intuitive, performant, and maintainable. Schema design is primarily a server-side concern that directly impacts API usability. Schema Design Principles 1. Design for Client Needs Think about what queries clients will write Organize types around use cases, not database tables Expose capabilities, not implementation details 2. Be Explicit Use clear, descriptive names Make nullability intentional Document with descriptions 3. Design for Evolution Plan for backwards compatibility Use deprecation before removal Avoid breaking changes Quick Reference Type Definition Syntax "" " A user in the system. " "" type User { id : ID ! email : String ! name : String posts ( first : Int = 10 , after : String ) : PostConnection ! createdAt : DateTime ! } Nullability Rules Pattern Meaning String Nullable - may be null String! Non-null - always has value [String] Nullable list, nullable items [String!] Nullable list, non-null items [String]! Non-null list, nullable items [String!]! Non-null list, non-null items Best Practice: Use [Type!]! for lists - empty list over null, no null items. Input vs Output Types # Output type - what clients receive type User { id : ID ! email : String ! createdAt : DateTime ! } # Input type - what clients send input CreateUserInput { email : String ! name : String } # Mutation using input type type Mutation { createUser ( input : CreateUserInput ! ) : User ! } Interface Pattern interface Node { id : ID ! } type User implements Node { id : ID ! email : String ! } type Post implements Node { id : ID ! title : String ! } Union Pattern union SearchResult = User | Post | Comment type Query { search ( query : String ! ) : [ SearchResult ! ] ! } Reference Files Detailed documentation for specific topics: Types - Type design patterns, interfaces, unions, and custom scalars Naming - Naming conventions for types, fields, and arguments Pagination - Connection pattern and cursor-based pagination Errors - Error modeling and result types Security - Security best practices for schema design Key Rules Type Design Define types based on domain concepts, not data storage Use interfaces for shared fields across types Use unions for mutually exclusive types Keep types focused (single responsibility) Avoid deep nesting - flatten when possible Field Design Fields should be named from client's perspective Return the most specific type possible Make expensive fields explicit (consider arguments) Use arguments for filtering, sorting, pagination Mutation Design Use single input argument pattern: mutation(input: InputType!) Return affected objects in mutation responses Model mutations around business operations, not CRUD Consider returning a union of success/error types ID Strategy Use globally unique IDs when possible Implement Node interface for refetchability Base64-encode compound IDs if needed Ground Rules ALWAYS add descriptions to types and fields ALWAYS use non-null ( ! ) for fields that cannot be null ALWAYS use [Type!]! pattern for lists NEVER expose database internals in schema NEVER break backwards compatibility without deprecation PREFER dedicated input types over many arguments PREFER enums over arbitrary strings for fixed values USE ID type for identifiers, not String or Int USE custom scalars for domain-specific values (DateTime, Email, URL)
Agent 识别该技能的关键词,点击任意一个即可复制。

该技能未提供触发词。

下载的 .skill 包内含以下字段。
字段 说明
format格式标识(skill/v1)
skill_id技能唯一 ID
name技能名称
version版本号
description技能描述
category所属分类(数组)
trigger_words触发词列表
tags标签列表
source来源标识
source_url来源链接(本页地址)
exported_at导出时间(每次下载生成)
system_prompt系统提示词正文
model_config模型参数:provider / model / temperature / max_tokens / top_p
examples示例
install_guide各平台导入说明(Coze / Dify / Claude / 自定义框架)
同一份技能可按不同平台格式导出。
.skill 标准格式,含 system_prompt 与 model_config,导入任意 Agent 框架即可使用 下载
.skillpro 增强格式,额外含脚本 / 工具 / 依赖 / 钩子占位 下载
.json 纯 JSON 导出,只含 system_prompt 与模型参数 下载
Coze 带 frontmatter 的 Markdown,Coze 平台导入用 下载
Dify Dify DSL,创建应用后直接导入 下载

每日精选 Skill 推荐,免费送到你邮箱

输入邮箱,每天接收一个精选 AI Agent 技能推荐。完全免费,持续更新。

验证码 --

提交后我们会发送一封确认邮件,点击邮件里的链接才会开始收信。

完全免费,取消任意时间。我们不会发送垃圾邮件。