Back to Skills

graphql-fundamentals

verified

Master GraphQL core concepts - types, queries, mutations, and subscriptions

View on GitHub

Marketplace

pluginagentmarketplace-graphql

pluginagentmarketplace/custom-plugin-graphql

Plugin

developer-roadmap

Repository

pluginagentmarketplace/custom-plugin-graphql
1stars

skills/graphql-fundamentals/SKILL.md

Last Verified

January 20, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/pluginagentmarketplace/custom-plugin-graphql/blob/main/skills/graphql-fundamentals/SKILL.md -a claude-code --skill graphql-fundamentals

Installation paths:

Claude
.claude/skills/graphql-fundamentals/
Powered by add-skill CLI

Instructions

# GraphQL Fundamentals Skill

> Master the building blocks of GraphQL APIs

## Overview

This skill covers the essential GraphQL concepts every developer needs. From type definitions to query operations, you'll learn the foundation for building GraphQL APIs.

---

## Quick Reference

| Concept | Syntax | Example |
|---------|--------|---------|
| Scalar | `String`, `Int`, `Float`, `Boolean`, `ID` | `name: String!` |
| Object | `type Name { fields }` | `type User { id: ID! }` |
| Input | `input Name { fields }` | `input CreateUserInput { name: String! }` |
| Enum | `enum Name { VALUES }` | `enum Status { ACTIVE INACTIVE }` |
| List | `[Type]` or `[Type!]!` | `tags: [String!]!` |
| Non-null | `Type!` | `id: ID!` |

---

## Core Concepts

### 1. Type System

```graphql
# Scalar types (built-in)
type Example {
  id: ID!           # Unique identifier
  name: String!     # Text
  age: Int          # Integer (nullable)
  score: Float!     # Decimal
  active: Boolean!  # True/false
}

# Custom scalars
scalar DateTime
scalar JSON
scalar Upload

# Object types
type User {
  id: ID!
  email: String!
  profile: Profile    # Nested object
  posts: [Post!]!     # List of objects
}

type Profile {
  bio: String
  avatar: String
}

# Enums
enum UserRole {
  ADMIN
  EDITOR
  VIEWER
}

# Input types (for mutations)
input CreateUserInput {
  email: String!
  name: String!
  role: UserRole = VIEWER  # Default value
}

# Interfaces
interface Node {
  id: ID!
}

type User implements Node {
  id: ID!
  name: String!
}

# Unions
union SearchResult = User | Post | Comment
```

### 2. Queries

```graphql
# Schema definition
type Query {
  # Single item
  user(id: ID!): User

  # List with optional filter
  users(filter: UserFilter, limit: Int = 10): [User!]!

  # Search
  search(query: String!): [SearchResult!]!
}

# Client query examples
query GetUser {
  user(id: "123") {
    id
    name
    email
  }
}

query GetUsersWithFilter {
  users(filter: { role: ADMIN }, limit: 5) {
    id
    nam

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
4576 chars