What problem does it solve?
Convex backends often require boilerplate for common patterns like loading related data, authenticated access, and data validation. This guide introduces the official convex-helpers utilities to streamline these tasks and promote best practices.
Core Features & Use Cases
- Relationship Helpers: Traverse relationships between tables in a readable, type-safe way and load related data.
- Custom Functions (Data Protection) ⭐ MOST IMPORTANT: Wrap queries/mutations to automatically enforce auth, multi-tenant access, and context injection.
- Filter Helper: Apply complex TypeScript filters to queries.
- Sessions: Track anonymous users and behavior across requests.
- Zod Validation: Use Zod schemas for validation instead of built-in validators.
- Migrations, Triggers, Aggregations: Tools to migrate data, react to changes, and compute aggregates.
- Common Patterns: Authed queries, loading related data, batch operations with error handling.
- Best Practices: Guidance to start with convex-helpers, use custom functions for auth, etc.
Quick Start
Install convex-helpers and start using its relationship, custom function, and session utilities in your Convex backend.