Uncaught Error: The arguments to a Convex function must be an object. Received: skip
Using convex-react-query, I noticed there is a new skip arguments that can be used to disable a query when the arguments is not available yet. But I get this error: Uncaught Error: The arguments to a Convex function must be an object. Received: skip. Which means the convex client complaining about the args. Looked at the code and normally the query shouldn't run at all. Any idea? Maybe I understand it wrong.
My code:
4 Replies
@sbkl this was just added, looks like it doesn't work yet; "skip" is usually handled at the hook layer but that layer is skipped in this implementation
Filed, I'm working on this this week https://github.com/get-convex/convex-react-query/issues/8
GitHub
"skip" is shown in types but doesn't work yet · Issue #8 · get-conv...
Making "skip" explicit in the types was a quick way to fix the new types for useSuspenseQuery but it doesn't actually work yet!
@sbkl Just published @convex-dev/react-query@0.0.0-alpha.8 which has a first pass for this
Works like a charm! thank you. Was getting some errors because of this when the url params wasn't available. But not anymore!