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

self-hosted

announcements

Unable to Vercel Deploy to Prod with Vite React and Convex Auth

Hi Convex support team! I’ve been building a project with Convex and Vite with Convex Auth (Resend) that is working great locally, but I have been running into issues in trying to deploy to Prod with Vercel. Can someone please help me understand: 1. What are the Vercel environment variables that are needed? Is it just the Convex Prod Deployment Key? Or do I also need to specify the Convex URL eg -donkey-88…? 2. What are the Convex Prod environment variables needed? I currently have the Resend API Key there. Is that correct? Anything else needed eg for my OpenAI calls in my app? ...

Animating database updates

Lets say I want to mutate data , lets say i have a list of items. I want to animate the deletion of an item in the list or animat ethe addition of an item. How would this be done in react? Is there a way to hook into database updates from the client side?...

VSCode keeps showing an error on functional Convex API Call

Hi! My issue is that in my Convex database, I have a table called submissions.ts and the table name in the schema.ts file is also submissions. Thus, when using the API call, I also use api.submissions, which is correct, but VSCode keeps wanting me to switch to api.submission, which is wrong (and if I change to it, the code stops working, which makes sense). How should I address this issue? Is there anything in particular I'm doing wrong with the IDE that is making this an issue? Thank you!...
No description

getUserIdentity returning null + ui errors, convex clerk

Hi, I am trying out Convex + Clerk for first time. I used these docs. https://docs.convex.dev/auth/clerk#user-information-in-functions I am using https.ts in convex with webhook in clerk for sycning users in clerk & convex which seems to be working correctly. ...
No description

Clerk auth v6 integration with Convex provider in Nextjs

So v6 of clerk is out and it gives us the ability to wrap individual components with the clerk provider and pass the dynamic prop to get server side auth. Currently the convex provider requires us to wrap the entire root and wrap that in a dynamic clerk provider causing all pages to be dynamic and rerender on each request… Is there any plans to change how the convex provider works with clerk? It would be nice to take advantage of nextjs ppr and other static rendering methods of pages that don’t require server side auth....
No description

Creating an API Key for Secure Data Access Between Next.js Server and Convex Backend

Hey everyone! πŸ‘‹ I'm working on a project where I have a Next.js server and a Convex backend. I want my server to access specific data from Convex without needing to set up a user account or similar authentication method on the backend. Ideally, I'd like to create an API key that my Next.js server could use to access this data securely. My Goals:...

npx convex deploy does not send my dev data including files to production

Why does running npx convex deploy not send over my tables from my dev instance and files to the production instance?

Mutation error: `Returned promise will never resolve` caused by triggers

I've never seen this error before, and when i get rid of this trigger in my blocks mutation it goes away... The original mutation contains some promise all statements that insert docs into the blocks table Any ideas?...

Pagination CanLoadMore

Hello I have a question on pagination example I have 20 records and I already retrieve 20 records the status is still CanLoadMore instead of exhausted? is that normal?

Custom function for HTTP action?

I want to use the same authorization process for all HTTP actions in a project rather than including the auth code in each action. I thought a custom action might work, but after reading the Stack post about custom functions, and also reviewing the code in the convex-helpers package, HTTP actions don't appear to be supported. Am I reading that correctly?

Add clear and explicit way to exclude files from bundle

I found this post but making a new thread specifically because this is a feature request I keep getting the need to exclude bundled files from time to time. In particular, I have a file with testing helpers that fails to compile because convex-test uses crypto: ```ts...

Errors importing dayjs plugins

Hi, I have a file in convex/utils/dateToMs that I need to parse incoming dates in different formats. It requires the use of dayjs and some of it's plugins. The code seems to push successfully when just importing dayjs but the plugins are throwing an error: ``` import dayjs from "dayjs"; import customParseFormat from "dayjs/plugin/customParseFormat";...

ConvexQueryCacheProvider Behavior

I switched to using ConvexQueryCacheProvider in order to keep query subscriptions active for views that are closed and opened frequently. I get nice instant load times now on the screens/components I use it on. But if I check the network tab in chrome I’m seeing a request to the server going out every single time the page/components loads. Part of my goal was to freely call the cache without re-calling the convex server for data every single time. Am I doing something wrong or is this intended behavior?...

Too many concurrent requests - even though on pro

We are on a pro subscription, but still keep getting this error, when too many files are uploaded to convex: Too many concurrent requests. Your backend is limited to 64 concurrent actions. To get more resources, upgrade to Convex Pro. If you are already on Convex Pro, please contact support. How can we resolve this?...

Text Search is hard to use

Two pieces of feedback: 1. The docs don't teach useStableValue or (less good imo) useStableQuery, don't link to https://stack.convex.dev/help-my-app-is-overreacting (which is long though), so creating a search interface is not straightforward without results flickering. 2. Now that search changed from prefix to fuzzy, it no longer fits super well the use case of looking up people by name (or room by name etc.), because irrelevant results are still returned. This could be alleviated (even if it's not the ideal fix) if the docs gave a recipe for computing the relevance score on the client side (or some measures resembling the relevance score)....

Resend, Email verification/login not working?

```log Enter email in form and submit [verbose] 2024-10-29T22:57:48.222Z [ConvexAuthNextjs] Begin middleware for request with URL http://localhost:3000/api/auth [verbose] 2024-10-29T22:57:48.222Z [ConvexAuthNextjs] Proxying auth action to Convex, path matches /api/auth with or without trailing slash [verbose] 2024-10-29T22:57:48.223Z [ConvexAuthNextjs] Fetching action auth:signIn with args {"provider":"resend","params":{"email":"Nlaakald@gmail.com"}}...

Uncaught Error: The arguments to a Convex function must be an object. Received: skip

Using convex-react-query, I noticed there is a new skip arguments that can be used to disable a query when the arguments is not available yet. But I get this error: Uncaught Error: The arguments to a Convex function must be an object. Received: skip. Which means the convex client complaining about the args. Looked at the code and normally the query shouldn't run at all. Any idea? Maybe I understand it wrong. My code: ```typescript export function useGetDocument() {...

convex-react-query state and plan on useInfiniteQuery hook support

What is the plan for convex-react-query? Is it here to stay or just experimentation? Also any visibility on when useInfiniteQuery might be supported? Saw it was under the TODO section in the github repo. Started to have a look myself to the source code to see if I can help but still unsure how this would work and unfamiliar with the mechanism of the convex client.

[Convex + Clerk + Next.js] Cant make static routes

In order to make Convex + Clerk work I need to pass useAuth() to the ConvexProviderWithClerk. This only works if I make my ClerkProvider dynamic with passing the dynamic prop. This makes it impossible to render a page statically in my Next.js app....
No description

Set environment variables programmatically

I want to set up a Doppler webhook which updates secrets in Convex. I know of two ways to update secrets: through the dashboard, and through the CLI. CLI seems like the easiest route, but I'm not exactly sure how to do this arbitrarily: ```sh...