Convex Community

CC

Convex Community

Join the Convex Discord! Explore Convex, the open-source reactive database for app developers.

Join

support-community

show-and-tell

general

self-hosted

announcements

BetterAuth + Convex - cannot get the setup right, docs unclear

I posted this in the components forum, but maybe it was more suited to be posted here: https://discord.com/channels/1019350475847499849/1438480249271619726 Any help is very much appreciated...

Local Deployment Fails on Windows Due to Malformed Path

Hi Convex team, I'm having trouble running a local deployment on Windows. When I run: ```...

onSuccess issue with CustomAction

I've been trying to use customAction and customQuery for adding a user check and inject the userId for filtering future queries and register actions with it. Honestly i'm lost at this point, i'm fairly new to Convex but i been working with it for 2 months, tried follow the examples in docs and check different ways to write it but nothing works. i have to add the skipLibCheck=true because there is a circular reference that makes no issue with the code base but types keeps on screaming. Thank you so much to anyone that takes the time give it a look. Code : ...

"Too many bytes read" when using an index + filter, but no issues when removing the filter

Hey all, My understanding is that I should use an index to minimize the number of returned results, and using a filter beyond that will only filter on that subset of documents (vs a whole table scan). I'm seeing slightly different behavior than expected....

is there a way to run an action like it were a query?

I want to fetch data from an authenticated, external API endpoint. I can only fetch inside an action, but it seems like useAction only returns a function that I can call and get back a promise (as if it were a mutation). Is there any tooling to allow me to use an action as if it were a query? I've searched discord and asked AI and seems like maybe the best bet is do wire it up to tanstack query or similar to do the execution of the action inside my component, whatever deduping and client caching I want to do, etc. I would have expected Convex to provide more tooling around this given the limits of "no fetching in queries". And mirroring all the external API data into my Convex DB doesn't seem like a great solution either....

.query vs .onUpdate - any performance differences?

Hey :wave: - was curious about if I should have any reservations about using .onUpdate as my main way of fetching data from convex I’m writing a discord bot and it stores the results of the convex query into an LRU cache, and then updates the entries in that cache when the data changes from the onUpdate This works pretty well, but I don’t hugely need reactivity for a lot of the data fetching I’m doing - a one off fetch would work fine...

Optimistic concurrency control guarantees

Do I understand correctly that https://docs.convex.dev/database/advanced/occ works by checking the "index query document sets" before writes, not just the docs that literally have been read? That is, all indexes (or whole table scans) that would have returned different results if mutation restarted again that have been performed within the mutation are re-checked (metaphorically) before the transaction is committed? As far as I can see this isn't spelled out clearly in the docs anywhere (only the prototypical yet simplistic financial transaction example is used, in which only the literal returned doc's change is at play, not index query), yet this information is critical for clear understanding of OCC in Convex....

Clerk and Convex integration error with custom-created users

hey everyone I’m having an issue integrating Clerk with Convex in a multitenant setup. From my app’s dashboard, I can create users without any problem — but when I try to sign in with one of those users, I always get this error: Error: Failed to authenticate: "Could not parse as OIDC ID token. Token might not be an OIDC-compliant JWT.", check your server auth config....

The Tanstack start + clerk quick start is broken.

I'm receiving this error after scaffolding then running the dev server: ```TypeError: serverEntry.default.fetch is not a function at file:///Users/me/Sites/broken/nodemodules/.pnpm/@tanstack+start-plugin-core@1.134.9@tanstack+react-router@1.134.9_react-dom@19.2.0_rea_296b946d533fbbf48eec0f3268f36200/node_modules/@tanstack/start-plugin-core/dist/esm/dev-server-plugin/plugin.js:64:59 TypeError: serverEntry.default.fetch is not a function...

Astro Supported by Convex?

I see all the great JavaScript frameworks mentioned, but I don't see a mention of Astro support. So, I'm wondering... A) Does Convex play nice with Astro? B) How would Convex play with Astro's multi-framework support? Can I do one part in vanilla JS (Astro Server) and another in React or Svelte, all in the same Astro instance? C) Is there a need for writing up an article on how to use Convex with Astro? I code, and I write.......

HDS certification

Hello, I am currently in Azure for their HDS certification. Do you have any short term plan for this as you already have HIPAA Compliant?...

Convew - pending state for >1 min when convex dashboard shows results as cached

If I send about ~50 requests on application start, it takes about ~1+ min to come out of to load (even when ALL requests are marked as 'Cached'). Could convex be throttling me somehow?

Zod 4 Support for Convex-Helpers

Server side validation with Zod through the use of zQuery and zMutation currently breaks with the latest versions of Zod.

withSearchIndex multiword not working

I cannot get this to work, I've tried reading the docs, using the AI and also reading up on Tantivy's SimpleTokenizer If I have a searchIndex on a field that I have specifically created for search, if I use a space I get no results... So my index:...

Need to spin up a React project separate from my existing React Native project with Convex.

What is the best way to connect to the existng Convex database with the new React project?

Optimistic update outside mutation

Hi! Is there any way I can access the query cache to perform an optimistic update outside useMutation().withOptimisticUpdate? I'm running several actions that need to optimistically update some queries and I can't find the way to do it when using useAction...

Can you query a table with an index using just _creationTime?

Silly question: Can you query a table using the built-in index on "_creationTime"? E.g. ctx.db.query("users").withIndex("_creationTime", (q) => q.gte(1762870387000)).collect();...

Type error after upgrading to Convex 1.29 from 1.27

In my Next.js 16 project using Convex, after having updated to Convex 1.29.0 and successfully running bun convex dev, when wanting to build the Next.js project, the following type error occurs on every single instance of useQuery, prefetchQuery, fetchQuery, etc. ```sh ./src/app/host/[code]/host.tsx:20:30 Type error: Type '{ _type: "query"; _visibility: "public"; _args: { code: string; }; }' does not satisfy the constraint 'FunctionReference<"query">'....

No type safety on zMutation or zQuery for arguments

Trying to server side validate data, and args are of type DefaultFunctionArgs with any field within as a any/unknown.
No description

A way to force user choose an account with Google Sign in?

I have an app where I need to offer user to select an account every time they try to sign in. I saw few posts around this topic, where someone found that if user is signed in in browser for more than one account then accounts will be always prompted, but that is not a correct behaviour. I have a react native app where I use sign in with convex and I can't expect user to go to a browser, sign in somewhere and then come back to the app and sign in in my app, it will churn all users away :). Has anyone found a way to reliably force prompt every time?...