useQuery; updates push automatically when data changes.
Anatomy
convex/tasks.ts
argsvalidators (Convex enforces and types).ctx.dbfor database access.ctx.authfor the calling user’s identity.
On the client
Patterns
- Filter by index
- Sort and limit
- Conditional reads
- Auth scoping
Limits
- Cannot mutate the database.
- Cannot call third-party APIs — use actions for that.
- 10-second timeout per call.
Tips
Related
Schema
Define tables and indexes.
Mutations
Write data.
Indexes
Make queries fast.
