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

open-source

announcements

Docs feedback: CLERK_SECRET_KEY is not findable

This critical (edit: I'm not actually sure which scenarios it is required) environment variable, CLERK_SECRET_KEY, is not in plain text, so therefore not findable in documentation. It is burned into an image on https://docs.convex.dev/auth/clerk...

React quickstart breaks on `npm run dev:frontend`

I ran npm create convex@latest and then npm run dev but I'm getting an error. ``` % npm run dev:frontend ...

I just finished the tutorial and I have some questions

* Can Convex do local-first? Work offline and sync later? * Is it possible to run your own convex reactor? (Like github co-location) * Do companies need to worry about Convex having access to their data? * This is vendor lock-in, right? * What happens if you exceed the maximum quotas?...

Sign in flow not working on deployment on AWS Amplify

I am using the Clerk, Convex template and the sign in flow on the frontend works on my local deployment. However, it does not work on the deployment that we have on AWS Amplify. Is there a configuration that we are missing causing this issue? Here is a screenshot of the env variables configured within Amplify
No description

Getting current user id in mutation

Hi! I'm trying to post a comment related to defined item. I pass itemId as an argument but i want to use current user's id as a comment author. I've configured simple password login. I could see in database that fields i used in withIndex are equal but i couldnt pass identity.subject as is as it is not Id<users> field. thus query returns empty array. How to do this correctly? Should I use users collection instead of authAccounts? ...

convex-python client freezing when using set_auth

Hi Convex team! I've encoutered a strange error: convex client is freezing on query when the .set_auth(<token>) is used prior to the query. ...

How to handle metadata fetching in nextjs(14.2.14) + Convex

If for instance I want to have the some of the user's information as metadata, How do I go by doing this with convex? cause it works just in development for me.

Next.js 15 (Canary) - Issue with Convex Auth Context

I'm using Next.js 15 (canary version), and everything works fine most of the time. However, occasionally after a hard reload, the middleware indicates the user is authenticated, but mutations fail because the ctx.user is undefined. For example, inside a mutation: ... const userId = await getAuthUserId(ctx) ... returns undefined, This issue seems to resolve itself after a few refreshes....

React Native Deployment

Please I need help to deploy for react native. I have tried so many maneouvers but the app just can't get the CONVEX_URL. I'm using expo for development and using eas build for deployment. The best result I go recently when I tried pushing to google store is in the screenshot attached. I have updated my environment vairables on eas and still nothing....
No description

Union schema: no type inference?

Why is the type not correctly inferred when querying a table with a union schema (see image)?
No description

Convex-helpers zod.ts typescript error caught by npx tsc

Everytime we run npx tsc in our project this specific zod.ts has a error that is caught, and we cant get typescript to ignore it. We are in a expo app, with convex installed, and 1 shared tsconfig in the root: ```ts...
No description

Tutorial doesn't actually work with Node 16

If you do the tutorial steps to start developing with Convex with Node v16.10.0, you'll get an error: ``` npm run dev ...

nextjs issue

After starting a new fresh project using nextjs, i tried to install convex-helpers, it throws this error when installing convex-helpers,.
npm install convex-helpers@latest
npm ERR! code ERESOLVE...

Ignoring _generated in pull requests/git diff

Hey, does anybody know how to do this? It's suggested to not gitignore the _generated files for CI/CD reasons (and we concur with this), but we would still like to not have the files show up in our diffs for pull requests. We tried putting the belowin a .gitattributes file, but seems like that doesnt apply to github pull requests. Anybody have some advice for this? Thanks! 🇩🇰 ```/convex/_generated/* -diff...

Cron Jobs, Actions, Internal Mutation

I am trying to call gemini api from my backend and I want to record response to the db. After that I want to make a cron job to call this action. I also want world peace.

table value in array when querying

I can’t find a way to check if, say, a number is in an array of numbers when querying the db

CRDT for text editors

@ian what was the reason to choose automerge vs Yjs? I currently use Yjs to sync a react flow nested tree structure, where each node has a lot of data including many text editor blocks (currently using blocknote based on tiptap+prosemirror). But the Yjs sync with the react state manager became too complex and slow, and wanted to switch to convex for everything except the text editors to handle merges / conflicts better. And blocknote is not good for nested schemas (I want nested custom block types, some react RSC) so I need to switch to pure prosemirror or another CRDT text editor. ...

Convex's compatibility

Can someone provide more clarity about these issues: - Is it possible to talk to the Convex database in natural language? - Quite a few people have been showing the power of Postgres with natural language. - Here is a demo- where AI automatically generates relevant queries and give output- https://vercel.com/templates/next.js/natural-language-postgres...

How to query items where array field contains a specific value?

I have a paginated query where I need to filter items based on whether an array field contains a specific category ID. Currently, my query only returns items where the array exactly matches [categoryId], but I need it to return items where categoryId is one of potentially many elements in the array. Here's my current query: ```typescript...

Calculating average rating across a large dataset

Hello! I'm currently looking to build a feature that shows the average rating of a show based on entry logged by users. This is my first time approaching something like this Convex. I was wondering if there were any recommended solutions? I was looking into the Aggregate convex component to potential solve my problem. The only issue I've have with that approach is that a user can log an entry without rating it, but the sameValue does not accept undefined. ```ts export const animeStatsByEntry = new TableAggregate<{ Namespace: Id<'anime'>...