3 Replies
The only run in the server
Assuming you mean query, mutation, action.
But the types are shared with the client
the console.log of the following gets printed in the browser console.
im using the next.js example from the convex docs
makes sense tho right? given this function is called inside a client component?
The logs are sent down to the client, in your dev instance. Thankfully, this runs really close to the database in the server so it has fast access to do repeated database queries. And hide data from clients, do auth, etc
In production we don’t send down the console logs, in case you accidentally log something sensitive.
It just feels like it’s running in the client because it’s so smooth 😎