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

Next.js URL not changing using the documented middleware and ConvexAuth setup

When signing in using password auth, the page changes as expected, but the URL remains the same. Using the documented Convex Auth password setup, when I go to /sign-in and actually sign-in, the tasks page loads, but the URL remains as /sign-in until I refresh. Not sure if this is a bug or user error and I've missed something....

Is there anything similar like ConvexAuthNextjsServerProvider for Remix?

Using something like below with remix is resulting in below warning ```ts import { ConvexAuthProvider } from '@convex-dev/auth/react' ... const { ENV } = useLoaderData<typeof loader>();...

How to handle searching in an existing database where the state field has 2 versions of the text

I have an existing database that I need to search for states and it has two versions NY and ny. Should I convert everything to uppercase and then search?...

How Can We Collaborate Across Multiple Repos on the Same Convex Instance?

Our team has recently adopted Convex for our database, primarily due to its speed and real-time capabilities. We're maintaining a custom backend built with Node.js for our business logic, while our front end is being developed using Next.js. We've encountered an issue where the most recent npx convex dev command called from either the frontend or backend overwrites the existing functions in the Convex dashboard, rather than merging them. This is causing conflicts as both teams need to create and manage Convex queries and mutations independently. Is there a way to set up our environment so that both the frontend and backend teams can work on the same Convex instance without overwriting each other's work? Any guidance or best practices would be greatly appreciated....

Using orCreateOrUpdate user in callback

Two problems here: 1. How can I get the tokenIdentity when creating a user, I need to get authSessionsId but I keep getting null. my approach was ${url}/${userId}/${tokenId} 2. I keep getting a 302 error but everything is still working correctly....

The inferred type of X cannot be named without a reference (some module path)

Hello Convex team I've recently started with Turborepo and migrated my existing app to turborepo. earlier I had some issue so I'm going with simpler approach i.e. add convex in the apps/web only just like a simple nextjs app. But while build I'm having a type issue: ...

How to upload images using Convex storage? (Solved)

I'm wondering if anyone has played around using Convex storage for their text editors? I'm using the Novel.sh package, and they are providing an uploadFn like this: ```js...

Zod and Convex type error

Hello, I'm using Zod to validate my forms. When I pass the form data to a mutation function, I got a type error. The function expect some convex ids and the zod schema is a simple string. What is the fix here?...

Convex CRUD "framework" example - anyone doing this?

Managed to get a basic CRUD helper built using @convex_dev (and lots of ChatGPT assistance) using some conventions. Really simple entities, no relations (yet), but I think this could end up being something useful with some typescript helpers.
Convex already provides something similar with their "Table" utility, in convex-helpers, but it's really just a wrapper for table operations and convenience. The one I'm playing with has some extra params for auth and zod validation (when you need more specific than what the built-in convex values get you). ...
No description

Websocket error 1006 when trying to connect to convex

Hi folks, Not really sure what's going on here but on production one of my users is getting a "WebSocket connection to <my convex url> failed" and a message saying that WebSocket closed with code 1006. I wasn't able to find anything on here/google about it and I can't seem to reproduce it at all (nor does anybody else using the site have this issue), so I'm at a bit of a loss....

Wasm issues

Hi team, I would appreciate your help with some issues I'm facing when importing a library. I’ve successfully managed to get it working on Next's app router (server actions), but I'm encountering errors when trying to use it with Convex in an action. I am attaching my configuration on next config. Within convex, i am using the node runtime with external packages building. I am attaching my configuration. But i get an error related to a file of wasm not being found. I am attaching the error. is there any procedure to configure wasm for libraries using it?...
No description

ConveProviderWith Auth error on my code

Error: Could not find ConvexProviderWithAuth (or ConvexProviderWithClerk or ConvexProviderWithAuth0) as an ancestor component. This component may be missing, or you might have two instances of the convex/react module loaded in your project. i got this error on my code i had no idea what is it about and i have never use convex before :( can someone help me with it ?...

defineTable parent node

I want the document to be inherited by descendants of the same type. Or is this not possible? I don’t even want to make it as separate tables and not nested structures if there are children in each node and searching for them by ID, it is expensive, so it needs to be able to skillfully have 1 document and its children...
No description

Convex Auth without React?

Is it possible to use Convex Auth, especially with OAuth without React? Every Auth provider from the docs uses React....

Validate number in schema

how can I add schema validation to accept just number s between 0 to 5 (inclusive)?

_generated exports 2 api imports

I looks like my TS is recognizing 2 available api's for the project that I'm working on, however none of them seems to work. Already cleaned and re-generated the folders, as well as restarts for the next server and convex. Can't seem to find a solution here, neither nothing already on this....
No description

Dev dashboard doesnt work

Good morning, currently i am experiencing issues with the dashboard connecting to the necessary websocket. This makes the dashboard completely unusable and I'm not sure why username: brandon-irving email: birvingfau@gmail.com...
No description

Convex in sveltekit application error. Kept getting $effect is not defined

I have an existing application built with sveltekit. I've gone pretty far on the frontend and I decided to use convex as my backend. But I keep getting "$effect is not defined". At some point, I cleared out all my node_modules and lock file, reinstalled and then I got an extra error, saying something was missing. Is convex not compatible with sveltekit?...
No description

How can I filter, sort, and paginate queries using convex filter helper?

Why can't I do this using convex filter helper function. It is not allowing me to sort data using any custom index.
No description

Type error: Type instantiation is excessively deep and possibly infinite.

I've recently started with Turborepo and migrated my existing app to turborepo. And fixes the issue but while deployment I'm having a type issue with a query that I'm using in NextJS api route Error: ``` web:build: ./app/api/changelog/[id]/route.ts:7:41...
No description