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

Backend URL Vercel

What would be the Backend URL for a Convex application deployed on Vercel?

How to use convex in a big team/monorepo

Let’s say I’ve got a relatively large project with my team of let’s say 15 devs. This project consists of multiple frontend apps and multiple “services”. The model I’ve been working with for some time is an NX integrated monorepo (ie shared package.json) with NestJs micro services (graphql or grpc). Chuck pulumi or sst in there to deploy each deploy target. Now the upside of this model is that you can establish unique deployment targets for each service and frontend, seperate databases by concern/domain and scale each part of the project independently. With local development you can have each developer using local db instances to test new schemas in isolation (ie not impacting the work of other devs). The downside of this model is that wire up is incredibly cumbersome and time consuming, the number of integrations needed to support realtime, file storage etc.. is time consuming, and get full end to end type safety is nothing short of a burden....

dashboard log performance

Its gotten a bit more noticeable lately, well now unbearably slow on my laptop so and its specs are Xeon E-2186M with 32gb of ram with chrome. INP is consistently like 2000~ On my main linux desktop, INP is between 50-500ms but LCP is also 3s~, so i do get delays. But its a 9950x so probably 8x the speed of the laptop...
No description

Upgrade from 1.17.0 to 1.17.2: Error: Could not find Convex client!

I upgraded my project that had no errors whatsoever from 1.17.0 to 1.17.2 and now get this error: `` Error occurred prerendering page "/sign-in". Read more: https://nextjs.org/docs/messages/prerender-error Error: Could not find Convex client! ConvexQueryCacheProvider must be used in the React component tree under ConvexProvider`. Did you forget it? See https://docs.convex.dev/quick-start#set-up-convex-in-your-react-app...

[Ents]: Ordering on Edge

Hello all, I have a question which in short is whether (or rather how) it's possible to order the query of many:many edges on the other end of the edge using convex-ents. I have user ents which can "attend" events ents - i.e. many:many relationship. I want to query the events a single user is attending and in the same query order the retrieved events based on the start date of the events (in the db as a string, like 2025-01-24T12:30:00.000+01:00) as follows:...

Convex Auth session keeps dying

if I leave a session idle, after some time auth breaks with this log Failed to authenticate: "Expired: ID token expired at 2024-11-21 23:57:07 UTC (current time is 2024-11-22 00:00:10.832851202 UTC)", check your server auth config I have jwt session duration set to 7 days (while I don't implement automatic Google re-auth) isn't it supposed to make the session live longer?...

pagination and TanStack Start

In https://docs.convex.dev/client/react/tanstack-start
Using Convex React hooks Convex React hooks like usePaginatedQuery can be used alongside TanStack hooks. These hooks reference the same Convex Client so there's still just one set of consistent query results in your app when these are combined.
Is the code below the correct use of the usePaginatedQuery hook with TanStack Start?...

Type error on internal query

Hey there. Beginner developer here, hoping to get help with the following type error on line 3. I don't understand why TypeScript thinks the return type is self-referential.
handler implicitly has return type any because it does not have a return type annotation and is referenced directly or indirectly in one of its expressions. ts(7023)
```TypeScript...

Contribution

I want to learn how to contribute to convex. Is there any way for onboarding? Can anyone help me?

Custom JWT token for authentication

Hi, I have a question: Can we issue a JWT token directly in Convex and use it for authentication, without relying on any third-party authentication provider? I couldn’t find any documentation related to this.

Tanstack Start + Convex Quickstart

import { Body, Head, Html, Meta, Scripts } from "@tanstack/start"; Im getting errors trying on this part and not able to import css...

Google OAuth redirect issue

Trying to get oauth with Google to work. When I login it shows me the google accounts, I pick one and click continue but after logging in I end up back at the sign in page and there is no session. I followed everything here - https://labs.convex.dev/auth/setup. Any idea how to debug this?

Issue with convex being picked up by `npx tsc` in expo project

Hello, was hoping some typescript wizard could help me out here. I've been trying to configure my repos tsconfig to not clash with the tsconfig.json in our convex/ folder. The problem Whenever i run npx tsc to check for any typescript compile errors from the root of my repo, it picks up on some files in my projects from the convex/ and says there are errors. ...

1.17.1 all functions exported from _generated/server now have "any" type for ctx and args

After upgrading to 1.17.1, it seems that all the function types exported from _generated/server types are missing. Did the api change?
No description

current user in middleware

is it possible to get the current user data in the middleware?

Search for subdomains in string field

Hi I have encountered an issue with the full-text search functionality. When searching for emails by subdomain, the system seems to remove special characters (like @ and .) and splits the subdomain into multiple words. This behaviour results in incorrect matches and makes it impossible to accurately find all emails with a specific subdomain. For example: ...

customQuery methods not findable from other package

I have a project using yarn workspaces, with the following format - apps/webapp - my remix frontend - services/backend - my convex backend I find that the api object has missing properties (in some contexts) when I export a method like ...
No description

Pricing

Currently, I'm right on the edge of choosing Convex over Supabase. Have been reading the docs for a few days. However, the lack of clarity over pricing is holding me back. Especially related to the Function calls (25M) and Action compute(250 GB-hours) in the Pro plan. As far as I know, Supabase doesn't have such restrictions in their Pro plan (unlimited requests and shared CPU without any restriction on compute hours). Upon searching Discord, I couldn't find anything meaningful about it. In fact, another user shared a similar concern a couple of days ago- "if you have 100 users in a chat room, and 100 messages are added, does it cost you 10,000 (GET) + 100 (POST) function calls usage?". Some users were discussing about it in August as well, when someone suggested a pricing structure like- https://aws.amazon.com/amplify/pricing/. In fact, for my use case, Chatgpt gave me an sample estimate of 72M calls/month (for chat, subscription, updates etc) for a decently scaled project I'm planning. However, there is no certainity about it. It is just a rough estimate. Could be more, could be less. But if true, that estimate would probably add another $100($2/M) to the monthly bill. Had a nice experience with Convex so far and would like to build here, but don't want to be surprised with the 'serverless' bills later down the road. It would be a bit hard to change the setup then. So, it would be really helpful, if someone can provide more clarity about it....

Preview Deployments and SITE_URL for Convex Auth

I'm setting up Preview Apps for Vercel and I'm not sure how I can set the correct SITE_URL (Required for Convex Auth) because the URL is based on the git branch name, essentially dynamic for each preview app. What's the recommended way to set the SITE_URL to the preview app? Otherwise, I'll need to manually set this every time. Not a big deal, but it would be cool to figure this out :).