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
if (result?.minDelaySeconds) {
this.pollIntervalMs = result.minDelaySeconds * 1000;
}
So far it looks like minDelaySeconds is always set to be 30 seconds. This behavior prevents us to define a larger update window, and probably is a simple oversight.
We suggest updating lines in question to:
if (result?.minDelaySeconds) {
this.pollIntervalMs = Math.max(this.pollIntervalMs, result.minDelaySeconds * 1000);
}
This way we can define larger update windows, while still respecting semantics of minDelaySeconds.
Additionally, I wonder if Apollo team sees value in allowing disabling schema updates altogether, e.g. by providing fallbackPollIntervalInMs < 0. This would be handy for our experiments, but might not be as useful for majority of users. with a workaround of providing a very large value instead.
#1564 introduced
fallbackPollIntervalInMs
configuration property to allow customization of schema updates polling period.UplinkSupergraphManager
validates this value and sets a floor value of 10 seconds to prevent unnecessary load of Uplink API.However, initial value of
pollIntervalMs
can be overridden bySupergraphSdlUpdate
response data, particularly these lines (https://github.com/apollographql/federation/blob/main/gateway-js/src/supergraphManagers/UplinkSupergraphManager/index.ts#L230):So far it looks like
minDelaySeconds
is always set to be 30 seconds. This behavior prevents us to define a larger update window, and probably is a simple oversight.We suggest updating lines in question to:
This way we can define larger update windows, while still respecting semantics of
minDelaySeconds
.Additionally, I wonder if Apollo team sees value in allowing disabling schema updates altogether, e.g. by providing
fallbackPollIntervalInMs < 0
. This would be handy for our experiments, but might not be as useful for majority of users. with a workaround of providing a very large value instead.One important note: because
setTimeout
is used to schedule polling requests, it might be useful to document thatfallbackPollIntervalInMs
must not exceed value of 2,147,483,647 ms (about 24.8 days): https://developer.mozilla.org/en-US/docs/Web/API/setTimeout#maximum_delay_valueThe text was updated successfully, but these errors were encountered: