Vector search advanced filtering
filter: (q) =>
q.or(q.eq("cuisine", "French"), q.eq("mainIngredient", "butter")),
filter: (q) =>
q.or(q.eq("cuisine", "French"), q.eq("mainIngredient", "butter")),
What language to choose?
I have a question: I'm familiar with Java, C++, JavaScript, and Python. I'm currently in web development, with plans to learn into AI later. However, I'm interested in understanding the best approach to learn and utilize DSA effectively, so what language should I choose, anyone help!
Counting total table documents
Is there an easy way to get the total no. of documents for a specific table in convex without scanning the whole table? The use-case is to show “this platform is used by x users” message on the website, where ‘x’ is the total number of documents in Users table. I can think of creating a counter and incrementing it for each user table document addition (counter++) but just wondering if there is any direct way to get the total documents number for a table.
useAction error handling
I see. So if my useAction errors though, its not obvious how to return that to the UI unless I am just wrapping in a try catch and returning the error as values?
I was thinking something like this:
```
const { data: paymentUrl, isLoading: paymentUrlLoading } = useQuery({...
REST API
Will it ever be possible to use convex as a rest api. Right now it seems like convex can only really be used with its drivers but what if i wanted to use it in flutter or in a java program? Would that be possible?
Code organization patterns in Convex
Hello everyone! After playing around and creating a slack app that's wrapping an OpenAI assitant with a knowledge base, I've gotten to kick the tires a bit on Convex. As the various back and forth interactions have grown in complexity, I've noticed some rather strange architectural patterns emerge. I'd like to discuss some best practices around overall app structure, which I have not noticed in any examples or docs, since they are all relatively trivial.
1. Convex seems to force all code into two buckets: internal, and api (public and private).
2. Convex furthur devides all code into actions, and then all the rest (mutations, queries).
3. All files in the root of the convex folder seem to represent a resource, or a domain, and thus become the tip of the spear for the entire application. ...
Enable HTTP actions
hey, how to fix This Convex deployment does not have HTTP actions enabled. error? on webook clerk
Web Crawling Background Actions
for example i launch 100 actions, 1 return in 1 minute, another in 10 mins....and so on
File Access Control
for convex storage, is there a way to lock down stored files? like never allow access unless they have a signed url? I know the ids are like 32 characters long which is probably impossible to guess, but I'm curious is there was a "private bucket" type of approach
Auth with Clerk and Convex
I'm very new to Convex and am just going through the tutorials and documentation. But from what I've seen so far it really is the missing piece I've been looking for. Really excited to test this fully on some projects.
However, it still seems like there's a little bit of friction when setting up auth. From reading some of the support threads it seems that, if you're using Clerk, then you should almost certainly have a users table with a Clerk ID so that when a user logs in you can grab the Convex user via the Clerk ID and then base all Convex queries and mutations on the Convex user ID (hope I got that right). While there is a template, and docs for how to implement this it feels perhaps a little too manual when creating a new app.
From a very new users perspective, I think that if Convex were to give a bit of attention to this area and make it super easy to add auth so that you almost didn't even have to think about it that would be amazing and you could effectively just spin up a new app with a db (via Convex) and have auth pretty much just work and you could just start to query users in the Convex table. I think if this was the case it would make Convex even better (it's pretty incredible already!)....
query error
export const getStore = query({
args: { storeId: v.id("stores") },
handler: async (ctx, args) => {
const store = await ctx.db.get(args.storeId);
console.log(store);...

```const identity = await ctx.auth.
const identity = await ctx.auth.getUserIdentity();
const identity = await ctx.auth.getUserIdentity();
Rust / Latency Questions
Questions for you guys!
1. If I use the Rust client, do I get the same automatic updates on the objects that I am used to on React? Or is that something I would have to implement on my side?
2. When an action or mutation changes a row or adds a row in a DB, what is the expected latency from the moment the mutation call is done to the moment it is reflected on the object that queries that DB on the client side? Particularly, I am interested in the latency that is added for certain actions by having to go through the DB rather than sending a result directly....
Using react-hook form, zod, & convex together
Hi all, does anyone know of a good article/tutorial on using react-hook form, zod, & convex together? Most of the stuff i've seen online is for smaller inserts/creates using convex (eg: create TODO, Thumbnail, etc) I am wanting to use it for a fairly large form.
is there a suggested convention for
is there a suggested convention for index names? (e.g.
by_token_identifer
vs. by_tokenIdentifer
for an index on tokenIdentifier
)convex-helpers types
When installing the convex-helpers i don't get any types
I've tried removing adding again, using npm command instead etc. but no success....
yarn add convex-helpers
yarn add convex-helpers
folder structure in a project
hey this seems like an obvious question but what is the reccomended way of structuring a projects files and folders??
For now I have been putting client-side files in
/src
and convex related files (queries, mutations, actions etc) in /convex
but what about any code that is shared between client and server? What about various other "model" or util files that shouldnt be included in the automated API generation?...