Doogibo
CCConvex Community
•Created by Doogibo on 12/13/2024 in #support-community
VERCEL_URL - dynamic Convex env
Hey there! I need to figure out the best way to handle VERCEL_URL. We are constructing clerk invitations in our Convex functions and need to generate a redirect url for the invitations. We want this to work for our preview deploys and prod. Prod is easy technically as it's a static domain and we could just explicitly set VERCEL_URL in the dashboard, but this doesn't work for previews.
So what is the best/easiest option for setting this in Convex during Vercel deployments? Thank you!
26 replies
CCConvex Community
•Created by Doogibo on 11/29/2024 in #support-community
Conditionally Building Queries
Having trouble figuring out how to do the following without TypeScript complaining.
I want to start a query like this:
And conditionally add to it. Then later for an indexed query:
Then later, an optional in memory filtering.
Something like that anyway. But I run into:
is missing the following properties from type 'QueryInitializer<{ document: { _id: Id<"requests">; _creationTime: .... etc.
10 replies
CCConvex Community
•Created by Doogibo on 10/16/2024 in #support-community
Optional One-To-Many Issue - Ents
Hello! First I want to say I am loving using Convex, so thank you for creating such a fantastic product with a wonderful developer experience.
I have read through the issues relating to this and I just want to get final confirmation that what I'm trying to do is not currently possible, and that I am correct about the recommended approach if I am using Ents.
A request needs to have a "requester" and a "createdBy"; however, the approvedBy should be null until a future state when it is approved. I feel like this is a fairly common scenario. The error is
Edge "approvedBy" in table "requests" has too many potential inverse
; but what the problem really is, is that I cannot add optional
.
It sounds like the recommendation is to turn it into a many-to-many relationship, which enabled 0-many, even though in this case it doesn't really make sense. Maybe back to the drawing board on the model to find another creative way around this. Thoughts?3 replies