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

Is runMutation transactional?

```ts await ctx.runMutation(internal.foo.create, { foo: "xyz" }); await ctx.runMutation(internal.bar.create, {...

React query disadvantages

Hi, I'm still unsure about using React Query in my project because I don't know if it works well with Convex yet. For example, if I use it, will I need to handle cache invalidation myself, or does Convex take care of that? I'm still a bit confused. What are the disadvantages of using React Query with Convex?

Migrating to Convex: how to deal with IDs?

If i'm migrating from another database (e.g. Firestore) to Convex, are there any recommendations on how to deal with the IDs as they're not valid in Convex? Should I just let Convex generate its own IDs and keep the old Firestore ID in a separate field in the document? But what about the relationships? I mean, I guess I won't be able to use the Convex IDs to reference other documents when initially importing the data....

Legend-State plugin for local-first

I'm investigating making a Legend-State plugin and can use some help with some things. The first thing is it ideally works the same way when given a ConvexClient from React or from vanilla JS. So the first thing I'm trying to set up is to use onUpdate when given either a ConvexClient or a ReactConvexClient. But it seems like they work very differently - in React it internally uses a ConvexReactClient.watchQuery whereas the script tag example uses ConvexClient.onUpdate. Looking through the source iIt looks like ConvexReactClient and ConvexClient share a BaseConvexClient base class, and I could use subscribe on there. But is that the best way to go? Seems like I'd miss out on some of the nice behavior from the higher level wrappers. I can do that to get an initial prototype working but I'd like to make sure it works in the correct Convex way....

I have one general doubt!

Storing the JWT token in local storage is unsafe due to XSS vulnerabilities, right? but Convex stores them in local storage?

Issue using auth with custom user schema

I have my auth set up with a custom user schema like so.. ```export default defineSchema({ ...authTables, users: defineTable({ name: v.string(),...
No description

Convex + Lucia auth + Svelte | Help

Hello i was able to integrate Lucia with convex (thanks to @v and his repo https://github.com/vynxc/lucia-svelte-convex-demo) Now I'm trying to write queries that filter by auth user id, to show only those rows the user owns. ```typescript...

How can I get the reason for login/signup failure with Convex auth?

Hi, is there currently a way to get the reason for login/signup failure (e.g., email not found or invalid password) on the client side with Convex auth? Or is this something that will be added in the future? Thank you. 🙏

Convex function Auth only

Is there a way to reject convex function calls without Auth token on a Middleware level? I'm hoping to mark a convex function as Auth required in the backend and reject any calls without. Or is the best way to do that to check getUserId === undefined on start of the handler?

Need a little react help

Hello family, its been a while. So for my site I wanted to save a simple count of users visited. I wrote this code: ```tsx "use client"; import { useMutation } from "convex/react";...

runAfter is not throwing an error on the client

Hello, can't understand why error is not throwing to the client. This is the pattern I'm trying to implement. I can see the Error 'Called getCurrentUser without authentication present' logged in convex, but I can't get it in the front end. I'm using Next.js. ...

Modify the dashboard interface.

In the future, will it be possible to add it to the interface in the dashboard. For example, adding a leaderboard page on the site. Of course, you can implement all this on your frontend, but you want the site to be clean without administrative access for ordinary people. example idea code ```ts <convex/dashboard.[ts,js,mjs]>...

How to assign types created with convex/values to function parameters?

I want to create a utility function but need to pass an argument that has type safety. How can I reuse the type from a convex/values into a normal function? Example...

Performance testing and credentials from FS

Has anyone done performance testing of Convex? What is the expected system response for medium complexity of mutation? What is maximum TPS? I could not find any information on that topic anywhere. Do you know any significant financial services institution that is using Convex on production? Specifically I am interested if the system ever went through detailed security assessment....

Convex in deno workspace/monorepos

Hi, we're just looking into deno as a potential solution to simplify our typescript monorepo/npm workspace. Is anyone using convex with deno? If so, what's the recommended way of setting things up e.g. what's the recommended way of running convex dev? Is there a way to do this with a deno.json or do we need to keep things npm-based with a package.json?...

Error deploying to Vercel

I built my app using the Remix quickstart code from the docs, added Clerk for auth, and everything works fine locally. When deploying to Vercel per the Convex docs, however, it just generates a ton of errors. First on the list—and likely what's causing the rest—is ConvexReactClient requires a URL like 'https://happy-otter-123.convex.cloud'. I found other posts about this and manually added VITE_CONVEX_URL to the environment variables in the Vercel project settings (not mentioned in the docs, BTW), but it's still failing. Attached are screenshots of my Vercel config....
No description

LLamaindex package: External packages in convex.json doesn't work

I want to use the llamaindex package to parse documents with their parser model. However, this model also includes a VectorStoreIndex that is used in conjuction with openAI to create embeddings and store it in the llamacloud database. As I don't have access to openAI (based in Hong Kong) and I want to keep using convex for vector search, I don't use this functionality. But I believe there are the reason for the error below. I put "use node" at the top of the file and inserted the packages that errored my build to the node.externalPackages convex.json file. But I still get the same errors. Any clue on what that could be? The pg packages must be used for their vector database which I don't use....

High bandwidth consumption

Hello, I have a consumption problem in my application, I have a user ranking system, I need to rank them all, but the consumption is very high (currently 2k users)

Are image transformations supported?

I don’t see anything related in the docs.

Importing a snapshot during deploy stored on s3

Hi, my snapshot is now above 100mb. This means I can no longer commit it to github. Is there a way to tell the deploy command npx convex import --preview-name "$VERCEL_GIT_COMMIT_REF" ./data/mock-data/snapshot.zip during a deploy to tell it to grab the file from a remote resource, like an s3 bucket? What are workarounds for large snapshots that can't be commited to a repo?