Skip to content

queryFnParamsFilter function is never getting called. #1123

Answered by TkDodo
nanandn asked this question in General
Discussion options

You must be logged in to vote

The object syntax of useQuery looks like this:

 // or using the object syntax
 
const queryInfo = useQuery({
  queryKey,
  queryFn,
  config,
})

so you would probably need:

return useQuery({
    queryKey: ["contentItems", { query: q, start, size }],
    queryFn: fetchContentItems,
    config: {
        queryFnParamsFilter: (params) => {
            console.log(Params: ${JSON.stringify(params)})
            return params;
        }
    }
});

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by nanandn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants