You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering if you would be ok to add support for the fetchQuery method in your eslint plugin (rule: prefer-object-syntax) ? 🙏
Indeed, we have one occurrence of fetchQuery in our repository and would like to make sure it shares the same practices that we use for useQuery/useMutation.
====
Actual context: => we encountered a bug related to our fetchQuery usage => Missing queryFn.
The main reason was we were calling fetchQuery without any queryFn 🙈. fetchQuery('foo')
Even if having this eslint rule will not fix our error (TS will not complain if we call fetchQuery({queryKey: 'foo'}, we will fix our types for this), we really want to enforce the options object for all our method calls.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello !
I was wondering if you would be ok to add support for the fetchQuery method in your eslint plugin (rule: prefer-object-syntax) ? 🙏
Indeed, we have one occurrence of fetchQuery in our repository and would like to make sure it shares the same practices that we use for useQuery/useMutation.
====
Actual context: => we encountered a bug related to our fetchQuery usage =>
Missing queryFn
.The main reason was we were calling fetchQuery without any queryFn 🙈.
fetchQuery('foo')
Even if having this eslint rule will not fix our error (TS will not complain if we call
fetchQuery({queryKey: 'foo'}
, we will fix our types for this), we really want to enforce the options object for all our method calls.Thank you in advance for your feedbacks !
EDIT : Related PR
Beta Was this translation helpful? Give feedback.
All reactions