#Convex 17.0 Recommendation on moving over typed middleware functions

5 messages · Page 1 of 1 (latest)

old sinew
#

I wondering if there's any recommendations on updating typed middleware for handlers. Or some guidance here would be great!

wet cypress
#

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.

old sinew
#

Also since I have python code in my project, do those still leverage the string for function calls?

wet cypress
#

They do, still foo/bar:baz or foo/bar or foo

mint carbon
#

You can check out the convex-helper repo - @marsh raven 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