Loading, error, data
Hello community. First time Convex user. How do I display a loading state (spinner) when using the
useQuery
hook? I thought that this hook would return some kind of flag (like in react-query). But it seems to return only the final result. How do I handle the fetching status? (loading, error...) I could not find related documentation.Skipping useQuery calls
Hey everyone, Need urgent help. So i am trying to fecth user details and for that I need to pass kindergarten login user details to getUser api.. below is my code .. but Covex thought error bcs email is undefined when it call first time bcs kinde user details take some time to fecth user details.. so how to solve this problem.. how to wait until i get user info and then only execute useQuery
The article
just dropped a new article on stack about Convex's past and future. why it's designed the way it is, and how we intend to evolve it over time: https://discord.com/channels/1019350475847499849/1210022395297927198/1210022395297927198
How does convex handle date timezone.
How does convex handle date timezone.
If using the new Date() function how does it know the actual timezone time to use...
Or will I have to pass the timezone to it...
Do we have a channel / area for posting
Do we have a channel / area for posting a job post? We would prefer someone familiar with convex, so seems fit to post it here as well if allowed.
Usage calculation
Hi, I would like to check how usage is calculated for database bandwidth.
Suppose a few clients send the same query to a function - is the output of the function cached, or does it incur row reads for each time the query function is invoked?
is there any way i can debug which function is causing the large amount of consumption of read bandwidth so that i can optimize the usage?...
run code when useQuery updates
Hi everyone! Is there any way to run some callback when data from useQuery is updated, for example showing some toast in react app?
Creating a auth role system with Convex
Hello everyone, is there a way to check if the user has a specific role when using convex auth?
Astro and Convex
Hello. Does anyone have examples of usage of convex with astro? I guess you just usi it like if it were a SPA, but wondering if anyone if integrating also SSR . Maybe a shared secret for a JWT token ? Can a cookie be shared ?
oh no, I've looked at the Usage stats
oh no, I've looked at the Usage stats for the first time and I have 1MB bandwidth on turn 2 of my game... guess I have to reorganize the state for partial updates...
@convex-vue/core
Hey everyone, I wanted to let you know that I just published
convex-vue
on npm. Docs are stil pending but I did put some overview of components / composables in the README.
I'm think of elegant way to make it work with nuxt while being flexible, in the meantime I'll try to put up an example template soon ™️
https://www.npmjs.com/package/@convex-vue/core...Customizing serverless functions without...
@ian might have some good thoughts about this. feels related to this work he did recent ( https://stack.convex.dev/custom-functions ) that we've started using in a lot of places
CONVEX_TMPDIR
Yeah, exactly. But on doing so I'm getting below error:
```text
⠋ Preparing Convex functions...
Temporary directory 'C:\Users\vighn\AppData\Local\Temp' and project directory 'D:\Code It\eventix\convex_generated' are on different filesystems.
If you're running into errors with other tools watching the project directory, override the temporary directory location with the CONVEX_TMPDIR environment variable. ...
Keeping Convex functions warm? (avoidin cold starts)
Hi everyone!
I have a quick question regarding convex backend functions (when making external API calls) which I couldn't find in the docs. Do they stay warm? Or do they go cold if not used and then warm up.
I'm asking because I will be creating a backend function which needs to respond as quickly as possible for the UX to be good so having to wait for the function to warm up will not be good....
Has there been any consideration to
Has there been any consideration to adding
v.partial
?
The behavior essentially would be v.object
but to wrap all children in v.optional
.
My typical use case is something like:...Hey! Wondering if anyone has had a
Hey! Wondering if anyone has had a similar issue to what I'm experiencing.
I've setup a next js application with convex and clerk. All nice and simple. Implemented the login and authenticated pages/middleware absolutely fine.
Now this is where I'm confused, when I try and read the auth inside the functions like the example stays my indentity is always null and the function throws an error. However, if I remove the if check and just log out the identity it is what's expected....
Curious if there is a best practices for
Curious if there is a best practices for fanning out in convex. As an example scenario, imagine you have an status update mutation. That then needs to trigger a notification to all followers, which is an action. I could see the following approaches:
1) status update mutation queries all followers (collects all or paginates, unsure if there is a benefit here) and schedules a the action for each follower.
2) status update mutation schedules a separate mutation (to have access to
ctx.scheduler
even though its just querying) that does the follower collection and notification action scheduling. This would make the status update mutation more transactional to its area of concern, but unsure if its worth breaking out, if approach above is performant enough.
3) Have that separate mutation work in paginated batches and reschedule itself to page through the follower result set until exhausted....Restate cancellations
Okay okay, I made fun of restate before but this is kind of cool: https://restate.dev/blog/graceful-cancellations-how-to-keep-your-application-and-workflow-state-consistent/ having built event sourcing systems before I can appreciate how cool this is. I wonder if it’s possible to build something like this in convex.. :microsoft_thinking:
Is there an idiomatic way for an action
Is there an idiomatic way for an action to return an error to the client?
Convex and Startups
Hey, is Convex affordable in long term for a startup? It seems too good to be true I guess.
Would it cause financial collapse eventually or is it pretty fine?
I guess total AWS', realtime features etc. would cost similar to it anyways, correct?...