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
ballingt
ballingt2y ago
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.
Chad Maycumber
Chad MaycumberOP2y ago
Also since I have python code in my project, do those still leverage the string for function calls?
ballingt
ballingt2y ago
They do, still foo/bar:baz or foo/bar or foo
ian
ian2y ago
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
ian
ian2y ago
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.

Did you find this page helpful?