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
I'm looking for an option to explicitly prevent a query from updating when a variable changes. I have no idea why one of my queries gets updated when a variable changes (none of the variables are refs or reactives). The only thing I found in the doc related to this is the following.
Each query declared in the apollo definition (that is, which doesn't start with a $ char) in a component results in the creation of a reactive query object.
But I have no clue on how or where to add that $ char.
In the end, I want my query to execute ONLY when I tell it to. Not whenever one of the variable changes.
Describe alternatives you've considered
I have tried query.stop() but this breaks my pagination. I have also tried adding query.restart/start() before calling query.fetchMore and it doesn't work either.
I have scanned my app to make sure none of the variables where refs or reactives.
I have tried the enabled, debounce and throttle options without success.
Describe the solution you'd like
I'm looking for an option to explicitly prevent a query from updating when a variable changes. I have no idea why one of my queries gets updated when a variable changes (none of the variables are refs or reactives). The only thing I found in the doc related to this is the following.
But I have no clue on how or where to add that
$
char.In the end, I want my query to execute ONLY when I tell it to. Not whenever one of the variable changes.
Describe alternatives you've considered
query.stop()
but this breaks my pagination. I have also tried addingquery.restart/start()
before callingquery.fetchMore
and it doesn't work either.enabled
,debounce
andthrottle
options without success.Additional context
Here's the query in particular
getColumnsToQuery
return aRecord<string, boolean>
object used with the@include
directives to show or hide some fields.Excluding all the boolean params, here's the graphql query.
The text was updated successfully, but these errors were encountered: