convex-functions
Build Convex queries, mutations, actions, and HTTP endpoints with validation, error handling, and proper runtime considerations.
- Four function types for different use cases: queries (read-only, cached, reactive), mutations (transactional writes), actions (external API calls), and HTTP actions (webhooks and API endpoints)
- All functions require explicit argument and return validators using Convex's
vschema system, with ConvexError for user-facing error messages - Internal functions restrict sensitive operations to server-side calls only; actions access the database indirectly via
runQueryandrunMutation - Includes scheduling support for delayed function execution and comprehensive examples covering messaging, payments, webhooks, and notification workflows
Convex Functions
Master Convex functions including queries, mutations, actions, and HTTP endpoints with proper validation, error handling, and runtime considerations.
Code Quality
All examples in this skill comply with @convex-dev/eslint-plugin rules:
- Object syntax with
handlerproperty - Argument validators on all functions
- Explicit table names in database operations
See the Code Quality section in convex-best-practices for linting setup.
Documentation Sources
Before implementing, do not assume; fetch the latest documentation:
More from waynesutton/convexskills
convex
Umbrella skill for all Convex development patterns. Routes to specific skills like convex-functions, convex-realtime, convex-agents, etc.
5.5Kconvex-best-practices
Guidelines for building production-ready Convex apps covering function organization, query patterns, validation, TypeScript usage, error handling, and the Zen of Convex design philosophy
3.1Kconvex-schema-validator
Defining and validating database schemas with proper typing, index configuration, optional fields, unions, and migration strategies for schema changes
2.2Kconvex-realtime
Patterns for building reactive apps including subscription management, optimistic updates, cache behavior, and paginated queries with cursor-based loading
2.1Kconvex-cron-jobs
Scheduled function patterns for background tasks including interval scheduling, cron expressions, job monitoring, retry strategies, and best practices for long-running tasks
2.0Kconvex-http-actions
External API integration and webhook handling including HTTP endpoint routing, request/response handling, authentication, CORS configuration, and webhook signature validation
2.0K