-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid Query Parameter - useFind
affects useMutation
methods
#11
Comments
At the core, the issue is that To answer you question of why
The same behaviour happens with update/remove, not just create. The same happens when Feathers server sends realtime events, so this live query behaviour works not only when you create something locally, but also if other users / devices / tabs create something and the app receives a realtime event. I hope that makes sense so far. The issue is that you used Another approach could be to opt out of the default There is another issue this example pointed out, although, perhaps not new - you implemented a |
Thank you so much for the detailed response. This helps a ton. The part that I was missing to debug this on my own was the role of the And you're totally right, I forgot to enable event emitting back to the client. My actual application does this, and the live updating stuff is awesome.
Yes, this was just a really naive version without debouncing or anything, but that's a really interesting point that I didn't think about with the bloated cache. Searching with I suppose the right way to handle search in the short term is to just do it outside figbird? |
The Yeah, search is definitely an interesting use case in that it can be highly dynamic (generating many cache entries). One option would indeed be to do it outside figbird, why not. Another option would be go into internals and delete cache manually (scary :D). Yeah, I'll keep this issue open for a while as a reminder to think about these things. |
Repo:
https://github.com/robbyphillips/figbird-issue
Expected
Query parameters in
useFind
should have no effect on commands sent withuseMutation
.Actual
Using a query operator that is not in this list in a
useFind
query causes anInvalid Query Parameter
error when using auseMutation
method laterTo Reproduce (in the repo above)
yarn install
yarn start:dev
Note that there is no error when using the query parameter
$like
in auseFind
query. The error only occurs when using a method ofuseMutation
, and even then, the actual create or patch is successful despite the error.The text was updated successfully, but these errors were encountered: