Guide for building GraphQL servers with Apollo Server 5.x. Use this skill when: (1) setting up a new Apollo Server project, (2) writing resolvers or defining GraphQL schemas, (3) implementing authentication or authorization, (4) creating plugins or custom data sources, (5)
Installs just this skill. Get the whole plugin for auto-invocation.
โก How it fires
How this skill gets triggered: by you, by Claude, or both.
Fires itselfClaude auto-loads it when your prompt matches the work.
You can call itInvoke it directly when you want it.
Slash command/apollo-server
๐๏ธ Context preview
The summary Claude sees to decide when to auto-load this skill.
Guide for building GraphQL servers with Apollo Server 5.x. Use this skill when: (1) setting up a new Apollo Server project, (2) writing resolvers or defining GraphQL schemas, (3) implementing authentication or authorization, (4) creating plugins or custom data sources, (5)
๐ Stats
Stars98
Forks11
LanguageShell
LicenseMIT
๐ฆ Ships with apollo-skills
</> SKILL.md
apollo-server.SKILL.md
---name: apollo-server
description: >
Guide for building GraphQL servers with Apollo Server 5.x. Use this skill when:
(1) setting up a new Apollo Server project,
(2) writing resolvers or defining GraphQL schemas,
(3) implementing authentication or authorization,
(4) creating plugins or custom data sources,
(5) troubleshooting Apollo Server errors or performance issues.
license: MIT
compatibility: Node.js v20+, TypeScript 4.7+. Works with Express v4/v5, standalone, Fastify, and serverless.
metadata:
author: apollographql
version: "1.0.0"
allowed-tools: Bash(npm:*) Bash(npx:*) Bash(node:*) Read Write Edit Glob Grep
---# Apollo Server 5.x Guide
Apollo Server is an open-source GraphQL server that works with any GraphQL schema. Apollo Server 5 is framework-agnostic and runs standalone or integrates with Express, Fastify, and serverless environments.
## Quick Start
### Step 1: Install
```bash
npm install @apollo/server graphql
```
For Express integration:
```bash
npm install @apollo/server @as-integrations/express5 express graphql cors
{ title: "The Great Gatsby", author: "F. Scott Fitzgerald" },
{ title: "1984", author: "George Orwell" },
],
},
};
```
### Step 4: Start Server
**Standalone (Recommended for prototyping):**
The standalone server is great for prototyping, but for production services, we recommend integrating Apollo Server with a more fully-featured web framework such as Express, Koa, or Fastify. Swapping from the standalone server to a web framework later is straightforward.
```typescript
import { ApolloServer } from "@apollo/server";
import { startStandaloneServer } from "@apollo/server/standalone";
const server = new ApolloServer({ typeDefs, resolvers });