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

Full-text search across fields in different tables

I'm wondering what the easiest way is to do this? I assume I can just create a search index on a new table and use triggers to denormalize data, but maybe there's a better way...

Error: `headers` was called outside a request scope.

I recently switched devices and I wanted to continue working on my project. So I pulled all the code from github and ran convex dev. Everything seemed to be working find and even the env's got filled in as well. This project is currently running in production on vercel so I know it works. But when I try to run it I keep getting this error
Error: `headers` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context
Error: `headers` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context
...

Fuzzy search for function names in functions panel

Would be nice ๐Ÿ™‚ I also always assume that it works like this and only remember after my fuzzy query fails.

custom functions and getAll helper

Hi everyone๐Ÿ™‚ , I create two custom functions to handle my queries and mutations. Now, when I use the getAll helper as below I have some strange errors. Except that I can query or mutate everything with my customFunctions. Do you have any idea what is the problem ? Did I do something wrong with my custom Functions ?...

How to register rateLimiter component in convex-test?

Haven't been able to find anything on testing docs or component specific docs for testing these components. I'm aware that they must be registered by calling t.registerComponent(), with a string name(rateLimiter), schema(can't figure how to get this from the@convex-dev/rate-limiter package), and modules(no idea either). Any guidance would be appreciated ๐Ÿ™‚

Testing `withIdentity` in `convex-test`

Hello! I've created a custom mutation for userMutation and a custom query for userQuery which use getAuthUserId to pass along the current userId and verify that a user is authenticated. I then use these custom mutations and queries whenever I want one of my Convex functions to run with authentication for the current user. I want to write tests for these queries and mutations, and I understand I can use t.withIdentity to mock a user account. How can I get the mock id from the withIdentity user? When I try accessing it, I get a typescript error that the mocked user's id doesn't exist on Id<"users">....

dbRules functions not being triggered

I have the following: ```ts export const dbRules: Rules<AuthQueryCtx | AuthMutationCtx, DataModel> = { firestoreEdits: { insert: async (ctx, edit) => {...

Can anyone access data with CONVEX_URL without authentication setup?

Hi, I have a newbie question. I just started a Node.js project following the "Node.js Quickstart" guide. When exposing a database query like this, without any authentication restrictions, does this mean anyone can access the data if they know the CONVEX_URL? `import { query } from "./_generated/server"; export const get = query({...

Run Python script in Action?

I want to run a Python script (takes an input and returns an output, involves network calls) when users click on a button. Can I do it with Actions? If not, what are some workarounds?

Next.js 15 Convex Auth unable to login with Google OAuth

Upgrading to the new auth/core resulted in the issue. In convex logs I see - /api/auth/callback/google error '(void 0) is not a function '...

Convex Paginated Query with TanStack React Query

Is there out of the box support for Convex paginated queries with React Query? Or do we need to handle it ourselves? ``` const { data, isPending, error } = useQuery( // convexQuery(api.functions.myQuery, { id: 123 }), convexPaginatedQuery(api.functions.myPaginatedQuery, { id: 123 }), // Something like this?...

How to retrieve files from the Storage in Convex

code: ```ts export const getPackageById = query({ args: { packageId: v.id("packageTable") }, // Validate that packageId is an ID from "packageTable"...

Any idea why `NEXT_PUBLIC_CONVEX_URL` is required in a vercel deployment of using convex auth?

this caused many hours of investigation and confusion. for some reason, upon deploying from vercel (preview & prod), NEXT_PUBLIC_CONVEX_URL was required ENV. there was an application server error due to it being missing. I assume triggered via convex-auth provider. During local development, this was never needed. My local .env did not include it. I did have NEXT_PUBLIC_CONVEX_CLOUD_URL which what was used when initializing the client auth via const convex = new ConvexReactClient(process.env.NEXT_PUBLIC_CONVEX_CLOUD_URL!); however, no reference to NEXT_PUBLIC_CONVEX_URL within the project....

String into ID !

That feels so simple and yet I can't manage to nail it on my code :/ Can anybody help? I have this ticketId value in a string and I just need to pass it as an argument in the correct format! What should I do?
No description

Has anybody solved implementing a trigger for _scheduled_functions changes?

I'm creating a job queue, in which I ctx.schedule jobs, and I'd like to update the resulting jobQueue record when it's complete (my jobQueue objects are different and used differently from the primitive _scheduled_functions). I've tried the convex-helpers/trigger, but it doesn't seem to fire on the _scheduled_functions tables, as I don't update it directly. ```...

Help needed: Integrate Launchdarkly with Convex Dev

I am following the tutorial here https://www.convex.dev/components/launchdarkly to setup Launchdarkly with Convex Dev. I am at the step of setting up integration on LaunchDarkly Dashboard. I have filled the fields "name, environment, webhook url, component API token". Then I save the configuration. When I click the configuration form again to validate the configuration, I am presented with an empty form. So I decide to fill it again. When I attempt to generate a new token (I closed the terminal and lost the previous one), I'm getting the error message "A token already exists. Delete the existing token from the tokens table to generate a new one"...

...authTables not showing in api client

Even though I added the ...authTables to the schema they are not showing in the api client but they are showing on the website ```ts import { defineSchema, defineTable } from "convex/server"; import { authTables } from "@convex-dev/auth/server"; import { v } from "convex/values";...

Not sure why this is throwing a "multiple paginated queries" error

``` export const getJobsCountWithQueueAndStatus = internalQuery({ args: { queue: v.string(), status: v.union(...

Docs feedback: CLERK_SECRET_KEY is not findable

This critical (edit: I'm not actually sure which scenarios it is required) environment variable, CLERK_SECRET_KEY, is not in plain text, so therefore not findable in documentation. It is burned into an image on https://docs.convex.dev/auth/clerk...

React quickstart breaks on `npm run dev:frontend`

I ran npm create convex@latest and then npm run dev but I'm getting an error. ``` % npm run dev:frontend ...