微算力 · API 导航与自营网关
API 接入 EN
未登录登录
✨

Graphql Builder

Graphql Builder · v2.3.1
安全 unknown 级 作者 ckchzh 公开目录收录
979 下载 0 安装 2.6k 收藏 1 浏览

简介

Graphql Builder

原始描述

Build and validate GraphQL queries, mutations, and schemas. Use when working with GraphQL APIs.

通过你的 Agent 添加

安装目录:graphql-builder/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/graphql-builder/
Codex CLI~/.codex/skills/graphql-builder/
DeepSeek Harness~/.agents/skills/graphql-builder/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

技能正文


name: graphql-builder description: "Error: --type required. Use when you need graphql builder capabilities. Triggers on: graphql builder, type, entity, fields, relations, lang."

graphql-builder

Generate complete GraphQL schemas, type definitions, resolvers, queries, mutations, and subscriptions from natural language descriptions. Supports custom scalars, enums, interfaces, unions, input types, pagination (Relay-style cursor and offset), authentication directives, field validation, N+1 query prevention with DataLoader patterns, and subscription setup. Outputs production-ready schema files with proper documentation and examples.

Commands

Command Description
schema Generate a complete GraphQL schema from description
type Generate type definitions with fields and relations
resolver Generate resolver functions (Query/Mutation/Field)
query Generate query operations with variables
mutation Generate mutation operations with input types
subscription Generate subscription definitions
enum Generate enum type definitions
interface Generate interface and implementing types
pagination Add Relay-style cursor pagination
auth Add authentication/authorization directives

Usage

# Generate complete schema for a blog API
graphql-builder schema --domain "blog with users, posts, comments, tags"

# Generate type definitions
graphql-builder type --name User --fields "id:ID!,name:String!,email:String!,posts:[Post!]!"

# Generate resolvers for a type
graphql-builder resolver --type User --operations "getUser,listUsers,createUser,updateUser"

# Generate query with pagination
graphql-builder query --name listPosts --pagination cursor --filters "status,author"

# Generate mutation with validation
graphql-builder mutation --name createPost --input "title:String!,body:String!,tags:[String!]"

# Generate subscription
graphql-builder subscription --name onPostCreated --type Post

# Add authentication directives
graphql-builder auth --strategy jwt --roles "admin,editor,viewer"

Examples

E-commerce Schema

graphql-builder schema --domain "e-commerce with products, categories, orders, users, reviews, cart"

Social Media Schema

graphql-builder schema --domain "social media with users, posts, comments, likes, follows, messages"

SaaS Schema

graphql-builder schema --domain "SaaS with organizations, users, projects, tasks, billing"

Features

  • Full schema generation — Types, queries, mutations, subscriptions
  • Relay pagination — Cursor-based connection types
  • Authentication — JWT/session-based auth directives
  • Validation — Input validation with custom directives
  • DataLoader — N+1 prevention patterns
  • Documentation — Inline descriptions and examples
  • Resolvers — Complete resolver implementations

Keywords

graphql, schema, api, query, mutation, subscription, resolver, type system, api design, backend

💬 Feedback & Feature Requests: https://bytesagain.com/feedback Powered by BytesAgain | bytesagain.com

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

没有标签

同类 Skill