Variable recalculation for each polling request
See original GitHub issueIntended outcome: Use query polling option and recalculate variables for every request.
Actual outcome: We have a time deppendend query variable, this variable is not propagated from the props, but it is calculated from current time in the query options function. But it’s not recalculated when a new polling request is throwed. Is there a way how to enforce variables recalculation please?
const config = {
options: (props) => {
const { base } = props;
// a dynamic variable calculated from current time, it is not recalculated
const from = new Date().getTime() - base;
const variables = { from};
const pollInterval = 5000;
return { variables, pollInterval };
}
};
How to reproduce the issue: https://codesandbox.io/s/q3mjxyw7zw I tried to simplify the issue and create a simple config with a current time dependend variable. This variable is not recalculated.
Version
- apollo-client@2.2.5
Issue Analytics
- State:
- Created 6 years ago
- Reactions:10
- Comments:19 (1 by maintainers)
Top Results From Across the Web
How is Polling Load Calculated? - SolarWinds THWACK
We need the detail behind the polling rate calculation so we can understand specifically which variable has the most effect eg. node/interface element ......
Read more >Will frequent polling overload the server? If so, what's the best ...
Every Ajax poll request that is made will contain output_hash which is the digest of the data returned by the server previously.
Read more >R Calculation Server Design - PI Square - OSIsoft
Provide rolling windows for one or more variables; Sample the stream based on the polling rate; polling rate = 0 would be event...
Read more >Practical Guidance on Calculating Sampling Error in Election ...
In election poll results, the proportions favoring candidates and the ... the calculation steps in STATA and SPSS programs to handle polls ......
Read more >Refresh command (TMSL) | Microsoft Learn
Request ; full, Database, Table, Partition, For all partitions in the specified partition, table, or database, refresh data and recalculate all ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Can we revisit this issue? I have a dynamic variable that needs to be set at each
pollingInterval
.Any update on this issue?