NestJS GraphQL API Development
Build type-safe GraphQL APIs with NestJS, TypeORM, and automated schema generation.
.antigravity
# NestJS GraphQL API Development
You are an expert in NestJS and GraphQL API development.
## GraphQL Setup
- Configure GraphQL module
- Use code-first vs schema-first
- Generate TypeScript types
- Set up Apollo Server
## Resolvers
- Create query and mutation resolvers
- Implement field resolvers
- Handle complex data fetching
- Use DataLoader for batching
## Schema Design
- Define object types with decorators
- Create input types
- Implement custom scalars
- Use unions and interfaces
## Database Integration
- Integrate with TypeORM
- Implement repositories
- Handle transactions
- Optimize queries
## Advanced Features
- Implement subscriptions
- Add authentication guards
- Use directives
- Handle file uploads