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

Querying for dev/preview/prod status within code?

Does Convex offer a way to query for whether the app is dev, preview, or prod? I can use process.env.NODE_ENV to check for prod or dev but it registers preview deploys as production. (This is just the way NODE_ENV works so Iā€™m wondering if there is an equivalent CONVEX_ENV of sorts)

Buggy dashboard schema validator

See screenrecording. I briefly remove a field and add it back in but I still see errors

Delete all files

Is there an easy way to clear all files in convex storage? I'm doing 20 at a time and I have 1k total.

stripe + process.env

For my app, process.env variable for Stripe are being picked up from development area in convex but not project wide default env variables. Does this happen with test keys only? process.env.STRIPE_SECRET_KEY...

i need to cancel duplicated scheduled task

is there such feature. I have a webhook that fires multiple times in a short period and i need to cancel if its duplicated

import declarate import *.png

Since convex does not allow us to explicitly load the loader such as a link to import *.png. And I ask the question: how to ignore it? since they serve for the astro application, but for the backend I need its key values. As far as I get the image key name they are just referencing....
No description

Infinite loading schema on dashboard / unable to push

Currently not able to push a schema to Convex even though type check passes and I'm not able to see the current schema in the dashboard as it shows an infinite loading state. How do I "reset" it?...
No description

Sorting different on backend vs frontend in React

I have a weird bug where I have a query that sorts a table of tasks based on "start_date".
```const tasks = await ctx.db.query("tasks") .withIndex("by_project", (q) => q.eq("project_id", projectId)) .order("asc")...

Migrations `dryRun` on multiple samples

When I run a migration in dry mode it executes on only one single document, which sometimes is skipped because it's not the instance of a document that needs to be migrated, which makes it hard to test the migration. Any suggestions?

Validate convex auth from standalone hono server.

I have a use case where we have a standalone hono server with cloudflare AI worker. It lives in the same repo as our convex backend, and the rest of our stack. I'd like to make calls with it from our frontend, but want those calls to only be made from an authed user....
No description

Schema Type Info Not Propagating In Svelte / VSCode

Couldn't find a similar post / issue so... I have defined a schema like this... ``` import { defineSchema, defineTable } from "convex/server";...
No description

prefix validator keys helper šŸ™

I'm playing around with this code: ```ts // Helper function to prefix object keys for the Convex validator function prefixValidatorKeys<T extends Record<string, any>>(obj: T, prefix: z.infer<typeof zBlockType>) { return Object.fromEntries(...

Convex Auth Typescript Error with Vercel

A new convex deployment, first time deploy to Vercel throws this error ``` import type { MutationCtx } from "./_generated/server.d"; import { convexAuth } from "@convex-dev/auth/server";...
No description

App stuck reconnecting via websocket

Hi folks, I have been migrating my pet project over to convex and everything has been smooth so far. However, all of the sudden, my app (react) no longer seems to be able to connect to the dashboard via websocket. It keeps trying to "sync" in the network tab (see screenshot) but it never succeeds connecting, just stuck in an infinite loop of re-trying. ...
No description

Convex socket connection is disconnected after authentication failure

As shown in the image, when attempting to log in with an expired token, the connection is disconnected after the failure message is returned. Is this the intended behavior? AuthCallback is not being called.
No description

convex auth with google

i am using convex auth and nextjs with google provider when I get redirected to googles sign in it says "Sign in to continue to something.convex.site" where can i change this to my domain?

How do I wait for a useQuery declaration to return before proceeding?

I feel like I'm missing something simple. Here's the code for a component that gets called on many pages in my application : ``` const { isLoaded, isSignedIn, orgId } = useAuth(); const contractTypes = useQuery(api.contract_types.list, { orgId: orgId !== undefined ? orgId : undefined }) || [] const addContractType = useMutation(api.contract_types.add)...

Request Body as argument

how do i pass request.body as an argument since its not a supported convex type

generateUploadUrl(...)

Add options to generateUploadUrl so you can specify what file types or sizes are allowed. Otherwise, it turns out that they can fill it with whatever they want, which ruins the idea. Example ```ts generateUploadUrl({contentType: "image/png", maxSize: 1024}) or multiple...

Convex Auth discord roles

Hi there! How well does convex Auth match the next Auth implementation? Is it feasible to configure it to put discord roles into profile via oauth similar to this article for next-Auth? https://hwhite.dev/blog/next-auth-discord-roles#setup...