Best use case
ash-graphql is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Rules for working with AshGraphql
Teams using ash-graphql should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/ash-graphql/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How ash-graphql Compares
| Feature / Agent | ash-graphql | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Rules for working with AshGraphql
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Rules for working with AshGraphql
## Understanding AshGraphql
AshGraphql is a package for integrating Ash Framework with GraphQL. It provides tools for generating GraphQL types, queries, mutations, and subscriptions from your Ash resources. AshGraphql leverages Absinthe under the hood to create a seamless integration between your Ash resources and GraphQL API.
## Domain Configuration
AshGraphql works by extending your Ash domains and resources with GraphQL capabilities. First, add the AshGraphql extension to your domain.
### Setting Up Your Domain
```elixir
defmodule MyApp.Blog do
use Ash.Domain,
extensions: [
AshGraphql.Domain
]
graphql do
# Define GraphQL-specific settings for this domain
authorize? true
# Add GraphQL queries separate from the resource config
queries do
get Post, :get_post, :read
list Post, :list_posts, :read
end
# Add GraphQL mutations separate from the resource config
mutations do
create Post, :create_post, :create
update Post, :update_post, :update
destroy Post, :destroy_post, :destroy
end
# Add GraphQL subscriptions
subscriptions do
subscribe Post, :post_created do
action_types(:create)
end
end
end
resources do
resource MyApp.Blog.Post
resource MyApp.Blog.Comment
end
end
```
### Creating Your GraphQL Schema
Create an Absinthe schema that uses your Ash domains:
```elixir
defmodule MyApp.Schema do
use Absinthe.Schema
# List all domains that contain resources to expose via GraphQL
@domains [MyApp.Blog, MyApp.Accounts]
# Configure AshGraphql with your domains
use AshGraphql,
domains: @domains,
# Generate SDL file (optional)
generate_sdl_file: "schema.graphql"
end
```
## Resource Configuration
Each resource that you want to expose via GraphQL needs to include the AshGraphql.Resource extension.
### Setting Up Resources
```elixir
defmodule MyApp.Blog.Post do
use Ash.Resource,
domain: MyApp.Blog,
extensions: [AshGraphql.Resource]
attributes do
uuid_primary_key :id
attribute :title, :string
attribute :body, :string
attribute :published, :boolean
attribute :view_count, :integer
end
relationships do
belongs_to :author, MyApp.Accounts.User
has_many :comments, MyApp.Blog.Comment
end
graphql do
# The GraphQL type name (required)
type :post
# Customize attribute types for GraphQL
attribute_types view_count: :string
# Configure managed relationships (for nested create/update)
managed_relationships do
managed_relationship :with_comments, :comments
end
end
actions do
defaults [:create, :read, :update, :destroy]
read :list_published do
filter expr(published == true)
end
update :publish do
accept []
change set_attribute(:published, true)
end
end
end
```
## Custom Types
AshGraphql automatically handles conversion of Ash types to GraphQL types, but you can customize it:
```elixir
defmodule MyApp.CustomType do
use Ash.Type
@impl true
def graphql_type(_), do: :string
@impl true
def graphql_input_type(_), do: :string
end
```Related Skills
libgraphql-plans
Track, organize, and maintain plans.md files and code TODOs for the libgraphql project. Use when the user asks to update plans, sync TODOs, mark tasks complete, add new tasks, identify high-impact work, or asks what's left to do in the libgraphql codebase. Triggers include phrases like "update plans", "sync TODOs", "what's left to do", "mark X as done", "track a new task", "highest-impact work", or references to plans.md files.
graphql
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper co...
graphql-architect
Use when designing GraphQL schemas, implementing Apollo Federation, or building real-time subscriptions. Invoke for schema design, resolvers with DataLoader, query optimization, federation directives.
agent-graphql-architect
GraphQL schema architect designing efficient, scalable API graphs. Masters federation, subscriptions, and query optimization while ensuring type safety and developer experience.
bgo
Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.
partner-revenue-desk
Operating model for tracking, attributing, and accelerating partner-sourced revenue.
parallel-data-enrichment
Structured company and entity data enrichment using Parallel AI Task API with core/base processors. Returns typed JSON output. No binary install — requires PARALLEL_API_KEY in .env.local.
parallel-agents
Multi-agent orchestration patterns. Use when multiple independent tasks can run with different domain expertise or when comprehensive analysis requires multiple perspectives.
paper-writing-assistant
Assist in drafting research papers and meeting notes, enforcing academic rigor and formatting.
pandas-data-manipulation-rules
Focuses on pandas-specific rules for data manipulation, including method chaining, data selection using loc/iloc, and groupby operations.
pagent
Guide for using pagent - a PRD-to-code orchestration tool. Use when users ask how to use pagent, run agents, create PRDs, or transform requirements into code.
page-annotator
AI驱动的网页标注工具,支持高亮元素和添加文字批注。智能防重复、自动滚动、碰撞检测。兼容 GitHub 等严格 CSP 网站。适用场景:(1) 标记网页元素进行讲解 (2) 添加文字批注和注释 (3) 代码审查和设计评审 (4) 教学演示和用户引导 (5) Bug 报告和问题标记