We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QueryOptions describes pollInterval as:
QueryOptions
pollInterval
/// The time interval (in milliseconds) on which this query should be /// re-fetched from the server. int pollInterval;
However, looking into QueryScheduler, it is used as seconds.
QueryScheduler
void startPollingQuery( WatchQueryOptions options, String queryId, ) { assert(options.pollInterval != null && options.pollInterval > 0); registeredQueries[queryId] = options; final Duration interval = Duration( seconds: options.pollInterval, ); if (intervalQueries.containsKey(interval)) { intervalQueries[interval].add(queryId); } else { intervalQueries[interval] = <String>[queryId]; _pollingTimers[interval] = Timer.periodic( interval, (Timer timer) => fetchQueriesOnInterval(timer, interval), ); } }
On package version 3.0.0.
The text was updated successfully, but these errors were encountered:
Would like to suggest changing pollInterval to be a Duration instead.
Duration
Sorry, something went wrong.
Hello, I agree! It says pollinterval is in milliseconds here: https://github.com/zino-app/graphql-flutter/blob/master/packages/graphql/lib/src/core/query_options.dart#L129
milliseconds
but it's in seconds: https://github.com/zino-app/graphql-flutter/blob/master/packages/graphql/lib/src/scheduler/scheduler.dart#L44
seconds
I tried 1000 and waited forever :)
I'm quite busy right now, but I'd like to send a PR if I have time in a few days.
closed in 4.0.0-beta.1 #648
4.0.0-beta.1
No branches or pull requests
QueryOptions
describespollInterval
as:However, looking into
QueryScheduler
, it is used as seconds.On package version 3.0.0.
The text was updated successfully, but these errors were encountered: