I need to integrate Hasura for instant GraphQL APIs and real-time features. Here are the details:
Project Details:
- Database: [PostgreSQL, existing database, microservices integration]
- Frontend: [React + Apollo, Vue.js + GraphQL, Next.js, mobile app]
- Authentication: [JWT, webhook auth, custom auth service]
- Authorization: [role-based permissions, row-level security, dynamic rules]
- Real-time: [subscriptions, live queries, collaborative features]
- Custom logic: [Actions, Event Triggers, Remote Schemas]
- Deployment: [Hasura Cloud, self-hosted, Docker, Kubernetes]
- Integration: [existing APIs, third-party services, microservices]
What I need:
- Hasura setup and database connection
- GraphQL schema generation and customization
- Authentication and JWT configuration
- Authorization rules and permission system
- Real-time subscriptions implementation
- Actions for custom business logic
- Event Triggers for automated workflows
- Remote Schema integration
- GraphQL client setup and optimizations
- Production deployment and monitoring
Additional context: [database complexity, authorization requirements, real-time needs, existing infrastructure]
Please provide a complete working example with detailed comments.