graphqlDesign GraphQL schemas and resolvers with proper performance, security, and error handling.
Install via ClawdBot CLI:
clawdbot install ivangdavila/graphql| Topic | File |
|-------|------|
| Schema design patterns | schema.md |
| Security and limits | security.md |
| Performance optimization | performance.md |
| Client-side patterns | client.md |
name: String!CreateUserInput vs User; allows different validationusers(first: 10, after: "cursor") returns edges + pageInfofirst/after, last/beforeâstable across insertionslimit/offsetâsimpler but skips or duplicates on concurrent writespageInfo { hasNextPage, endCursor }âclient knows when to stoptotalCount expensive on large datasetsâmake optional or estimate{ user { friends { friends { friends... } } } }"path": ["user", "posts", 0]"extensions": {"code": "FORBIDDEN"}; don't parse message__resolveType for unions/interfacesârequired to determine concrete type@defer for slow fieldsâreturns fast fields first, streams slow ones (if supported)graphql-ws protocol; separate from HTTPGenerated Mar 1, 2026
An online retailer uses GraphQL to fetch product details, reviews, and inventory status in a single query, reducing over-fetching common in REST APIs. By implementing DataLoader, they batch requests for user profiles across multiple product reviews, preventing N+1 issues. Security measures like query depth limiting protect against malicious queries that could slow down the system during peak sales.
A social network leverages GraphQL to traverse user connections, posts, and comments efficiently, designing schemas with nullable fields and cursor-based pagination for stable feeds. They use subscriptions with WebSocket protocols for real-time updates on new posts, scaling via Redis pub/sub for multi-server environments. Error handling with partial success ensures users see available data even if some resolver fields fail.
A healthcare provider implements GraphQL to securely access patient records, appointments, and test results with field-level auth in resolvers for HIPAA compliance. They employ persisted queries and allowlisting in production to prevent exploratory attacks, while using mutations with idempotency keys for critical updates like prescription orders. Performance optimizations include @defer for slow fields like lab reports.
A fintech company uses GraphQL to aggregate data from multiple sources like accounts, transactions, and market trends into a unified dashboard. They apply query complexity scoring and rate limiting by complexity to prevent DoS attacks, with normalized caches on the client-side for real-time updates. Schema design avoids deeply nested types to keep resolver complexity manageable for high-frequency data.
A travel agency adopts GraphQL to query flights, hotels, and car rentals in one request, using connections for pagination to handle large result sets. They implement error handling with extensions for codes like 'UNAVAILABLE' to guide user retries, and optimize performance with fragment colocation in components to reduce over-fetching. Security traps like disabling introspection in production protect sensitive pricing logic.
A company offers a GraphQL-based SaaS that helps businesses design and secure their APIs, charging subscription fees based on query volume and complexity. Revenue comes from tiered plans that include features like persisted queries, rate limiting, and analytics. They target enterprises needing scalable GraphQL solutions with built-in performance and security tools.
A consultancy specializes in GraphQL implementation, providing services for schema design, resolver optimization, and security audits. Revenue is generated through project-based contracts and ongoing support retainers. They serve industries like e-commerce and healthcare, helping clients avoid common mistakes like N+1 problems and over-fetching.
A developer creates open-source GraphQL tools, such as DataLoader libraries or security plugins, and monetizes through premium versions with advanced features. Revenue streams include licensing for enterprise use, paid support, and hosted solutions. This model leverages community adoption to drive sales of enhanced performance and integration capabilities.
đŹ Integration Tip
Integrate DataLoader early to batch database queries and prevent N+1 issues, and implement query depth and complexity limits from the start to secure against malicious requests.
Use the mcporter CLI to list, configure, auth, and call MCP servers/tools directly (HTTP or stdio), including ad-hoc servers, config edits, and CLI/type generation.
Connect to 100+ APIs (Google Workspace, Microsoft 365, GitHub, Notion, Slack, Airtable, HubSpot, etc.) with managed OAuth. Use this skill when users want to...
Build, debug, and deploy websites using HTML, CSS, JavaScript, and modern frameworks following production best practices.
YouTube Data API integration with managed OAuth. Search videos, manage playlists, access channel data, and interact with comments. Use this skill when users want to interact with YouTube. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway).
Scaffold, test, document, and debug REST and GraphQL APIs. Use when the user needs to create API endpoints, write integration tests, generate OpenAPI specs, test with curl, mock APIs, or troubleshoot HTTP issues.
Search for jobs across LinkedIn, Indeed, Glassdoor, ZipRecruiter, Google Jobs, Bayt, Naukri, and BDJobs using the JobSpy MCP server.