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

Ratelimit Queries

I would like to ratelimit queries and action, not only mutations. Is it possible?

Does the scheduler only run one thing at a time?

I noticed that I fired off a bunch of scheduled mutations around the same time, but it seems like a queue it backed up somewhere or something. It's taking a long time to process through these scheduled mutations. Is there more insight into the concurrency limits on scheduled mutations?
No description

Need help understanding the mutations and OCC

I'm working on a million checkboxes type of clone, and I have a function called toggleCheckbox which will first query a record, toggle a bit on or off in the number, and then write that number. This all seems to work fine. I'm also using another metadata table to keep a running sum of how many checkboxes are on or off. It seems like the counts are getting off for some reason. I created a cron which randomly toggles a bit using that same method described above every second in the first set of checkboxes. That also seems to work fine. The issue is when I manually start clicking checkboxes while the cron is running that my count seems to get off. I think there is something I'm not understanding about the concurrency model....

Convex Queries In Server Components

I have a route ("/users/[userId]") and i want to fetch user info from the database by using the Convex query hook "useQuery" and also supply the data through a global state using zustand to child routes. However, i can only use the Convex hook in a client component. How do you suggest i implement this because i dont want to make the whole layout a client component....

Extracting the table name from the TableDefinition

I want to do something like: ```ts export const vAllSchemaDocsUnion = v.union( ...Object.values(fireviewSchema.tables).map((table) => doc(fireviewSchema, table.name)) );...

Validator operation not behaving as expected

I have this table: ```ts const vTableViewResourceAccess = v.object({ ...vCommonAccessProps.fields, resourceType: v.literal("tableView"),...

API types are "excessively deep" when Convex Auth is installed.

Commenting out the injected auth_* and auth.js imports in api.d.ts resolves this issue. Is this a known bug in Convex Auth? Is there a resolution?
No description

[ConvexAuth] getting jwtToken to pass to auth headers in fetch on client

Is there a way to get the jwtToken client side when authenticated, when using convex auth? i'd like to pass it in the auth headers of a fetch request from my client ```ts fetch("https://<deployment name>.convex.site/uploadImage", { headers: {...

is there a way to retrieve more than 16k items?

I need to filter items from a large table with client-side js. The items don’t have to be reactive or anything; I just need more than 16k items. I guess looping queries is the way to go, but I couldn’t find an example of it.

Convex X Clerk Issue: Application error: a client-side exception

I've been getting this on my capstone project. I would love to hear your advice on how to fix this issue if you have experienced it as well. This occurs when I'm login into my application for more than 5 minutes then I try logging out it goes in this error, right away? Here's the repo: https://github.com/achris-alonzo30/hireme and do you think this is more on Clerk issue? so should I use the ConvexAuth instead?...
No description

Convex Auth OTP requires redirect url or SITE_URL

When attempting to use the OTP method alone, SITE_URL is required (unless you provide a redirect url). This line in particular leads to a thrown error: https://github.com/get-convex/convex-auth/blob/90318a4d346523035ed9c75e70cd99653a5bede9/src/server/implementation.ts#L1744 I'm not yet processing links inbound to my react native app, so I don't want to use magic links and don't have a redirect url or site url to use, hence my interest in OTP-only....

How Do You Handle Auth? I am trying to upload user data to the database after Google OAuth.

Alright, Here is the thing. I have set up JWT Cookie Based auth using Auth Js, I simply want to store the User Data in the Database. const session = await auth(); // Gives me session.user.name, session.user.email, session.user.image ...

NoImportModuleInSchema

I've only seen this mentioned in one place in Discord, and nowhere else otherwise. I just finished the code migration from Clerk to Convex Auth and followed the docs pretty closely, and am now getting this when attempting to deploy (dev). Just to help me debug, can someone explain exactly what this error means, generically? I keep my table definitions in per-table files and import them all to schema.ts, and that has never been a problem. What are the things that can't be imported to the schema file?...

[ConvexAuth] settings values of custom users fields, on user creation

Hey, i've been looking through the docs. And would imagine settings some values for the fields i have customized on the schema for users, when the users get created. Would be done in the account callback configuration? But looking at the API, i've failed to figure out how to use this callback: I wanna achieve setting some of the custom fields i define when i create a user...

Convex Auth - Capacitor Based web and mobile app

Can you prepare a document or example on how to log in on mobile for applications that use the Capacitor infrastructure? It works fine on the web side, but I couldn't run it on the mobile side. I think an intermediate layer is needed for Expo, such as the openAuthSessionAsync and makeRedirectUri functions used in the document....

Infinite api calls to clerk

Has anyone noticed this with the <ConvexProviderWithClerk> component where there are an endless number of calls being made to the clerk issuer domain? Noticed this in my own project and confirmed it still occurs in this template locally as well https://github.com/get-convex/templates/tree/main/template-nextjs-clerk-shadcn.
No description

Trying to add rate limiting to newsletter sign up

I have this code, I'm trying to implement rate limiting so I don't get DDOS and to learn how to use it. If a user isn't logged in, and I want to limit based on IP address how would i do that? Also with the convex-helpers @ian , how does it know to increment? Does it just find the item with the same key? How do I get the key to be the IP address? ...

arm64 Ubuntu support

Hey there, does convex run on arm64 Linux computers?

v.record

Hi Convex team, Is there a release date for v.record()? I haven't upgraded Convex since 1.2.1 because I rely on a v.record() type (that unfortunately my desktop app is also now relying on) but really need to upgrade. Or, is there a way I can use the internal/unofficial version (https://github.com/get-convex/convex-backend/blob/main/npm-packages/convex/src/values/validator.ts#L128-L144) ?...

Next 14, Convex Auth Error

Trying out the new Auth. Signin with google works however I have an issue with the signin function. I used the convex auth example from here: https://github.com/get-convex/convex-auth-example/blob/main/src/auth/SignInFormPasswordAndVerifyViaCode.tsx Check the screenshot for the error I get... I can't get the signin function to work. (Sidenote: The auth example in Vanilla react works)...
No description