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
Would it be possible to pad out the examples with mutations and their callbacks? I've been wrestling ReactQuery.useMutation({onSuccess: ...}) with queryClient (getQueryData, setQueryData etc) but failing to wrap my head around it.
QueryClient is listed as work in progress, but current version is 1.1.0. Can it be used?
Hey @Holmqvist1990 👋
Could you elaborate about your need? I'm not working on this repo actively, but I have plans to finish the support for the missing bindings.
What error are you getting with this code? setQueryData is typed as ('queryKey, option<'queryData>) => unit which assumes the use as setQueryData(["todos"], newTodo), it's possible to support setQueryData as ('queryKey, option<'queryData> => queryData as well (using the updater function) but I think you can still do the same since you can get the same value by doing queryClient.getQueryData with the same queryKey.
Activity
vmarcosp commentedon Oct 10, 2023
Hey @Holmqvist1990 👋
Could you elaborate about your need? I'm not working on this repo actively, but I have plans to finish the support for the missing bindings.
fholmqvist commentedon Oct 11, 2023
Hey @vmarcosp, thanks for the reply! 👋
The README demonstrates:
Perhaps it could also demonstrate something like:
(note: above examples don't compile)
vmarcosp commentedon Oct 15, 2023
What error are you getting with this code?
setQueryDatais typed as('queryKey, option<'queryData>) => unitwhich assumes the use assetQueryData(["todos"], newTodo), it's possible to supportsetQueryDataas('queryKey, option<'queryData> => queryDataas well (using theupdaterfunction) but I think you can still do the same since you can get the same value by doingqueryClient.getQueryDatawith the same queryKey.