Agent skill · Backend & API

api-create-gql-query

Add a new GraphQL query endpoint with type safety, GraphORM integration, and tests

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill api-create-gql-query --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 7 KB
Bundled scripts: none
Path: skills/api/api-create-gql-query/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Add a New GraphQL Query to daily-api You are adding a new GraphQL query endpoint for daily-api. Follow this skill step by step. ## Context Loading Before writing any code, read these files for code style rules and GraphQL conventions: 1. `AGENTS.md` (project root) — code style, architecture, best practices 2. `src/graphorm/AGENTS.md` — GraphORM patterns for N+1 prevention These are the source of truth for all code style decisions. Do not deviate from them. ## Step 0 — Gather Requirements Before writing any code, ask the user the following questions **in this order**: ### 1. Which schema domain? > **Which schema file does this query belong in?** Check existing files in `src/schema/` (e.g., `posts.ts`, `users.ts`, `keywords.ts`, `campaigns.ts`, `sources.ts`, `organizations.ts`, etc.) and `src/graphql.ts` imports. Use an existing domain file if the query fits, or create a new one if it represents a new domain. ### 2. Return type > **What does the query return?** One of: > > - **(a)** Single entity — `graphorm.queryOne<T>()` / `graphorm.queryOneOrFail<T>()` > - **(b)** List of entities — `graphorm.query<T>()` > - **(c)** Paginated list (Relay-style) — `graphorm.queryPaginated<T>()` C

What's inside
Steps it walks through
  1. Context Loading
  2. Step 0 — Gather Requirements
  3. 1. Which schema domain?
  4. 2. Return type
  5. 3. Input arguments and validation
  6. 4. Authentication requirements
  7. 5. Business logic
  8. Step 1 — Check for Reusable Types
  9. Step 2 — Define Zod Validation Schema
  10. Step 3 — Define TypeScript Types
  11. Step 4 — Define GraphQL Schema (typeDefs)
  12. Step 5 — Write the Resolver
  13. Step 6 — Add GraphORM Configuration (if needed)
  14. Step 7 — Register in GraphQL Schema (if new domain file)
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the api-create-gql-query skill do?

Add a new GraphQL query endpoint with type safety, GraphORM integration, and tests

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill api-create-gql-query --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going