api-create-gql-query
Add a new GraphQL query endpoint with type safety, GraphORM integration, and tests
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.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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
- Context Loading
- Step 0 — Gather Requirements
- 1. Which schema domain?
- 2. Return type
- 3. Input arguments and validation
- 4. Authentication requirements
- 5. Business logic
- Step 1 — Check for Reusable Types
- Step 2 — Define Zod Validation Schema
- Step 3 — Define TypeScript Types
- Step 4 — Define GraphQL Schema (typeDefs)
- Step 5 — Write the Resolver
- Step 6 — Add GraphORM Configuration (if needed)
- Step 7 — Register in GraphQL Schema (if new domain file)
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.
