Convex 17.0 Recommendation on moving over typed middleware functions
I wondering if there's any recommendations on updating typed middleware for handlers. Or some guidance here would be great!
5 Replies
We'll get convex-helpers updated soon, we did some investigation to make sure middleware still works well with the new syntax and it looks good. One coming improvement is that since useQuery and other hooks are no longer generated code in 0.17.0 it's easier to reuse hook wrappers between projects.
Also since I have python code in my project, do those still leverage the string for function calls?
They do, still foo/bar:baz or foo/bar or foo
You can check out the convex-helper repo - @sshader and Tom did some great work to get them upgraded for 0.17. In particular, the sessions middleware has a variant in there that accounts for staying backwards-compatible with previously stored session ids in localStorage / sessionStorage. If you're starting from scratch you can just use the regular implementation that assumes the new ID format
GitHub
GitHub - get-convex/convex-helpers: A collection of useful code to ...
A collection of useful code to complement the official packages. - GitHub - get-convex/convex-helpers: A collection of useful code to complement the official packages.