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

I want to deploy my website that uses convex development environment, how do I deal with SITE_URL?

I use convex auth, there are some variables that is required like SITE_URL. For this I use http://localhost:3000 when running locally, but I want to deploy my site as i.e xyz-test.com how can I manage different SITE_URL in this case?

Convex Auth with Next js always return null both in server and client?

Hello there! I am using the latest next js and convex. I scrupulously followed the convex auth doc for next js with google. When I login everything works well even in the middleware but I am unable to retrieve the user info through the middleware as well as the client using either fetchQuery or useQuery....

convex auth: Unable to decode ID: Invalid ID length 5

I'm trying to get the current user but it's returning undefine am using nextjs and i follow the nextjs step, but when i change the convexnextjsauthprovide to authprovider i see the user however am seeing this error. Uncaught (in promise) Error: [Request ID: 5dfe7ffe2f531b80] Server Error Uncaught Error: Uncaught Error: Invalid argument id for db.get: Unable to decode ID: Invalid ID length 5 ...

When does a mutation commit?

I assume this is a silly question, but I'm just wanting to check that if I call a mutation from an action that the mutation will have succeeded or failed when the mutation call returns? I'm basically wanting to do: ```typescript actionA:...

Using googleapis

Hi, I'd like to access googleapis to list emails . Does anyone know how to get the access_token/refresh_token to use them here oauth2Client.setCredentials({ access_token: session?.accessToken }); Maybe there is another way to use googleapis ?...

Problem with building @convex-dev/auth@0.0.50 in deployment

I have used the react import and it worked perfectly in development but not in production with nextjs. I updated the package and imported the ConvexAuthNextjsProvider and was hit with this error, any idea how I can resolve it?...
No description

await ctx.auth.getUserIdentity() returns null in http action

I have a react app and using Auth0. ``` <React.StrictMode> <Auth0Provider domain={auth0_domain || ""}...

frustrated when deploying to vercel

SessionTokenError: Read more at https://errors.authjs.dev#sessiontokenerror User is getting saved in convex, but its not redirecting, used this for auth setup https://stack.convex.dev/nextauth...

Convex Query Cache context not reachable for useQuery

I'm using the query cache provider and hook from convex-helpers. I've set it up properly and checked that the hook actually is getting the context object, but the register key of the object is null, which is what causes it to throw. I have a lot of providers, including my own custom ones, and I've never had one inexplicably not have a context value make it down the tree. I don't have a repro put together or anything, but just wanted to see if anyone had run into this, or had any ideas....

How to explicitly set the current page in a nextjs paginated query?

In my nextjs application, I have a use case where user can "jump" to a specific page and not only progress sequentially. For that user can indicate this url parameter ?page=n. How can I apply this parameter in my paginated query? In other words, I have created my paginated query function: ```typescript export default query({ args: { paginatedOpts: paginationOptsValidator,...

High usage when reactively querying large objects

In 5 days of me developing a few hours a day I managed to blow up the usage of db bandwidth and I figured reactivity was not a good idea on all places for my application. I have now figured out ways to massivly lower my usage with custom query hooks. However it feels like Im getting ratelimited now that my usage has gone over the limit. Would be really nice If you guys could help me out with it. Im still developing and testing out and should not be needed to upgrade to PRO yet.

Authentication fails on the server when the client crashes

Using expo / react native, so not sure if this happens on the web, but when an error occurs in the client (and is caught in the error boundary wrapping the app), all active queries fail as unauthenticated. This has been the case for as long as I've used Convex, and hasn't been an issue, but I now have logic to log the client out when an auth error comes back from Convex, so I'm constantly getting logged out during development. Obviously I can condition the logout logic based on environment, but I avoid environment awareness in my application code. This will be my approach for now, but wanted to raise this in case I'm missing something....

Is it possible to add 'Functions breakdown By Time' aswell

Currently the dashboard shows Functions breakdown by dates only. Is it possible to add by time too so the tests can be done on what is consuming what? would be great to have that.

Does withIndex().order().first() scan all documents?

Hi there, I want to use order("desc").first() to get the maximum number from an indexed number column. This table has more than 16k documents. Does ordering scan all the documents?

Is convex capable to handle facebooks like traffic?

This question is merely experimental and just to check the intuition what convex is capable and what not.

native join

Given that it is possible to add relations to a document, is there a plan for convexdb to introduce a join operation? e.g., something like the following to efficiently retrieve a document and associated documents (further specifying which document fields to include to avoid over fetching). ``` const myPostsWithCommentsAndCommenterInfo = await ctx.db .query("posts")...

Query organizations that belong to one user

Hello, I'm trying to query multiple organizations a user is assigned. Here I share my code. Is this the best way to make this types of queries? Thanks!...

Clicking the copy icon doesn't work in the dashboard

Tiny one. There's a lot of convenient copy/paste fields in the dashboard and settings, but clicking the copy icon doesn't copy. Generally it's the other way around, where clicking the value doesn't do anything, but clicking the icon does, so I think folks expect the opposite of what we're doing. Leaving the value clickable and also making the icon clickable would be idea imo.
No description

Help running an internal query

I'm trying to run a query from my Node backend, but Convex doesn't seem to be including my function in its generated output. I've verified npx convex dev is running. Here's what I'm doing: In packages/convex-server/convex/server/internal.ts, I define the internalQuery: ...
No description