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
Describe the bug
refetch in useQuery will auto merge the previous variable with current variable
To Reproduce
Steps to reproduce the behavior:
see the code below
const testGql = gql`
query lossList($query: String){
}
`
const { refetch } = useQuery(testGql, params, options)
refetch({ query:"first time" }) // the first time with variable query: first time
refetch({}) // the second time, I don't want to pass any variable to backend, but it will still merge the privious variable into the current varible
** Reason **
it is caused by the code this line. I think this is a bug, sometimes the server do need a empty request variable.
Expected behavior
the second time's request should request with no varibale
Describe the bug
refetch in useQuery will auto merge the previous variable with current variable
To Reproduce
Steps to reproduce the behavior:
see the code below
** Reason **
it is caused by the code this line. I think this is a bug, sometimes the server do need a empty request variable.
Expected behavior
the second time's request should request with no varibale
Versions
vue: 3.4.21
vue-apollo: 4.0.2
@apollo/client: 3.9.9
The text was updated successfully, but these errors were encountered: