From apollo-skills
Guides GraphQL schema design with best practices for types, nullability, pagination, errors, and security. Use when designing or reviewing schemas.
How this skill is triggered — by the user, by Claude, or both
Slash command
/apollo-skills:graphql-schemaThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
This guide covers best practices for designing GraphQL schemas that are intuitive, performant, and maintainable. Schema design is primarily a server-side concern that directly impacts API usability.
This guide covers best practices for designing GraphQL schemas that are intuitive, performant, and maintainable. Schema design is primarily a server-side concern that directly impacts API usability.
"""
A user in the system.
"""
type User {
id: ID!
email: String!
name: String
posts(first: Int = 10, after: String): PostConnection!
createdAt: DateTime!
}
| Pattern | Meaning |
|---|---|
| String | Nullable - may be null |
| String! | Non-null - always has value |
| [String] | Nullable list, nullable items |
| [String!] | Nullable list, non-null items |
| [String]! | Non-null list, nullable items |
| [String!]! | Non-null list, non-null items |
Best Practice: Use [Type!]! for lists - empty list over null, no null items.
# Output type - what clients receive
type User {
id: ID!
email: String!
createdAt: DateTime!
}
# Input type - what clients send
input CreateUserInput {
email: String!
name: String
}
# Mutation using input type
type Mutation {
createUser(input: CreateUserInput!): User!
}
interface Node {
id: ID!
}
type User implements Node {
id: ID!
email: String!
}
type Post implements Node {
id: ID!
title: String!
}
union SearchResult = User | Post | Comment
type Query {
search(query: String!): [SearchResult!]!
}
Detailed documentation for specific topics:
mutation(input: InputType!)Node interface for refetchabilityID type for identifiers, not String or Intnpx claudepluginhub apollographql/skills --plugin apollo-skillsDesigns GraphQL schemas with type system, SDL patterns, field design, pagination, directives, and versioning for scalable APIs.
Designs expressive, evolvable GraphQL schemas with type hierarchies, nullability contracts, action-oriented mutations, and pagination patterns.
GraphQL type systems, queries, mutations, subscriptions, and schema design patterns.