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

Preview deployment fails with: '✖ Please set CONVEX_DEPLOY_KEY to a new key which you can [...]'

Since last week I'm unable to make preview deployments for my Vercel app. The deployment is able to deploy all convex functions and even prints: Ran "npm run build" with environment variable "NEXT_PUBLIC_CONVEX_URL" set. However after logging ✔ Deployed Convex functions to https:[...].convex.cloud it errors with the following error message: ✖ Please set CONVEX_DEPLOY_KEY to a new key which you can find on your Convex dashboard....

Delta updates on query? - understanding bandwidth

Hello, I am building a card game with big ridiculous states (see picture). I'm trying to understand data usage in detail again. On games.getGame(id), does the subscription have to get the whole row everytime? are there partial updates and/or compression middleware that could allow for delta updates similar to git patches? ...
No description

Chat app, only one messages table?

Hi, I am effectively working on a chat app, but, I am concerned that my messages table will have too many entries. Is this something I should be concerned about?...

youtube api in action

I'm trying to upload a file to youtube from a convex action, but I get this error: ``` Uncaught TypeError: part.body.pipe is not a function at multipartUpload (../node_modules/googleapis-common/build/src/apirequest.js:180:12)...

Vector Search ✖ TypeScript typecheck via tsc failed.

Hello everyone, I'm building on the Vector Search feature and I'm encountering an issue like this: ----------------------------------------- ✖ TypeScript typecheck via tsc failed. To ignore failing typecheck, use --typecheck=disable. convex/messages.ts:144:34 - error TS2339: Property 'vectorSearch' does not exist on type 'GenericDatabaseReader<{ messages: { document: { _id: Id<"messages">; _creationTime: number; format?: string | undefined; fileId?: Id<"_storage"> | undefined; fileName?: string | undefined; author: string; body: string; }; fieldPaths: "_id" | ExtractFieldPaths<...>; indexes: { ...; }; searchIndexes: {}; vectorIndexes...'....
No description

Turborepo Vercel Deploy Build Command

Hi, I am using the custom build command specified in the documentation when deploying the NextJS project to Vercel:
npx convex deploy --cmd 'npm run build'
npx convex deploy --cmd 'npm run build'
I will start using Turborepo; what command (or turbo.json configuration) can I use instead that will fulfill the same function? Thank you!...

VectorIndex not on v module

Hey, just started using convex: it's great! One issue I'm having is that I don't see the .vectorIndex method existing on defineTable({...}). I only see .index and .searchIndex. Is there something separate I must do?...

Error: Could not resolve...

I am willing to use nodejs package. I am following the instruction here: https://docs.convex.dev/functions/bundling I have setup my convex.json as follows:...

Can't deploy convex to production with vercel correctly.

As per title. Been following this guide here, it's fairly clear : https://docs.convex.dev/production/hosting/vercel. All the steps seem to have been completed fine, and then when I goto my convex dashboard and make sure I am on the production instance of my app, I can see that my tables exist in the DB, but once logged in to my deployed appication, I can't actually populate any data. I'm aware this is a very vague question but I'm not sure how to provide any more details. My code all works p...

Convex api not working and causing problem in user validations from the convex tables

The function query below is not working, I might be using it incorrectly but would be a big help to get some advice on this // to return all spaces present in the current project export const get = query({ args: {}, ...
No description

Type inference issue with newly added routes

All my previous routes work fine and are correctly typed. All of a sudden, things stopped. When I add a new function, type inference from react stpped working as expected. I placed the new function in an old queries.ts file that is properly typed, only the new function has this inference. Any idea what causes this?...
No description

How do i create a schema object with computed fields

using convex.dev and or convex-ents , how do i define a computed field. If i have an entity user defined in my schema with fields first name and last name, how do i define a fullname field that concats first and last name. This is just an example, it can be any computed field

Custom query with default argument

I want to write a custom query that adds a default argument. ```ts export const organizationAdminQuery = customQuery( query,...

Is there a way to share my functions and schemas across my project apart from a monorepo?

I'm creating an app that has mltiple interfaces but then I have to rewrite some convex functions in multiple places and I think there should be a better way to optimise this process. Probably like a pull command or something within the cli. I want to use a monorepo but the projects have been setup already and I don't know how to merge existing projects into a monorepo Thanks...

How can I run an action from a mutation function since they can't be http actions?

In a migration function which I've defined as either a mutation or an internalMutation, I need to run an action so I can run a fetch query. How can I run the action from a mutation or internalMutation so I can do ctx.runAction?

Getting Convex Auth to work with NextJS middleware

I want to integrate Convex auth with NextJS. I'm following the following docs: https://labs.convex.dev/auth/authz/nextjs It requires setting up a middleware using convexAuthNextjsMiddleware - but whenever I try to use it, I get the following error (attached image). ...

Convex Log Error "auth:store Invalid Refresh Token"

I have used the Convex Documentation & Tutorials / Code. Also use the Github Example Repository. It seems like it IS working on first page load and the Sign In. But somewhere in the Convex Backend code I lose the user. I have been stuck on this for 3 days. Looks like I have to go into the Convex Auth Package code to debug/fix - or I am missing something? Here are the related files, Convex Logs and Broswer Console Logs....
No description

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