What problem does it solve?
Convex queries are essential for retrieving data in Convex apps, but without structured patterns and conventions it’s easy to write inconsistent, hard-to-maintain code. This skill provides clear guidance for defining, registering, calling, and optimizing queries, including pagination, indexing, and full-text search.
Core Features & Use Cases
- Guidance on function definition, argument validators, and return value patterns for both public queries and internal queries.
- Practical patterns for registering queries, calling them from mutations or actions via ctx.runQuery, and leveraging file-based routing references.
- Pagination, indexing, and full-text search guidelines to build scalable, high-performance read paths.
- Use Case: When building a Convex-backed application that lists or filters large datasets, these patterns help ensure correctness, performance, and maintainability.
Quick Start
Read the reference guidelines in references/query-guidelines.md and apply them to implement a sample query function with validators, indexing, and a straightforward call path from a mutation using ctx.runQuery.