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

Incorrect invalid type error?

When I try to exectute the following code in a convex function: ```ts export const updateAnimalVaccineList = mutationWithTriggers({ handler: async (ctx, args) => {...

Doc Issue: Wrong applicationID in WorkOS AuthKit example

Hey Convex team 👋 I noticed a small but important issue in the AuthKit documentation (https://docs.convex.dev/auth/authkit/). In the example for auth.config.ts, the applicationID field is incorrectly included in the second provider configuration (the one with issuer: https://api.workos.com/user_management/${clientId}). Here’s the snippet from the docs:...

How to query records from multiple tables? (JOIN)

I couldn’t find docs or Discord tips for querying records from multiple tables (join). Is there a built-in way, or do I need a workaround?

Convex Outage?

Hey is there a convex outage now? I've been testing my app in swift all day but only now suddenly any calls to convex silently never return from the rust side of things. I have literally no idea how to debug this so any help is appreciated. I have changed nothing about my convex config so I see no reason for something to have broken on my end but I'm open to debugging if there are steps I can take to get more visibility into what's wrong.

cache in helper functions

Does Convex optimize out duplicate ctx.db.get() calls for the same document ID within a single query transaction when using helper functions? If i have Query Q which passes the QueryCtx to TS helper function A which ctx.get/ctx.withIndex a document and then the ctx is passed to helper function B which queries for the same document, does convex cache this?...

Deploy to Convex self-host

I'm trying to self-host Convex on Railway and want to deploy to my different environments. I read the docs to run the script with Vercel but it throws an error:
✖ Error fetching POST https://api.convex.dev/api/deployment/url_for_key 400 Bad Request: InvalidDeploymentName: Couldn't parse deployment name railway
Error: Command "bunx convex deploy --cmd 'bun run build'" exited with 1
✖ Error fetching POST https://api.convex.dev/api/deployment/url_for_key 400 Bad Request: InvalidDeploymentName: Couldn't parse deployment name railway
Error: Command "bunx convex deploy --cmd 'bun run build'" exited with 1
...

TypeScript Type Error: Workflows Not Accessible via `internal` API

Issue When trying to reference workflows defined with workflowManager.define() through the internal API, TypeScript throws an error saying the workflow property doesn't exist, even though the code works perfectly at runtime. Code Example ...

Better Auth with Convex working in dev but broken in prod

I am trying to get authentication to work with my convex + better auth set up. I've got the following envs in my dev and production deployments in Convex:
BETTER_AUTH_SECRET, SITE_URL
BETTER_AUTH_SECRET, SITE_URL
. In development, everything works fine however in production I am unable to login or sign up. I am able to create an account but in production it gives me this error: ``` Error ...

How can I have multiple Convex deployments inside the same project?

I currently have: src/app-a/convex and src/app-b/convex, and then update convex.json and env.local accordingly when I need to access a specific project. But when running convex dev, I get the same data for both apps (where I'd expect to see different data based on the project.) Is there a way to differentiate these projects? If so, which variables does convex dev takes into account to start different projects?

How to optimize strings for search relevance?

I have a query that takes a search term and searches through records using .withSearchIndex The records have multiple fields like name, description, artist, song, album which I concatenate into a single string and store as a searchDescription field.
I can't tell from the docs how I can optimize this field. While the results generally return in a sensible order, there are some results that I don't quite understand. For example, given the search term "metallica," why does "AJFA Tone AJFA TONE metallicabossmk2" return higher in the order than ""metallica metallica Felipeisloco399" ?...

How to avoid hitting the limit while joining and sorting two tables

I have two tables: - documentAccess: userId, documentId, ... (revokedAt - not important for the question) - documents: id, isActive (filterable property), sortableFiled1, sortableField2 etc The goal: get the first X (10/20/50/100) documents, sorted by one of the sortable fields, that belong to the user (can be viewed by the user)...

convex breaking on mobile app after EAS OTA update

convex misbehaves on Expo EAS OTA updates, does anyone know how to fix it ? so I created a mobile/web app using react native and expo , in some parts of it I use convex as the real-time DB . but for some reason only for the mobile app , whenever I push OTA update to update certain small parts of the up all the convex is breaking apart and is forcing me to rebuild the whole app and to publish it again which is causing me a lot of frustration. ...
No description

Convex Auth Could not resolve "@convex-dev/auth/server"

I'm getting this error right after setting up convex auth with npx @convex-dev/auth (I meant to use bun but I think thats fine) when I bunx convex dev. ``` ❯ bunx convex dev ⠸ Bundling component schemas and implementations......

Restore nuked data

I nuked my data by mistake two hours ago. I did not have automatic backups, is there a way restore the data to an earlier state? I would love to switch to PRO if necessary, I've been considering it anyways, but I'm late and now my data is lost. 😥...

deploy docs missing step

👋 hiya! i was going through https://docs.convex.dev/production/hosting/vercel where it says
Go to the Project Settings page in the Convex Dashboard. Click the Generate Production Deploy Key button to generate a Production deploy key....

Parallel actions

Hello, I have a small questions - I need to run in parallel (ideally) 90 actions for modifying json files (from Convex storage). I know that workflow component can run parallel steps. Would it be the ideal solution or there are better options? If workflow ideal - does it make sense to split parallel actions to multiple workflows, so it doesnt run all 90 actions on a single parallel? My use case: user updating json for primary language (localization) and then i need to sync all new values/keys wi...

Unable to figure out what the difference is.

Using withSearchIndex within a helper and inside of a query function directly I get two different results for seemingly the same query. Why is that?

"Copy for LLM" button on docs pages

It would be great to have a button on each documentation page that copies the content in a clean markdown format optimized for LLM context.
No description

RAG Filter name location is not valid

Hello, In the Document of the RAG component it is statet that not every filter needs to be present when creating a RAG entry. However I came across this in my add where i need to either add no filter values or all of them as undefined or with value. When adding just one filterValues i get :...

Index not found error even when the index is defined in the schema

Hello, I'm using the Local install of Convex + Better Auth (https://convex-better-auth.netlify.app/features/local-install#adding-custom-indexes) and trying to run a query using and index, convex throws the following error: `Uncaught Error: Uncaught Error: Index member.userId not found....