Convex Community

CC

Convex Community

Join the Convex Discord! Explore Convex, the fullstack TypeScript platform for developers and startup founders.

Join

support-community

show-and-tell

general

self-hosted

announcements

Upgraded the plan but it doesn't reflect the upgrade

Hi team, I have upgraded my account to pro and I see the invoice. But my account still reflects as free account. Tried emailing to support but haven't received any reply yet. Please advice. I see I can't raise a ticket since I don't have a pro.
No description

Working with Team & Deploying

I am working on a team project using Convex and have a question regarding collaboration and syncing changes across team members' cloud development environments. Scenario: We have two developers: George and Alex. Both are using separate Convex cloud development environments and have .env.local automatically configured via npx convex dev in their respective Next.js projects....

runAfter(0, ... timing

Hey! Im using runAfter to schedule a long-running operation (internal mutation) after a particular mutation is invoked (through an http api endpoint). What im seeing is that runAfter seems to be: 1. executing serially for all the invocations - ie im seeing the actions in runAfter being executed one after the other, never at the same time. 2. there is a significant delay between when i call runAfter(0, ..) and when the internal mutation gets executed. Im trying to understand what my expectations should be here. What is the timing and the mechanics of runAfter ?...

Pattern Matching in http routes

is it possible to do pattern matching for the path argument to http.route , for instance having something like /* to catch all routes

URLSearchParams size property is unsupported in Convex

```ts const params1 = new URLSearchParams('foo=bar&baz=qux') console.log(params1.size) // expected: 2, convex: undefined const params2 = new URLSearchParams({ a: '1', b: '2', c: '3' })...

Community Library for Nordcraft (ex-Toddle)

Hi there! I'm an ex-React/Next.js fullstack dev migrating my stack over to Convex and Nordcraft (ex "Toddle"). I am currently building a community package for Convex so that the Nordcraft community and myself can benefit from Convex. I am inspiring my implementation off of https://github.com/get-convex/convex-svelte...

How to use Zod for validating database writes?

I read in https://stack.convex.dev/typescript-zod-function-validation that it is possible to define a Zod schema and validate all database writes/updates using Zod. The article mentioned that, in order to do this, ctx.db must be wrapped. Does anyone have an example of how to do this? I tried to understand how rowLevelSecurity works (as it was mentioned in the article), but it seems to be beyond my comprehension. For example, I want the field of an object in db be validated like z.number().int().gt(0).safe()...

Any way to populate convex environment variables via 3rd part

Any way to use a 3rd party env management system e.g. https://infisical.com/ to pass env vars to convex at deploy time?

How to properly combine a Convex query with an action?

I'm trying to implement a query that needs to fetch some encrypted data and decrypt it using AWS KMS. However, I'm running into a TypeScript error where ctx.runAction is not available in the query context. Here's a simplified version of what I'm trying to do: ```ts export const queryEncryptedData = query({ args: { id: v.string() },...

Logout after period of Inactivity Convex + Clerk - Expo APP

Still experiencing an issue with the user getting logged out. I've put all auth logic in a wrapper hook that I have around each auth route, as putting it in the root layout causes it to attempt navigation before routing is ready, which throws an error. Any help or if someone has an example of how to implement auth flow with onboarding check with convex & clerk.

Any update on the Swift SDK

Hi I had a look at the swift SDK it seems like it has been a while since the last real update, but I wanted to know if it’s still being worked on? I wanted to use the AI Agent component with it and stream response but I don’t know if the rust sdk supports that… I know the priority is now on chef but it seem every other features have been put on hold for it, I guess it’s what makes/could the most revenue for the company...

Best Practices for Ensuring Data Consistency and Availability

Hi team, I'm building a financial app on Convex where users track spend and borrow, similar to a ledger. Given the critical nature of financial records, I want to make sure that even if the database goes down right after a transaction, no data would be lost. I have backups enabled, but since they only run once per day, I'm concerned about data between backups. Are there recommended patterns for writing critical transactions to guarantee durability immediately after a mutation succeeds? Or is there a way to get stronger durability guarantees (e.g., multi-region replication, etc.)?...

is convex down?

Can't reach server or dashboard. using cloud setup

Architecture help for search page

Hello, I would like some help w/ designing a search page that has two components: a search bar and a search results lists. I have already the docs for searching and paginations on Next.js's website. However my SearchBar component uses some useQuery hooks which causes issues w/ fetching the user. For instance, instead my SearchBar, I have 3 buttons, one of which, gets the user folders and lets the user add the search query a folder. However whenever this query is run, the user is returned null....

How do i fix: error while evaluating your schema?

I keep getting this error when running convex dev. Hit an error while evaluating your schema: Uncaught Error: Environment variables unsupported when evaluating schema...

Any working solution/examples of using TanstackStart + Convex Auth

Good day everyone I have spent the past month rebuilding a tutorial project from @CodeWithAntonio which was his JIRA clone. I Ported it to TanstackStart, Convex and Clerk from appwrite+ Next.js. I finally deployed on Netlify and i am getting some "clerk_handshake" issues that gimme a redirected too many times error whenever i try to open the site....

AuthenticationFailed: Invalid Convex deploy key

I'm trying to deploy a new project to Vercel, but just can't seem to get past this "Invalid Convex deploy key" error. I've triple checked that my NEXT_PUBLIC_CONVEX_URL and CONVEX_DEPLOY_KEY are correct. I even had them print them in the build log and they are correct. My deploy key says "Never used" I was able to deploy locally with CONVEX_DEPLOY_KEY=your-key npx convex codegen What am I missing?...

"Upgrading" Anonymous accounts to "real" accounts with email

Out of the gate when you log in to my react native application, I give you an anonymous account. My goal is to push the user into signing up and at that point we "upgrade" the account from an anon to a "proper" account. I know that this will require some custom account linking outlined briefly here: https://labs.convex.dev/auth/advanced#account-linking But from where I'm sitting I'm trying to nail down the best pattern that makes it such that the user does not lose any data. The goal being give them access to the app with as little barrier as possible and make them want to sign up. The thing that is a sticking point is right now I'm using Resend OTP codes, and I don't see a clean way to just give the built in Resend/Email functionality an existing userID, and the built in flow generates a new UserID when the flow begins. Is there a way to better call these internal things or should I just kinda... re-implement the OTP functionality? Will I have to do the same with the OAuth providers when I get to that? (Was planning on adding them in addition to OTP when the app is closer to production) Is there an example somewhere of this upgrade path? I'll happily share anything I have so far....

Convex cron jobs do not show logs for some run instances

Was wondering why on the convex dashboard under schedules / crons / [specific cron] , I can see a list of runs, but only see the logs for some of them. It's the same function, why would it log or not log out something sometimes?