Closed bhalsodkhushal closed 9 months ago
As per the TSDocs/TypeScript typings and our docs, executeQuery
is not a state setter and does not accept variables
. It accepts an OperationContext
object:
This is also not a pattern that makes much sense.
Either, you need to track your variables in state, and update that state, as it's an input to useQuery
, or, if you're doing programmatic queries, you can use the Client
directly (e.g. via useClient
)
As per the issue template, I'm converting this to a discussion, since it's a usage issue/question
Describe the bug
I am using urql version 4.0.5.
For fetching data i am calling below request using useQuery hook.
For fetching new user data i am calling reexecuteQuery as per document, but it not working.
reexecuteQuery({ variables: { userId: 3 } });
Reproduction
reexecuteQuery({ variables: { userId: 3 } });
Urql version
4.0.5
Validations