Convex Community

CC

Convex Community

Join the Convex Discord! Explore Convex, the open-source reactive database for app developers.

Join

support-community

show-and-tell

general

self-hosted

announcements

No type safety on zMutation or zQuery for arguments

Trying to server side validate data, and args are of type DefaultFunctionArgs with any field within as a any/unknown.
No description

A way to force user choose an account with Google Sign in?

I have an app where I need to offer user to select an account every time they try to sign in. I saw few posts around this topic, where someone found that if user is signed in in browser for more than one account then accounts will be always prompted, but that is not a correct behaviour. I have a react native app where I use sign in with convex and I can't expect user to go to a browser, sign in somewhere and then come back to the app and sign in in my app, it will churn all users away :). Has anyone found a way to reliably force prompt every time?...

using Preview deployments with cloudflare, requested to create a name for preview

SO, I am setting up cloudflare preview deploymnets for the first time with cloudflare and wondering how to bypass the create name error on build stating the following: ``bash 16:10:14.601 Progress: resolved 28, reused 3, downloaded 1, added 4, done 16:10:15.664 ✖ npx convex deploy to a preview deployment could not determine the preview name. Provide one using --preview-create` 16:10:15.714 Failed: error occurred while running build command...

Querying multiple indexes on multiple values

I am in a pretty standard scenario, where I have to query certain fields tables have based on multiple different values, let's say shirts table has a color and a size index, and I would want to be able to query color "red" | "blue" and size "s" | "m". Am I correct that the tools that convex helpers library provide for merging multiple queries wouldn't scale in such scenarios, and result in big infra costs on convex?...

Transfer project failing even when admin for both teams

I am the admin of two teams and want to transfer the project but it seems to be throwing this error whenever I try to do so
No description

TypeScript Circular Reference Issue with Convex Internal Functions

hi guys i have a weird issue i provided the code in the img The Problem 🐛 When calling internal functions from public functions in the same Convex project, TypeScript creates a circular type dependency: ...
No description

Convex dashboard keeps loading infinitely

It's been ~24 hr maybe since I can no access a dashboard for any of my apps https://dashboard.convex.dev/ Please find attached web console logs....
No description

Issue with useSuspenseQuery for queries that accept args

I'm trying out Convex with tanstack-query, and I'm hitting an odd type error while running my .get() function. It seems the output type is incorrect when being passed to useSuspenseQuery, and my application in stuck in a Loading... state if I attempt to run this. I've tried: - Passing an empty object - Passing skip and nothing else - Passing { id: selectedNoteId ?? '' } ...

Is there a way to have ts types and v.whatever() types synced?

hey, its getting rather tedious to update my types on so many places. Does anyone know of a more elegant approach? 1. how can I keep both typescript and schema updated at the same time? eg...

Importing data to a components table via cli

Hi, I want to migrate my users to convex. All preparation is done I just need to migrate them in. While playing with the cli import feature I noticed, that I can't import data to a components table in my case betterAuth user table. Is there a workaround for that?

Ignore "Detected a non-production build environment and "CONVEX_DEPLOY_KEY"" error?

Hi, I was wondering if it is possible to somehow ignore the error: "✖ Detected a non-production build environment and "CONVEX_DEPLOY_KEY" for a production Convex deployment. This is probably unintentional."...

Playground Not working

If I enter a message. it says Select a thread and user first. But the list is empty
No description

Mutation on queries.

Hey guys, I need to populate empty db entry when a user runs a query, how can we properly do this? currently I have a query and a mutation and I call the mutation everytime along side the query to ensure the db entry exists.

This is how I integrate convex with tanstack query. What do you think?

useQuery ```typescript "use client"; import { convexQuery } from "@convex-dev/react-query";...

Give access to a single project

I use convex cloud a lot for one off projects like hackathons and small interactive displays. The 5 person per team increase is ideal for that, but without granular project permissions and a 2 team limit, I can't give access to some people in a small timeframe without worrying about giving them access to my other, personal or even work related projects. Giving access to a single projects, while rspecting the current member limit, would be ideal.

conflict write warnings, and excessive DB reads

I have lots of write warnings, and my function, which is only inserting, is causing high DB read bandwidth usage. This is the code for the function:
No description

Using node runtime in Convex Triggers

The Convex helper library providers triggers which essentially wraps the useMutations. There are some actions that I would like to run for each trigger. However, this action need to be run in the nodejs environment due to the use of third party api (I am using Ably in my case). However, if I mark the file with use node for the file that I define my triggers action, it means that the wrapped useMutation is also marked with use node which violates the Convex rules about mutations. How to g...

Unable to start push

After switching to better auth from convex im unable to push to convex. I get this error ✖ Error: Unable to start push to ✖ Error fetching POST .convex.cloud/api/deploy2/start_push 500 Internal Server Error: InternalServerError: Your request couldn't be completed. Try again later....

Can I skip some filter field in withIndex

Guys I have question about withIndex schema: ```typescript profile: defineTable(profile).index("by_filter", ["gender", "age"])...