"use node" in tutorial
https://docs.convex.dev/tutorial/actions
```javascript
"use node";
import OpenAI from "openai";...
Querying embeddings
For querying embeddings, do we have to use the node runtime? I was looking at the convex Langchain integration and it's mentioned over there but not in convex website docs https://docs.convex.dev/vector-search
Conditionally run useQuery
Hi, I can't get around this problem so I want to share it with you:
1. I have a component, a shad/cn dialog, which lives on another component.
2. inside this component, I use a "useQuery" to get some data from the DB. I pass as arguments to the "useQuery" function some Component Props (like a user._id)
3. these Component Props are defined only when the dialog is opened, so the first problem I had to solve was to make the "useQuery" function not execute until the dialog modal is opened, otherwise I would get an error....
Open source enterprise apps
is there any opensource real world / "enterprise" project made with convex I can learn from? I really love the stack blog posts and documentation of convex, but would be lovely to have a look at some real world sophisticated solution to learn best practice from, which deal for example with serious amount of traffic or complex problems which is beyond demo purpose?
https://docs.convex.dev/quickstart/
https://docs.convex.dev/quickstart/nodejs
how do i streamline data to my database with nodejs it looks here like they are just showing how to get data right?...
Array includes
Is there any way to filter data based on array includes?
Example: I have a query that takes in userId param and I have a collection "userMessages" with field "users" which is array of userIds
How can I filter the data based on users.includes(userId)?
Are there any code examples for this?...
OSS Hosting
Hello Convex team, I was wondering any plans to further simplify the self-host option I watched the last video about being open source but the setup process is a lot, any plans to make it more easier ?
Many thanks 🤩 👍...
transactional inserts
For some reason, I had always assumed that if one of the db operations (ex:
db.insert
) fail within a function, convex enforces transactional behavior across all operations to fail or revert. Upon testing, this does not seem to be the case and we would need to implement our own rollback mechanisms. Given the behavior, it's seems obvious but just incase, I would be grateful for just a confirmation, thank you.How to get preloaded data on the server
Hi Guys, I am back with another question.
This is related to Preloading Data https://docs.convex.dev/api/modules/nextjs#preloading-data
I followed it, it's working. however I am not sure if its working as its supposed to be.
In my next js app, layout.ts file, I call
preloadQuery
to load the query...chained deletes
Hey Convex! I just wanted to ask a quick question before I go down a logic rabbit hole... Does convex provide any sort of helpers / convenience for a sort of "cascade/relational delete"? Rather than needing to write some unwieldy functions that tear apart related data, I am hoping/wishing for some sort of function that is essentially "Given this ID, delete it and anything related to it" so that I don't have to worry about orphaned data, and I don't have to rely on finicky chained deletes that co...
CMS Stuff
Hello everyone, I am sorry if this is a bit off-topic but If I need to have a blog and ebook like style sections on my site with images, videos, rich text etc... with categories that can have subcategories, can be sorted, searched etc... Would you guys recommend using Convex with Algolia for example or use a dedicated headless CMS like Sanity, PayloadCMS etc... for this?
Supabase comparison
how does convex compare to the latest supabase announcement: https://supabase.com/ga-week
Pending state for mutations and actions
is there some sort. a pending state i can access for mutations and actions As i live in Europe. updates are not instant. so being able to show the user a pending state would be awesome,
do the AI chatbot has access to the
do the AI chatbot has access to the
convex-helpers
docs/repos? if not then it would be also helpfulRealtime data sync between SQL/Convex
Hello guys, is there Safeway to create self hosted convex database and connect it to sql server for realtime data overwriting.
I'd:
I'd:
- Make sure that
npx convex dev
is running successfully (it does a little codegen that might have different results between your branches)
- Restart TypeScript server in VS Code (as it is a fickle mistress)...Preloading queries
Hi guys, is it possible to preload the first query on the server? (found it: https://docs.convex.dev/client/react/nextjs/server-rendering)