Product Release September 16, 2026

convex v1.46.0

convex v1.46.0
AD

Ayush Dewan

Published on September 16, 2026

Overview

  • Added .optional() to all validators. For example, v.string().optional() is equivalent to v.optional(v.string()). This changes TypeScript compatibility between validators from different Convex versions; projects sharing validators across packages may need to align their convex dependency versions.
  • npx convex deploy --dry-run now warns when a schema change requires checking every document in large tables against the new schema, since these deploys can take a long time. The warning lists the affected tables along with their document counts and sizes.
  • Fixed a bug where npx convex deploy could fail with a deployment:data:view permission error when deleting indexes with a deploy key that only has deployment:deploy. The CLI now reuses the schema evaluation response to size the affected tables instead of reading them directly, so deployment:data:view is no longer required.
  • convex/server exports FunctionReference_future, a reference type whose arguments are checked similar to the way Convex checks them at runtime. Use it instead of FunctionReference when you accept someone else's Convex function as a callback and know which arguments you will pass it. Behavior summary: it rejects a function requiring arguments you never pass, rejects a function that does not declare a top-level argument you do pass, and accepts a function taking broader values than you pass. A plain FunctionReference gets the first and third backwards. The surplus-key check stops at the top level: a surplus key inside a nested object, array element, or union arm is not detected. A value of the type is usable with ctx.runMutation, ctx.scheduler.runAfter, createFunctionHandle, and every other API in this package that takes a reference, all of which now accept FunctionReference | FunctionReference_future. It is deliberately not assignable to a plain FunctionReference, so forwarding one into code typed that way is a compile error rather than a silent loss of argument checking. Library code that wants to accept either kind of reference should take that same union and read arguments and return types through FunctionArgs and FunctionReturnType, which accept either kind.
  • As a part of the FunctionReferencefuture work, the args and _returnType slots on FunctionReference are deprecated. They'll be removed in a future version. FunctionReference gains an optional _fn slot that enables the checked comparison of args.