Convex Community

CC

Convex Community

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

Join

Connect to multiple projects from the same nextjs app

Is this a matter of having the right imports for types and having multiple convex folders? I’m curious if anyone has tried this. Basically being able to call functions in different projects in different parts of the app. With the firestore sdk for instance you can define as many db objects as you want...

Auth not working properly in Nextjs

hey guys what could be the reason that convex auth is not working properly on my nextjs app? setup everything as on the tutorial but after login, i dont get redirected and even if i manually go to protected route, i still get redirected back to /login page, and isAuthenticated is always loggin false ``` import {...

expo-push-notification with convex

anyone managed to work with convex expo push notification component? like this blog is not helping me enough or I am dumb enough to make it work, https://www.convex.dev/components/push-notifications where I can find the components here in this code snippet...

Sync local database to Convex database

Hi, I have been using Convex for a month, it's very good. However, Im developing a mobile app with Expo, I want to sync data in my app local storage to Convex but I don't know how. Furthermore, can u also suggest me what lcoal database should I use (WatermelonDB, rxdB, etc.)

After moving from Clerk to Convex-Auth my convex tests fail

I'm pretty sure that everything in convex folder is fine, convex dev does not report any problems. But all my tests are now failing with this import error:
Error: Cannot find module '/home/michael/WebstormProjects/bikeproto/node_modules/@convex-dev/auth/dist/server/oauth/checks' imported from /home/michael/WebstormProjects/bikeproto/node_modules/@convex-dev/auth/dist/server/oauth/callback.js
Error: Cannot find module '/home/michael/WebstormProjects/bikeproto/node_modules/@convex-dev/auth/dist/server/oauth/checks' imported from /home/michael/WebstormProjects/bikeproto/node_modules/@convex-dev/auth/dist/server/oauth/callback.js
I'm probably missing something obvious? Already wiped my node_modules and reinstalled all dependencies, but no bueno....

Multi-part complicated forms

I am pretty new to front end development. I am building with Next.js for the front end, I am building an app that is a multipart form for building a rather large json eventually. Wondering what the best approach is. In particular I am not sure what the best approach is on the front end....

Help me better understand paginated queries

I'm having trouble running a paginated query in server using the filter from the convex-helpers library when, in client, I give a small value to initialNumItems. I have 2 tables: table campaigns...

create a new account

I have an account But I'd like to set up a new account for a startup I am working with, and I'd like to keep the two accounts seperate. Currently, I only have one github login. I am a member of the startup's organization and have an email from the organization, but am not currently using that email to login to github...

adding a project to an account

how do I add an existing convex project to an account?

Request: Is a document is referenced anywhere else?

I'm building an app for work, and in the front-end there are lots of things that can be added and deleted by the user. In a few cases, I'd like to prevent a given item from being deleted if it's referenced by any other document in any other table. For example, I'm going to be tracking regions where our company has offices, so I made a regions table. There are many things that will reference a specific region—staff, contacts, deals, etc.—and I'd like to prevent a region from being removed if it's referenced by any of those things. What I'd love to have is something like a documentHasReferences helper function:...

Is there an increment operator?

If I want to increase an integer field of a document by one, do I always have to read the document first then patch?

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!...

Upload Chunking

I'm writing an application that has an upload functionality for somewhat larger video file (50mb - 500mb) and my audience/ customers might have slow internet upload speeds. Is there a way to append chunks of data to the file storage so I do no run into the 20mb or 2min upload limitations. Any ideas?

Can anyone please tell me why this is happening ?

It is working fine till yesterday but today it is giving this error it is failing every request everything is on loading .....
No description

mutation doesnt rollback query state on failure

The issue is that as soon as the applyOptimisticUpdate function is called to modify the localstore, the remoteQuerySet map within the RemoteQuerySet class is immediately updated to match the localstore values—this happens before the mutation is executed. In the first screenshot, you can see that the backend still holds the unmodified value. In the second screenshot, however, the remoteQuerySet already reflects the updated value, even though the mutation hasn’t been executed yet. Mutation would throw an exception on the backend and values are not rollbacked....
No description

httpAction

can't seem to get the body inside an http post action https://docs.convex.dev/functions/http-actions body is undefined everytime?...

Hello, I would like to implement E2EE chat in my Vite/Convex app. Anyone have experience?

I saw the whisper implementation, but looking for something that will work in a conventional account based chat.

Request to Implement llms.txt on Convex.dev

What is llms.txt? Today, websites serve not only as a source of information for humans but also as a critical resource for large language models (LLMs). Language models enhance various tools, including development environments for coders, by utilizing information about programming libraries and APIs directly from website documentation. Why Implement llms.txt?...

Error in return types

I am getting the error below
Uncaught Error: Result {"data":"undefined","error":"Unauthorized"}
Uncaught Error: Result {"data":"undefined","error":"Unauthorized"}
when i call a query or a mutation simply because i am returning a Result type ```export class Result<T> { constructor( public readonly data?: T, public readonly error?: string...

corsHttpRouter

How can I get the code for the corsHttpRouter mentioned in this video? https://youtu.be/c7Y0wCml1kg?si=PPh7IPR_04Lvudg1...