Use when designing GraphQL schemas with type system, SDL patterns, field design, pagination, directives, and versioning strategies for maintainable and scalable APIs.
View on GitHubTheBushidoCollective/han
jutsu-graphql
January 24, 2026
Select agents to install to:
npx add-skill https://github.com/TheBushidoCollective/han/blob/main/jutsu/jutsu-graphql/skills/graphql-schema-design/SKILL.md -a claude-code --skill graphql-schema-designInstallation paths:
.claude/skills/graphql-schema-design/# GraphQL Schema Design
Apply GraphQL schema design principles to create well-structured,
maintainable, and scalable GraphQL APIs. This skill covers the type
system, Schema Definition Language (SDL), field design patterns,
pagination strategies, directives, and schema evolution techniques.
## Core Type System
### Object Types
Object types are the fundamental building blocks of GraphQL schemas.
Each object type represents a kind of object you can fetch from your
service, and what fields it has.
```graphql
type User {
id: ID!
username: String!
email: String!
createdAt: DateTime!
posts: [Post!]!
profile: Profile
}
type Post {
id: ID!
title: String!
content: String!
author: User!
publishedAt: DateTime
tags: [String!]!
}
```
### Interface Types
Interfaces define abstract types that multiple object types can
implement. Use interfaces when multiple types share common fields.
```graphql
interface Node {
id: ID!
createdAt: DateTime!
updatedAt: DateTime!
}
interface Timestamped {
createdAt: DateTime!
updatedAt: DateTime!
}
type Article implements Node & Timestamped {
id: ID!
createdAt: DateTime!
updatedAt: DateTime!
title: String!
content: String!
author: User!
}
type Comment implements Node & Timestamped {
id: ID!
createdAt: DateTime!
updatedAt: DateTime!
text: String!
author: User!
post: Post!
}
```
### Union Types
Union types represent values that could be one of several object types.
Use unions when a field can return different types without shared
fields.
```graphql
union SearchResult = Article | User | Tag | Comment
type Query {
search(query: String!): [SearchResult!]!
}
# Query example
query {
search(query: "graphql") {
__typename
... on Article {
title
content
}
... on User {
username
email
}
... on Tag {
name
count
}
}
}
```
### Enum Types
Enums define a specific set of allowed values for a field. Use enums
for fields with