-
-
Notifications
You must be signed in to change notification settings - Fork 522
Description
Describe the bug
Setting the debounce option in useQuery seems to have no affect and a query is executed for each variable change
To Reproduce
Steps to reproduce the behaviour:
- create any query with composition API using useQuery ...
- set debounce option to some seconds e.g.
{ debounce: 15000 } - load page. GQL query is executed instantly, but should be executed after 15 seconds
- change any variable in query
- GQL query is again executed instantly, but should be executed after 15 seconds
Expected behaviour
GQL query is always executed instantly, but should be executed after 15 seconds
Versions
vue: 2.6.14
vue-apollo: 3.0.8
@apollo/client: 3.4.16
@vue/apollo-composable: 4.0.0-alpha.15
@vue/apollo-util: 4.0.0-alpha.15
Additional context
Also using graphql codegen, but I checked the generated code and an simple example without codegen too, which should suffice.
example
const { result } = useQuery(getEntitiesDoc, () => ({ uuid: uuidRef.value?.uuid }), { fetchPolicy: 'cache-and-network', debounce: 15000 });codegen versions:
"@graphql-codegen/add": "^3.1.0",
"@graphql-codegen/cli": "^2.2.1",
"@graphql-codegen/named-operations-object": "^2.1.0",
"@graphql-codegen/typescript-operations": "^2.1.8",
"@graphql-codegen/typescript-vue-apollo": "^3.1.6"