Convex Community

CC

Convex Community

Join the community to ask questions about Convex Community and get answers from other members.

Join

support-community

show-and-tell

general

self-hosted

announcements

using push notifications component in monorepo with react native expo

Hi all. I am attempting to use the new convex component expo push notifications. I have a monorepo (using turbo-repo + pnpm) with 2 apps: a react-native expo (SDK 52) app and my convex backend. This is (roughly) the monorepo project structure ``` apps/ convex/ expo/...
No description

Can Convex Handle Video Segmentation, Storage, and API Integration for Generating Long-Form Videos?

Hi, I’m building a video platform where users can generate short videos using a text-to-image generator. Currently, the platform can only produce 8-second videos, so for a 60-second video, I need to create multiple 8-second clips and combine them into a single video. I’d like to know if Convex can support this entire workflow, such as: ...

Underscores not allowed at start of nested fields

We've run into this issue when storing some data inside v.any() fields. This is a blocker for us cause we have to store changes of our customer's schema in Convex so it would be great to have this limit removed. If I'm missing something please let me know!...

Dynamic query builder in convex

I'm trying to do a dynamic query based on conditions ```ts import { v } from "convex/values"; import { BookingStatus } from "./lib/bookings";...

Cannot store/validate `undefined` in array?

Just making sure I'm not missing something

nextjs handling server-side errors in error page

I'm using Nextjs, and I've setup a catch all error page to handle all errors, I've set it up to show formatted convex Errors if it's instanceof ConvexError see code below: ```typescript "use client"; import ......

nullThrows has wrong type or jsdoc

```ts /** * Filters out null elements from an array. * @param list List of elements that might be null. * @returns List of elements with nulls removed....

React Testing Library + Vitest + Convex Test?

Can convex-test be used with Vitest and React Testing Library during unit tests for components? Docs for convex-test point to examples of testing queries and mutations directly (from within the backend convex directory). Can it also be used to mock component tests which indirectly trigger Convex queries and mutations? Are there best practice examples of this I can see?...

Convex migrations in self-hosted

Hi, I am evaluating convex for an app that currently uses yjs / livekit but got too complex. for the saas I can use convex hosted, but many business clients want full on premise solution so I need to self host. I see in the docs you don't support migrations, but is there any migration guide or info and are people doing it in practice? I also can't afford an enterprise plan with on premise support as I'm just getting started and they are SMBs, but I also can't adopt convex without self hosting for them on their servers, but they won't need a lot of scaling.. I will not be self-hosting the saas version. ...

mutation retries

I have a action inside a mutation. As we known the mutations will retry themselves when failed, will the acitons inside also be retried?

Conditionally Building Queries

Having trouble figuring out how to do the following without TypeScript complaining. I want to start a query like this: ```...

Exponential number of indexes required?

I'm trying to build a component that shows data according to multiple filters which can be set or unset. Can I just define one index with all these fields in there and ignore set equality filters to undefined values for the filters that are not set? If not, how should I construct my indices? The list I'm filtering over is potentially very long....
No description

Is that possible to convert a type to validator?

Hi, to better maintain types in project, I wonder if there is a way to convert types to validators?

Index on optional nested properties

Is there a reason that on the schema: ``` export const vGameState = v.object({ playerOne: v.optional( v.object({ userId: v.id("users"), username: v.string() })...
No description

Bandwidth usage multiplied by piping arguments?

Hellooo! I noticed that one of my daily cron jobs is incurring rater high bandwidth usage. We have a video streaming app, and this cron job collects all watch events within the past 24 hours (using the _creationTime index) and populates three aggregates with these documents. My specific question is this: Let's say I query 1 MB worth of data and call four functions with this as an argument:...

how to get client timezone

my app is sending email action (convex action + react email), I've rendered a date time using date.now() on the email body and when the email is sent to the client, they got the server date time, how do i compensate this ? I'm guessing that I'll need to get the request's time zone, but how ?

useQuery different return types

Hello, I'm fetching data with useQuery and for some reason it has two different return types. In one component it returns an object with the data, error, etc properties while in the other it only returns the data. returns entry type | null | undefined ```ts const entry = useQuery(api.functions.anime_entries.authSingleById, {...

How to preload data with Remix?

I understand in nextjs you can preload data with preloadQuery, but in remix it terminate the server, I also need to send the logged in user to convex, im using convex auth. Error: Environment variable NEXT_PUBLIC_CONVEX_URL is not set. I tried to add this env variable, but didnt work, in the past it did. ...

Convex + Tanstack Start + Clerk

Hi! I'm trying to add authentication using Clerk to the Trellaux example from the Tanstack-Start site (https://tanstack.com/router/latest/docs/framework/react/examples/start-convex-trellaux). However, the guides from the Convex/Clerk site do not work. ConvexProviderWithClerk seems not supported on Start, so in Convex functions I am not able to get the user identity with ctx.auth.getUserIdentity(). Is there any way to make it work? Thanks...