Another release for you all! Here are the changes in 0.4.0 (details below):

  • Paginated Queries
  • Professional Plan
  • Snapshot Export
  • Airbyte Connector
  • Minor Improvements

Let us know what you think on our community Discord server.

Paginated Queries

Paginated queries are here!

Paginated queries allow you to load results from query functions incrementally. This allows you to build components with "Load More" buttons or "infinite scroll" interfaces where more results are loaded as the user scrolls.

Defining a paginated query function is as simple as calling .paginate on your existing database query:

import { PaginationOptions } from "convex/server";
import { query } from "./_generated/server";

export default query(async ({ db }, opts: PaginationOptions) => {
  return await db.query("messages").order("desc").paginate(opts);
});

convex/listMessages.ts

We also now have a new usePaginatedQuery React hook that allows you to load paginated queries within React components and control when to load more results.

const { results, status, loadMore } = usePaginatedQuery("listMessages", {
  initialNumItems: 5,
});

App.tsx

To learn more, see the documentation on paginated queries.

Professional Plan

We’ve added a pricing sheet highlighting our professional plan. It’s perfect for small teams working together on growing projects. To upgrade to professional, go to the “Settings” page for your team in the dashboard and click “Billing”.

If your needs exceed the professional plan, contact us.

Snapshot Export

Convex now has support for exporting all of your data in a JSON format. This can be useful for backing up your data, or importing it into another application.

To download your data, go to the “Settings” page for your project’s deployment on the dashboard, and click “Export data”. To learn more, see the snapshot export documentation.

Airbyte Connector

Syncing your data out of Convex just got easier. You can now configure an Airbyte connector to sync your Convex data into another database. This can be useful for using data analytics platforms like Databricks or Snowflake with Convex or syncing Convex data to ElasticSearch.

To learn about how to connect your Convex project using Airbyte, see our documentation. Note that the Professional Plan is required to use the Airbyte connector.

Minor Improvements

  • Convex schemas now support s.any(). This generates an any type in TypeScript which is useful for fields that can’t be typed with the existing schema builder or parts of your schema that you’d like to leave untyped.
  • You can now edit the unique slug for your project in the dashboard's Project Settings page. Be sure to update the "project" field in your convex.json file after changing the slug!