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

ai API works differently.

I want to create an action that calls openAI API (perplexity in this case). When I use postman I get normal answer based on real life data (like asking about some stock price). When I use fetch from convex server I always get answer that model doesn't have access to the internet. What is wrong here?...
No description

How to wrap the database writer so that `ctx.db.patch` and `ctx.db.insert` run side effects

Firebase has a concept of trigger functions which trigger when documents are created, updated, deleted, etc. I found this really useful since I didn't have to worry about where or how documents were updated to still be sure that a cleanup or side effect would be run. What would be a robust way to do this in Convex? I was trying to do it inside rules but quickly realized that's not possible... This is what my mental model wanted to do:...

"Could not verify token claim" on React Native

Hi guys, I am trying to replace Clerk Auth with Convex Auth using in react native (with expo) I am testing locally, after trying to verifying code via email I got this issue ...

Stuck in parsing uploaded data attempting reconnect

During the table import phase, the Parsing Uploaded Data message keeps repeating itself, sometimes it says attempting reconnect.
No description

how do I efficiently aggregate data?

How do I aggregate data? I.e I have orders, how do I calculate the total amount through entire period? I would assume querying all records and adding up the count wouldn't be the best option?

Convex dashboard for local convex backend

Does convex dashboard command works for locally installed convex-backend?

[ConvexAuth]: Handling errors that happen from the useAuthActions methods

I'm a bit confused, when it comes to catching and handling the errors thrown by signIn() in the front end? Is there any recommendations on how we can handle these errors on the client, and show a bit of information to the user of what went wrong?...
No description

rate limit error catching in convex helpers

I'm not sure the usefulness of this function ```ts export function isRateLimitError( error: unknown, ): error is { data: RateLimitError } {...

Does open source version of Convex have web interface?

I have run open source convex backend successfully. Is it possible somehow browse database tables by web? Or I have to create my own service for this

Beyond Performance: Do Indexes Offer Advantages Over Filter Functions?

I've observed that a query like the following: ```ts export const getUserByNameAndEmail = query({ args: {...

Unable to locate "@convex-dev/auth/providers/Password" in react native

I currently was following the Password Auth tutorial for react native and the only file in "@convex-dev/auth/providers" is a package.json file. How can I add the Password file to it? I already followed the initial setup tutorial and installed all the stated dependencies....

Hi, I am facing difficulty in making database from Clerk to Convex

Currently, I am developing the authentication. I have successfully created signIn, signOut on Clerk but I follow the instruction (https://docs.convex.dev/auth/database-auth#optional-users-table-schema) for webhook. When I sign in, the information just get connected to Clerk but not Convex database. Here is my http.ts:...
No description

Best way of querying documents when using Clerk

Hello! I'm currently working on a project that uses both Convex and Clerk together. I've been running into some issues with consistency within my backend when it comes to query documents by id and wanted to see if anyone had advice. The problem is that it's easy and convenient to query by a user's Clerk id, but I lose the type safety of the _id prop. It also leads to weird situations when creating relationships between tables. Should I just my me query function (returns user info protected by auth RLS) every time I want to query with a user id or is using the clerkId as the primary way of fetching a document a ok practice? me function ```ts export const me = authRLSQuery({...

unhandled runtime error

Hi, can anyone please help with this error that I am receiving. I feel like its a super easy bug to fix but I seem to not be able to fix it. If you require any more additional detail of the program as a whole please ask, I can show. Thanks!...
No description

Issues when setting up the auth in an existing project

I tried to setup the Convex Auth to an existing react app but run into issues regarding tsconfig configuration. It says: ```sh convex/schema.ts:1:30 - error TS2792: Cannot find module 'convex/server'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?...

Extracted function types

Hello! I extracted a function to map a query. But I can't find the correct types. I'm looking for the type order, orderLine, ctx and q. order and orderLine are raw records in the database. ```ts...

How to count a large set of results from a query?

Hi, suppose I have a query such that the full set of results would be over the 16k convex limit. What is the best way/or are there any suggested techniques for counting this result set?

Default field value

Is there any way to specify default value for a document field (column)

Convex auth with nodemailer for smtp

I want to use my own smtp server to send out the magic links, but it seems that the needed provider for this (nodemailer) is not working out of the box with convex. The issue is with stream, crypto, path, os, fs all not available - You can use "platform: 'node'" to do that, which will remove this error. But I guess that's not an option, or is it?

Convex auth seems to sign me out every 24-28 hours, why?

I cant for the life of me work it out. This is my auth setup: ```ts import { convexAuth } from "@convex-dev/auth/server"; import { Password } from "@convex-dev/auth/providers/Password";...