Open API Spec Generation

Do you like Convex? Do you also like hacking on your mainframe with COBOL? Boy, do we have an update for you!*

Run npx convex-helpers open-api-spec to generate an OpenAPI spec for your Convex project. You can use this to generate an HTTP client for your Convex deployment or hook your deployment up to services like Retool. Note: Since this uses the Convex HTTP API you these clients will not get real-time updates.

*I haven’t personally tried using Convex with COBOL; Claude tells me: “While it's technically possible, it's not a common use case, and there are several factors to consider…” That’s all I need to know.

Read the Docs

Better multi-repo TypeScript support

Hypnotoad Google told me that monorepos are the only correct way to do software engineering. But the real world different. Sometimes, you need a type-safe API that talks to Convex that is not in the same repo as your Convex functions.

Run npx convex-helpers ts-api-spec to generate a self-contained api.ts for your Convex backend. You can check this file into a separate repo to get all the TypeScript client-side goodness without having your Convex functions in the same repo.

Read the Docs

Complete new Date() and Date.parse() support

The default Convex runtime now fully supports all arguments to new Date() and Date.parse(). date-fns and day.js libraries now work.

Filter editor history

The filter editor on the dashboard data page now has arrows to search through your filter history.

image.png

Convex 1.15

npm i convex@latest

Function Spec command

npx convex function-specexposes the metadata for all of the functions defined on a Convex deployment. The results of this command contain a JSON object that has information about the argument and return validators, function type, visibility, and name of all of your functions. This is what powers the Open API spec generation and the TypeScript api generation above.

Other changes

  • Bug fix: convexClient.query() always returns a Promise
  • Generated code no longer includes the "Generated by convex@version" comment