Do you have or would do a video on react-query with nextjs app router? I've found a experimental package, but it has poor SEO :( Maybe there ist "THE" way?
how can i use convex mutation inside nextjs api, i am trying to implement custom oauth callback for github to /api/github/callback and here i am able to fetch github user data, now i want to insert / fetch data from convex database to check if already exists or to create new user
Whats the advantages of using this over trpc? (also looks like Convex replaces both tRPC and Prisma at the same time?) Edit: also it looks like this connects to a websocket as well (im guessing to prevent loading states in the application?)
@@farfazzi you can invoke an action directly from your ui, but the idea is mutations are atomic so you can’t run non deterministic code in them, hence you have to schedule actions
Can someone enlighten me about how can i delete documents based on some fields? I mean is there any better way than, querying the table to find the id and then ctx.db.delete(id)?
If you need t li query by certain fields you should be using an index. Put a composite index on the table for the main fields you need, query for the items you need, filter down by more fields if needed, then update the ones you need by id. No there is no patch where clause, but I don’t find it too hard to write your own helper function to achieve what you need. Also they have something new called convex ents which might make dealing with the models easier
Their hobbyist plan is gracious and I like that. However, I don't think I like the idea of abstracting so much stuff away from the developer when everything was already so abstracted. It makes our lives easier for sure but at the cost of feeling less like a developer.
A lot of us at Convex worked at big tech companies, and the abstractions we're building are similar to the ones used there. Being focused on your app and your business logic definitely doesn't make you less of a developer! :)
Happy there was a schema was worried, the action for api seems pretty cool, its like a typescript backend, its the first time i got exposed to it
Right now I'm using clerk and drizzle orm to do some of these stuff together with tRPC. But definitely I'd use this on my next projects.
Why not use prisma over drizzle
oh nice. i was planning to use firebase for the websocket feature. this is a good alternative, ill definitely give this a try
I've just tested it and it looks awesome! Thanks
Do you have or would do a video on react-query with nextjs app router? I've found a experimental package, but it has poor SEO :( Maybe there ist "THE" way?
I love the approach of convex, but I'm only abit concerned about vendor locking
so is there no need for api routes with nextjs since convex does its own thing? or?
Yes that’s correct
how can i use convex mutation inside nextjs api, i am trying to implement custom oauth callback for github to /api/github/callback and here i am able to fetch github user data, now i want to insert / fetch data from convex database to check if already exists or to create new user
Personally I’d use convex http endpoints and have the webhook invoke convex. If not, you can use the convex node sdk to invoke mutations
Good job babe!!!
Great content! Apologies if you mentioned it somewhere else, but what is the vscode theme you are using?
bearded theme stained blue
Alrighttyyyyy fine.
Hey Cody, which theme are you using for VSCode
What if i have the need to run plain sql against the convex db,is that accessible somewhat by, lets say, a java jdbc connection?
convex has a rest api you can hit I believe, but no you can't run raw SQL because they are not running a sql database from what I understand
I swear I’m developing dyslexia, or some thing because I could have sworn I heard you say that there is a Hackathon being hosted by convicts!
😂😂
Lmaoooooooo that would be pretty interesting tho 👀
the winner gets to a free day-in-the-life by spending the night in jail
Whats the advantages of using this over trpc? (also looks like Convex replaces both tRPC and Prisma at the same time?)
Edit: also it looks like this connects to a websocket as well (im guessing to prevent loading states in the application?)
Yeah the data store is built into the backend functions, websockets give you real time updates as data changes
Hi, Why do we need scheduler to call thirdpartyapi ?
@@farfazzi you can invoke an action directly from your ui, but the idea is mutations are atomic so you can’t run non deterministic code in them, hence you have to schedule actions
So, its very similar to Graphbase, right?
Can someone enlighten me about how can i delete documents based on some fields? I mean is there any better way than, querying the table to find the id and then ctx.db.delete(id)?
If you need t li query by certain fields you should be using an index. Put a composite index on the table for the main fields you need, query for the items you need, filter down by more fields if needed, then update the ones you need by id. No there is no patch where clause, but I don’t find it too hard to write your own helper function to achieve what you need. Also they have something new called convex ents which might make dealing with the models easier
so no more express js and postgres?
what are the cons and limitations of Convex?
good questions, I'll think about it
what icon pack are u using on vscode?
Bearded icons
How would you do an upsert in convex?
Get the record, modify the data, call patch on record
Their hobbyist plan is gracious and I like that. However, I don't think I like the idea of abstracting so much stuff away from the developer when everything was already so abstracted. It makes our lives easier for sure but at the cost of feeling less like a developer.
A lot of us at Convex worked at big tech companies, and the abstractions we're building are similar to the ones used there. Being focused on your app and your business logic definitely doesn't make you less of a developer! :)
First