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

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

My attempts to run `convex dev` fail to deploy code changes

When I run npx convex dev -v --tail-logs, I get output about skipped files (the usual suspects about multiple dots and stuff in convex/_generated), and a raft of Preparing convex/** messages, but that's it β€” no messages about deployment. Over in the dashboard, no updates in my Development deployment instance....

[ents] filter by index with a field and order by "updatedAt" instead of "_creation_time"

Im using ents to fetch the list of item by its indexed field, and i can only perform order based on created time. i need the updated time!...

Sharing data between modal and convex

What’s the best way to share data between modal.com and convex.dev

"New table referralOverview has IDs that conflict with existing table configColumns"

Hi, when trying to import a snapshot into a preview environment during a deploy, I get this error. Everything works fine locally when devving and then I export the snapshot directly from dev. I manually checked the ID's of configColumns against the ID's in referralOverview and there are no matches. How do I fix this?

Multi-tenancy

Hi All, Does convex support the ability for each user who has signed up to my app to have their own database? I want to have a sign up page where upon completion, a new database would be provisioned. The schema and everything would be the same. ...

Preload query does not work with dynamicIO

If you enable dynamicIO in the Next.js canary channel and try to preload a query you get this error:
[ Server ] Error: Route "/" used `Math.random()` outside of `"use cache"` and without explicitly calling `await connection()` beforehand. See more info here: https://nextjs.org/docs/messages/next-prerender-random
[ Server ] Error: Route "/" used `Math.random()` outside of `"use cache"` and without explicitly calling `await connection()` beforehand. See more info here: https://nextjs.org/docs/messages/next-prerender-random
...
No description

Bug: Can't preload a page with pagination

This is my frontend code: ```tsx export default async function HomePage() { const preloadedPosts = await preloadQuery(api.posts.getNewestPosts, {...
No description

Handling "Too many reads" Error During Mass Deletion in Convex

Hello Convex team! πŸ‘‹ I'm encountering a read limit error while implementing parent-child record deletion in our application. Would appreciate guidance on the best approach. The Error...

extra field `ttl` that is not in the validator - cache component

I have setup the cache component in my project, followed all the steps as per the convex docs but getting this error. currently stuck at it.
No description

resend not working in internalMutation

I had a problem where I wasn't able to send emails with Resend. My API key was configured, my resend domain was verified and magic link email were working fine (after setting the from param). But when I tried to send emails at runtime resend.emails.send() would give the error ...

Disabling query with TanStack Query

I am fetching data using convex query with TanStack query in my React project. I want to disable running query by condition. Here is the code. ```const { data: fileUrl } = useQuery({ ...convexQuery(api.tables.files.getFileUrl, {...

Using gemini with openai library working in action but not http action

I followed this guide to integrate ai streaming in my convex app. But instead of using openai, I want to use gemini because of their larger context window (1M tokens for gemini-1.5-flash). I get a bad request answer just using the basic example from google docs here. However, the exact same code works in actions which I assume it is due to the fact that http action cannot run node packages? What I don't get is why it is supposed to work with openAI (cannot try as I am not located in a country where opeanai is available) but it doesn't work for gemini. But still works in actions. Any idea if there is a way to make it work? Here is the code as an example (gemini api key created via google ai studio): ```typescript const openai = new OpenAI({...

How to add a dynamic route to the httpRouter

I am trying to create an endpoint in the form /package/{packageId} and this should return all the details for that specific package. How to create such a route to the Http router in convex?

issue with verifying password

i tried to look at the docs and source code of the password provider and tried this action to validate the password but i am getting an error: Uncaught ReferenceError: crypto is not defined
No description

Choosing a React Framework

Is their a guide or advice for choosing a React Framework I’ve been listening to the podcast which seems very opinionated about front end approaches and keeping it simple. However I’m new to React and it’s difficult to know the pluses and minuses of different frameworks...

Default values in table field

I have a table with a v.object field. In the future this object might get more values set in it. Is there a way to updated the existing data in the database with default values?