implement-graphql
Use when building or reviewing a graphql-ruby schema, resolver, or mutation.
Skill by igmarin
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/igmarin-implement-graphql
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/implement-graphql
What's inside
- Skill name
implement-graphql- Description
- Use when building or reviewing a graphql-ruby schema, resolver, or mutation. Trigger words: GraphQL, graphql-ruby, resolver, mutation, dataloader, schema.
- License
- MIT
- Metadata
- version: 1.0.0 · user-invocable: true
- Instructions
- 69 lines in SKILL.md · view on GitHub
Files (3)
- EXAMPLES.md
- SKILL.md
- TESTING.md
SKILL.md (first lines)
# Implement GraphQL
Use this skill when **designing, implementing, or reviewing GraphQL APIs** in a Rails application with the `graphql-ruby` gem.
## Core Process
**DO NOT proceed to step 3 before step 1 is written and failing.**
1. **SPEC:** Write failing spec (happy path + auth + validation error case) — see [TESTING.md](./TESTING.md). Use `AppSchema.execute` in `spec/graphql/`. Never use HTTP controller dispatch for GraphQL specs.
2. **TYPE:** Define arguments and return types. Use `connection_type` for pagination shapes. Do not leak internal model names.
3. **IMPLEMENT:** Create resolver/mutation class delegating to a service object. Use dedicated classes instead of inline field blocks.
4. **N+1 CHECK:** Use dataloader on every association load. For list resolvers, prime the dataloader with the records returned by the relation before fields resolve associated objects. Use `bullet` and `db-query-matchers` in specs.
```ruby
# ✅ batches loads across all records
def buyer
dataloader.with(Sources::RecordById, Buyer).load(object.buyer_id)
end
```
5. **AUTH CHECK:** Apply field-level guards where data is sensitive using Pundit or custom context guards.
```ruby
field :internal_notes, String, null: true do
guard -> (_obj, _args, ctx) { ctx[:current_user]&.admin? }
end
```
6. **FINAL CHECK:** Verify every item in the HARD-GATE checklist below. Ensure mutations return `{ result, errors }` shapes on failure.
```ruby
rescue ActiveRecord::RecordInvalid => e
{ order: nil, errors: e.record.errors.full_messages }
```
7. **RUN:** Ensure the full test suite is green before PR.
## HARD-GATE Checklist
Before shipping a resolver/mutation slice, ALL of the following must be confirmed:
- [ ] **Specs** — covers happy path, unauthenticated, unauthorized, validation errors, N+1 counts, and schema limits.
- [ ] **N+1 Prevention** — `dataloader.with(Source, Model).load(id)` on every association; never `object.association`.
- [ ] **Dataloader Priming** — collection resolvers prime records before association fields resolve.
- [ ] **Authorization** — sensitive fields have field-level guards (not type-level alone).
- [ ] **Type Conventions** — paginated collections use `Types::*Type.connection_type`, not plain arrays.
- [ ] **Schema Safeguards** — introspection disabled in production; `max_depth` and `max_complexity` set.
- [ ] **Error Handling** — mutations return `{ result, errors }` with rescue blocks; no unhandled exceptions.
- [ ] **Documentation** — `description:` on every field in every type.
- [ ] **Resolver Structure** — dedicated resolver classes, not inline field blocks.
## Extended Resources (Progressive Disclosure)
Load these files only when their specific content is needed:
- **[TESTING.md](./TESTING.md)** — For the spec template, paths, and checklist.
- **[EXAMPLES.md](EXAMPLES.md)** — For detailed code examples of dataloaders, mutations, and types.
## Integration
| Skill | When to chain |
|-------|---------------|
| **define-domain-language** | Type and field naming must match business language |
| **plan-tests** | Choose first failing spec (mutation vs query vs resolver unit) |
| **write-tests** | Full TDD cycle for resolvers and mutations |
| **security-check** | Auth, introspection disable, query depth/complexity limits |From igmarin/rails-agent-skills, MIT.
More from igmarin/rails-agent-skills
- 0.619score
implement-authorization
igmarin
Use when adding or reviewing Rails authorization with Pundit, CanCanCan, or policy objects.
SkillAFreshness: A★ 28Claude Code +9 - 0.619score
seed-database
igmarin
Use when choosing seeds, fixtures, or factories for Rails dev/test data.
SkillAFreshness: A★ 28Claude Code +9 - 0.619score
version-api
igmarin
Use when versioning a Rails REST API (v1/v2, deprecation, Sunset headers).
SkillAFreshness: A★ 28Claude Code +9 - 0.619score
setup-environment
igmarin
Use when onboarding onto a Rails app: Ruby version, Docker, env, database, test suite.
SkillAFreshness: A★ 28Claude Code +9 - 0.619score
create-engine
igmarin
Use when scaffolding a new Rails engine.
SkillAFreshness: A★ 28Claude Code +9 - 0.619score
implement-hotwire
igmarin
Use when adding Turbo Frames, Turbo Streams, or Stimulus controllers.
SkillAFreshness: A★ 28Claude Code +9 - 0.619score
extract-engine
igmarin
Use when extracting a host-app feature into a Rails engine.
SkillAFreshness: A★ 28Claude Code +9 - 0.619score
optimize-performance
igmarin
Use when investigating N+1s, slow queries, caching, or query plans in Rails.
SkillAFreshness: A★ 28Claude Code +9 - 0.616score
load-context
igmarin
Use before writing code, specs, or a PRD in an existing Rails app.
SkillAFreshness: A★ 28Claude Code +9 - 0.614score
create-engine-installer
igmarin
Use when writing an install generator for a Rails engine (migrations, config).
SkillAFreshness: A★ 28Claude Code +9 - 0.614score
apply-code-conventions
igmarin
Use when applying daily Rails conventions by path (DRY, YAGNI, PORO, CoC, KISS).
SkillAFreshness: A★ 28Claude Code +9 - 0.614score
implement-background-job
igmarin
Use when adding or reviewing an Active Job / Sidekiq / Solid Queue worker.
SkillAFreshness: A★ 28Claude Code +9
Signals
- Stars
- 28
- Forks
- 8
- Open issues
- 0
- Contributors
- 7
- Last commit (this folder)
- Sep 28, 2026 (1 month ago)
- Last release
- May 16, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 1.0.0
- License
- MIT
- Repository
- github.com/igmarin/rails-agent-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from igmarin
- 0.619score
implement-hotwire
igmarin
Use when adding Turbo Frames, Turbo Streams, or Stimulus controllers.
SkillAFreshness: A★ 28Claude Code +9 - 0.619score
optimize-performance
igmarin
Use when investigating N+1s, slow queries, caching, or query plans in Rails.
SkillAFreshness: A★ 28Claude Code +9 - 0.619score
extract-engine
igmarin
Use when extracting a host-app feature into a Rails engine.
SkillAFreshness: A★ 28Claude Code +9 - 0.619score
implement-authorization
igmarin
Use when adding or reviewing Rails authorization with Pundit, CanCanCan, or policy objects.
SkillAFreshness: A★ 28Claude Code +9 - 0.619score
create-engine
igmarin
Use when scaffolding a new Rails engine.
SkillAFreshness: A★ 28Claude Code +9 - 0.619score
seed-database
igmarin
Use when choosing seeds, fixtures, or factories for Rails dev/test data.
SkillAFreshness: A★ 28Claude Code +9
Cite this page
implement-graphql skill. Agent Mart. https://agentmart.dev/skills/igmarin-implement-graphql (last updated 2026-10-24)