Files
wehub-resource-sync bb5c75ce05
Component Security Validation / Security Audit (push) Has been cancelled
Deploy to Cloudflare Pages / deploy (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:38:58 +08:00

1 line
1.8 KiB
JSON

{"content": "---\nallowed-tools: Read, Write, Edit, Bash\nargument-hint: [schema-approach] | --schema-first | --code-first | --federation\ndescription: Implement GraphQL API with comprehensive schema, resolvers, and real-time subscriptions\n---\n\n# Implement GraphQL API\n\nImplement comprehensive GraphQL API with modern best practices: **$ARGUMENTS**\n\n## Current Application Context\n\n- Framework: @package.json or @requirements.txt (detect Apollo, GraphQL Yoga, etc.)\n- Existing API: !`find . -name \"*.graphql\" -o -name \"*schema*\" -o -name \"*resolver*\" | wc -l`\n- Database integration: @prisma/schema.prisma or database connection configs\n- Authentication: !`grep -r \"auth\\|jwt\\|context\" src/ 2>/dev/null | wc -l`\n\n## Task\n\nBuild production-ready GraphQL API with comprehensive functionality and performance optimization:\n\n**Schema Approach**: Use $ARGUMENTS to specify schema-first, code-first, or federation architecture\n\n**GraphQL Implementation**:\n1. **Schema Design** - Type definitions, queries, mutations, subscriptions, custom scalars\n2. **Resolver Architecture** - Data fetching, authentication, authorization, error handling\n3. **DataLoader Integration** - N+1 query prevention, batch loading, caching strategies\n4. **Real-time Features** - WebSocket subscriptions, live data updates, connection management\n5. **Security & Performance** - Query complexity analysis, depth limiting, rate limiting\n6. **Development Tools** - GraphQL Playground, introspection, schema stitching\n\n**Advanced Features**: File uploads, federated schemas, Apollo Federation, schema directives, and monitoring.\n\n**Production Readiness**: Implement comprehensive error handling, logging, metrics, and deployment strategies.\n\n**Output**: Complete GraphQL API with optimized resolvers, real-time capabilities, security controls, and developer documentation."}