Convex Community

CC

Convex Community

Join the community to ask questions about Convex Community and get answers from other members.

Join

support-community

show-and-tell

general

self-hosted

announcements

How to properly authenticate convex functions called via fetchAction and fetchMutation.

So in a user context I have found that you can pass the users token to object on the third arguement of a fetch action call as below ``` const mythings = await fetchQuery( api.yadiyadiyada.getSomeX, {...

dashboard not loading in firefox

Hi, I tried disabling any adblocker extensions in firefox but still I am unable to open the convex dashboard in firefox. the console shows the following error Firefox can’t establish a connection to the server at wss://outgoing-panther-899.convex.cloud/api/1.18.2/sync. I'm now using google chrome without issues, probably something related to browser compatibility, firefox hasn't been in it's prime lately...

PRODUCTION ERROR

My production environment has been down for a long time (at least 40 minutes). The dashboard doesn't work. The websocket doesn't connect from the application site. The Discord community is unresponsive. The website doesn't reflect this production outage. This is alarming to me. Paying customer....

Could not find public function

All of a sudden I'm getting: `` Ok([Request ID: 2333d44835d22263] Server Error Could not find public function for 'users:getUserById'. Did you forget to run npx convex dev or npx convex deploy`?...
No description

Reporting Phishing

Hi team, what's the best method to report phishing URLs on Convex? Happy to move to a DM or group to discuss more widely. Thanks, Luke from Netcraft....

When to query data in a framework's loader vs a route component? Or imported component?

Coming from a Remix/RR7 background where basically all data fetching was done in the loader. Now I'm making headway in TanStack Start/Router and Convex and its slowly starting to click. Convex docs for TanStack always show doing a query in the route component, usually highlighting the reactivity for changes in the database which is great. My questions are, under what circumstances would one do the query in a loader/beforeLoad and when would one do it in the route component? When reactivity is needed is it only achieved in the route component? Can reactivity happen from an imported component that has a useQuery in its export? If one doesn't need reactivity is it better to query in the loader? Some of this has to do with the code splitting that TanStack does, keeping code securely processed on the server vs potentially exposed on the client. How that all works is one of the many ways my ignorance starts to show. Like anyone else, I want to keep safe the data that needs keeping safe, and also have the app do the work where it should be doing it (loader/component/route) and not mistakenly trying to make it do it one way when it only works the other....

Preferred method for saving formatted text in string fields?

It's still early days for me in Convex and my app. For now I need to display a block of text made up of a number of paragraphs. What is the secret sauce to copy/paste into a string field and maintain paragraphs? Eventually I will be building something more sophisticated with TipTap or similar. For now, I'd like this block to have some paragraph breaks. I tried \r and \n thinking it might interpret those but it doesn't seem to.

Execution out of memory on httpAction

Getting the error Javascript execution out of memory on httpAction. I'm doing some image processing, any way to up the execution memory limits?
No description

TypeScript not Inferring Query `handler` Type Correctly

Hey everyone, I'm trying to "JOIN" some data in my query in order to include the creator directly in my response. However, it seems like TypeScript isn't able to properly infer the handler's return type even with excessive type hints:```ts export const find = query({ args: { paginationOpts: paginationOptsValidator, filter: v.optional(...

How to get request.ip inside a convex server function?

The title: This would be really nice
const {ip, userAgent} = ctx.request
const {ip, userAgent} = ctx.request
...

best way to build ai chat with infinite memory with vector search ?

Hi, need some advice here. i just want a simple infinite memory group chat, no file/image or pdf upload needed. there'll be tables like 1. sessions...

Convex, react flow and collaboration

Did anyone successfully implement realtime collaboration with react flow and convex to do something like the following liveblocks example? https://liveblocks.io/examples/collaborative-flowchart/zustand-flowchart...

can I do this type defenition like in typescript with v validator?

I tried doing:
const textData = literals('x','y','z');
const typeOfTextDataInRecord = v.record(textData, v.array(v.string()))
const textData = literals('x','y','z');
const typeOfTextDataInRecord = v.record(textData, v.array(v.string()))
...

Query, filtering array of IDs

I have a jobs schema which has a skills property which is just an array of ID references. ```ts jobs: defineTable({ title: v.string(),...

I can not connect with convex on ubuntu

Hello I am using convex now, but I have some errors When the project is deployed on Vercel, backend requests work fine. However, after uploading it to an Ubuntu server, setting up the domain (xxx.com), and enabling SSL encryption, backend requests result in an expired error....

Passing args to dev --run

Is it possible to pass args to a mutation called via the --run flag for convex dev? I'd like to modify how an init script runs based on additional cli args, instead of needed to write several different init scripts.

Hey Convex team,

I want to post a bug during the querying of documents using indexes The stars table contains all the information about a snippet (which is used in my project) and tells whether that code snippet is starred by a user or not Let's say a user "X" has starred a snippet "Y"...
No description

tailwind

was having trouble getting tailwind to work so In just created a brand new project using pnpm create convex@latest selecting vite and github auth ```...