Skip to content

Unsure how to pass optional params using the object syntax #544

Answered by dimitrisnl
dimitrisnl asked this question in General
Discussion options

You must be logged in to vote

It is my understanding that the variables key refers to the variables that dont affect the key, so this is the right place to add anything that shouldn't affect the caching mechanism.

useQuery({
  queryKey: ['todo', 7],
  queryFn: fetchTodos,
  variables: [],
  config: {},
})

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

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