jamwt
jamwt13mo ago

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
Customizing serverless functions without middleware
Re-use code and centralize request handler definitions with discoverability and type safety and without the indirection of middleware or nesting of wr...
5 Replies
allen
allen13mo ago
I was wondering if there was some further work on the withUser example from ~6 months ago. Thanks for passing this along.
jamwt
jamwtOP13mo ago
yep, he's made a convex-helpers repo here with a bunch of examples about how to compose pieces together to achieve authz type flows: https://github.com/get-convex/convex-helpers/blob/main/convex/customFunctionExample.ts
GitHub
convex-helpers/convex/customFunctionExample.ts at main · get-convex...
A collection of useful code to complement the official packages. - get-convex/convex-helpers
jamwt
jamwtOP13mo ago
in addition, if you want to try something even higher level, @Michal Srb has created a Prisma-like abstraction here: https://labs.convex.dev/convex-ents (based on an object modeling approach used at Meta)
Convex Ents - Convex Ents
Relations, default values, unique fields and more for Convex
allen
allen13mo ago
I need a weekly/monthly convex digest email to keep on top of these advancements! Too heads down in my own ish. I find myself 3 (minor) versions behind on the core libs every time i come up for air. I'll look at that as well, but havent explored prisma yet, so I might need to get caught up on some underlying concepts first.
ian
ian13mo ago
Let me know if you want to chat more about it - I have the customFunction stuff and I'm thinking about a customSchema which would allow tables to have defaults, auto-incrementing fields, etc. So long as you used it in concert with custom functions and the generated DB wrappers
Customizing serverless functions without middleware
Re-use code and centralize request handler definitions with discoverability and type safety and without the indirection of middleware or nesting of wr...

Did you find this page helpful?