Remote OpenClaw Blog
OpenClaw Skills for GraphQL API Development
7 min read ·
GraphQL APIs have a lot of surface area. Schema design, resolver implementation, data loader patterns, authentication, subscriptions, client-side caching — each layer has its own best practices and its own ways to go wrong. AI agents handle basic GraphQL schema definitions adequately, but the real-world patterns that make a GraphQL API performant and maintainable require specialized knowledge.
OpenClaw skills give your agent the depth it needs to produce production-quality GraphQL code. Instead of a resolver that triggers N+1 queries or a schema that paints you into a versioning corner, your agent generates code that follows the patterns used by teams shipping GraphQL at scale.
This guide covers the best GraphQL skills in the OpenClaw Bazaar skills directory.
Schema Design Skills
A well-designed GraphQL schema is the foundation of a good API. Schema design decisions are hard to reverse once clients depend on them.
graphql-schema-design (10,100 installs)
This is the most installed GraphQL skill on the Bazaar. It teaches your agent to design schemas following the Relay connection specification for pagination, use proper nullability defaults (nullable by default in GraphQL, but the skill teaches when non-null is appropriate), and structure types to avoid over-fetching and under-fetching.
The skill covers naming conventions, input type patterns for mutations, interface and union types for polymorphic data, and the custom scalar pattern for types like DateTime, URL, and EmailAddress. It also addresses the common mistake of designing a schema that mirrors the database structure rather than the client's needs — a pattern that leads to tightly coupled APIs that are painful to evolve.
One area where this skill is especially valuable is mutation design. It teaches your agent to use input types for mutation arguments, return mutation-specific payload types (not just the modified entity), and include user-facing error information in the payload rather than relying solely on GraphQL errors.
graphql-federation (5,800 installs)
For organizations using Apollo Federation to compose multiple subgraph schemas into a single supergraph, this skill teaches your agent to design federated schemas. It covers entity definition with @key, reference resolvers, extending types from other subgraphs with @external and @requires, and the composition rules that determine whether subgraphs can merge without conflicts.
Federation has specific patterns for handling relationships between subgraphs — which fields belong to which subgraph, how to share types without creating ownership conflicts, and when to use @shareable versus @inaccessible. Agents without this skill tend to produce schemas that fail composition validation.
Resolver and Server Skills
Resolvers are where your schema meets your data, and performance problems almost always originate here.
apollo-server-resolvers (9,300 installs)
This skill teaches your agent to implement resolvers for Apollo Server with proper patterns. It covers resolver function signatures (parent, args, context, info), context setup for authentication and database connections, and the middleware pattern using custom directives for authorization, rate limiting, and input validation.
The data loader pattern gets extensive coverage. DataLoader batches and deduplicates database queries within a single GraphQL request, eliminating the N+1 problem that plagues naive resolver implementations. The skill teaches your agent to create DataLoader instances per request, structure loader keys for batch functions, and handle error states where some items in a batch fail while others succeed.
It also covers the info parameter, which most agents ignore entirely. The info object contains the parsed query AST, and advanced resolvers use it to optimize database queries based on which fields the client actually requested — a technique called look-ahead optimization.
graphql-yoga-server (4,600 installs)
For teams using GraphQL Yoga instead of Apollo Server, this skill provides equivalent resolver and server configuration patterns. It covers Yoga's plugin system with envelop plugins, the useGenericAuth plugin for authentication, and Yoga-specific patterns for file uploads, server-sent events, and integration with various HTTP frameworks including Express, Fastify, and standalone Node.js.
graphql-context-auth (6,200 installs)
Authentication and authorization in GraphQL deserve their own skill because the patterns are fundamentally different from REST. In REST, you authorize at the endpoint level. In GraphQL, you need field-level authorization because a single query can touch data from multiple domains.
This skill teaches your agent to implement context-based authentication (extracting and validating tokens in the context factory), field-level authorization using custom directives (@auth, @hasRole), and the data-source-level authorization pattern where permission checks happen in the data layer rather than the resolver layer. It also covers the pattern for returning partial results when some fields are authorized and others are not.
Apollo Client Skills
The client side of GraphQL has its own complexity, especially around caching, optimistic updates, and state management.
apollo-client-patterns (8,700 installs)
This skill teaches your agent to use Apollo Client effectively. It covers cache configuration with InMemoryCache and type policies, query and mutation hooks (useQuery, useMutation, useLazyQuery), and the reactive variable pattern for local state management.
Marketplace
Free skills and AI personas for OpenClaw — browse the marketplace.
Browse the Marketplace →Cache management is where this skill is most valuable. Apollo Client's normalized cache is powerful but requires understanding of cache key generation, typePolicies for customizing how entities merge, and cache.modify for manually updating the cache after mutations. Agents without this skill frequently generate mutation code that requires a full refetch instead of a cache update, which defeats one of GraphQL's key advantages.
The skill also covers error handling patterns — the errorPolicy option on queries, partial data rendering when some fields error, and the error link pattern for global error handling including token refresh on 401 responses.
apollo-client-codegen (5,500 installs)
Type safety between GraphQL operations and TypeScript code is essential for large projects. This skill teaches your agent to set up GraphQL Code Generator with Apollo Client, configure codegen.yml for generating typed hooks and document nodes, and structure GraphQL operations in .graphql files that the generator consumes.
It covers the common configurations: typescript, typescript-operations, and typescript-react-apollo plugins for generating typed React hooks, and the near-operation-file preset for colocating generated types with their GraphQL operations. The skill also handles fragment colocation — defining fragments next to the components that use them and composing them into queries at higher levels.
Code Generation Skills
Beyond client-side code generation, GraphQL enables powerful schema-first and code-first workflows.
graphql-codegen-full-stack (7,200 installs)
This skill extends code generation beyond the client. It teaches your agent to generate TypeScript types from the schema for the server side (resolver types, context types, enum mappings), generate client-side operation types, and maintain type safety across the entire stack from schema definition through resolver implementation to client consumption.
The resolver type generation is particularly useful. Instead of manually typing resolver function signatures, the generated types ensure that resolver return values match the schema. This catches mismatches at compile time rather than at runtime, which is especially valuable when agents are generating both schema and resolvers.
graphql-schema-codegen (3,900 installs)
For code-first schema definition — where TypeScript classes or objects define the schema rather than SDL — this skill covers TypeGraphQL, Nexus, and Pothos. It teaches your agent to define types, fields, and resolvers using each library's decorator or builder API, and to generate the SDL schema from the code-first definitions for use in tooling and documentation.
Testing Skills
Testing GraphQL APIs requires testing at multiple levels: unit tests for resolvers, integration tests for the full query execution, and client-side tests for component-query integration.
graphql-testing-patterns (6,800 installs)
This skill covers testing across the GraphQL stack. On the server side, it teaches your agent to test resolvers in isolation with mocked context and data sources, test full query execution with executeOperation from Apollo Server, and test schema validation to catch breaking changes.
On the client side, it covers MockedProvider from Apollo Client for component testing, creating mock responses that match the cache normalization behavior, and testing loading and error states. It also teaches your agent to use graphql-schema-linter and graphql-inspector for automated schema review in CI pipelines.
Subscription Skills
GraphQL subscriptions enable real-time data delivery over WebSocket connections, adding another layer of complexity.
graphql-subscriptions (5,100 installs)
This skill teaches your agent to implement subscriptions with both the legacy subscriptions-transport-ws protocol and the newer graphql-ws protocol. It covers PubSub implementations — the in-memory PubSub for development and Redis-backed PubSub for production with multiple server instances — and the filtering pattern where subscriptions receive only events relevant to the subscribing client.
On the client side, the skill covers WebSocket link configuration with @apollo/client, subscription hooks with useSubscription, and the subscribeToMore pattern for adding real-time updates to existing query results. It also addresses the operational concerns: connection retry logic, authentication over WebSocket, and graceful degradation when the WebSocket connection drops.
Recommended Combinations
For a new GraphQL API project, start with graphql-schema-design, apollo-server-resolvers, and graphql-testing-patterns. Add graphql-context-auth when you need authentication. For the client side, add apollo-client-patterns and apollo-client-codegen.
For full-stack type safety, add graphql-codegen-full-stack. For real-time features, add graphql-subscriptions.
Explore all GraphQL skills in the OpenClaw Bazaar skills directory.
Browse the Skills Directory
Find the right skill for your workflow. The OpenClaw Bazaar skills directory has over 2,300 community-rated skills — searchable, sortable, and free to install.
Built a Skill? List It on the Bazaar
If you have built a skill that others would find useful, publish it on the Bazaar. Reach thousands of developers and get feedback from the community.