shreygups
shreygups11mo ago

how do i modifyqueryset in the rust library

im using swift ffi and want to update args. does the rust lib let u do that with subscribe()?
3 Replies
ballingt
ballingt11mo ago
@shreygups creating a new subscription or dropping an old subscription modifies the query set (the set of all (queryName, args) tuples you are subscribed to) To update args you need to create a new subscription with the new args and drop the old one. You can control the timing of this as you see fit: you might wait for a response from the second args before dropping the old one if you want stale results, or drop immediately By the way @shreygups check out https://github.com/MathieuTricoire/convex-swift, possibly relevant I'm not sure if it wraps the Rust client or is just its own Rust client more relevant if the former
shreygups
shreygupsOP11mo ago
i ended up just writing a websocket handler since i believe it is it's own rust client and doesn't have the same methods @ballingt https://raw.githubusercontent.com/AwesomenessXP/Yap/main/Yap/WebsocketHandler.swift?token=GHSAT0AAAAAACJEUDD3JJBSYRMSNJ2I3I3WZOWRBIA way easier than i expected
ballingt
ballingt11mo ago
@shreygups link might be private nice!

Did you find this page helpful?