Closed SpadarShut closed 1 year ago
Variables from useDefaultOptions are actually never passed to queryFn.
const usePost = createQuery<Response, Variables, Error>({ primaryKey: '/posts', queryFn: ({ queryKey: [primaryKey, variables] }) => { // variables is actually undefined here // ... }, useDefaultOptions: () => ({ variables: { id: 42 }}) })
Passing variables to hook instance works however.
Already fixed in v1.4.3
Thanks!
Variables from useDefaultOptions are actually never passed to queryFn.
Passing variables to hook instance works however.