Handling param differences when using on-demand collections?
#1057
Unanswered
Nick-Motion
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using
useLiveQuerywithon-demandcollections where the API and client need to filter on the same logical field, but using different fields/logic. Wondering how to do this in a non-hacky way.Current approach:
The problem is there is no
assignedToMefield - but that's the API param name.The
or(eq(1, 1), ...)is a hack to pass the field intoqueryFnloadSubsetOptions, where it is passed in the call.I have quite a few other cases on the same general theme as well - for example, API expects a string param, which corresponds to a deep field within the model:
Is there a cleaner way to express "send this to the API, but use different logic locally"?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions