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

self-hosted

announcements

struggling with mutation

I'm trying to infer a type from my schema in order to type locationData which I will pass to the mutation but I keep getting the following error:
src/convex/addCompleteProperty.ts|7 col 23-62 error| Type 'TableDefinition<VObject<{ district?: string | undefined; city?: string | undefined; area?: string | undefined; postal_code?: string | undefined; nearest_landmark?: string | undefined; latitude?: number | undefined; longitude?: number | undefined; country: string; province: string; address: string; }, { ...; }, "requ...' does not satisfy the constraint 'Validator<any, OptionalProperty, any>'.
```ts import { mutation } from './_generated/server';...

How do I enable console.log?

console.logs, console.infos don't seem to show up in the log in the dashboard, nor when using npx convex dev --tail-logs, am I missing something ๐Ÿ™‚ ?

dashboard

dashboard not displaying my tables and my project on convex dashboard site and i cant connect using npx convex dev

sveltekit auth guides?

Iโ€™m trying to work my way through Convexโ€™s auth options and the docs seem to be React-centric. Does anyone know of guides or demos using sveltekit? Either Convex Auth or Clerk?

Type error: implicitly has type 'any' because it does not have a type annotation

Hello, I have a type error but can't figure it out why its causing it. ```ts export const createInvoice = action({ args: {...
No description

How do I authenticate a query?

I'm trying to use convex-auth in svelte, I'm retreiving the accessToken as follows, this gives me a token and a refreshToken ```TypeScript const tokens = await client.action(api.auth.signIn, { provider: 'password',...

Is there a way to get list of connected devices to the convex app?

For example, I created a nextjs app with convex and multiple users are using it. I'd like to show the users that are online or not. Is there a way to subscribe to this kind of event.

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