QueryClient constructor

QueryClient({
  1. QueryCache? cache,
  2. Duration cacheDuration = DefaultConstants.cacheDuration,
  3. int? maxRetries,
  4. Duration? retryDelay,
  5. Duration? staleDuration,
  6. Duration? refreshInterval,
  7. bool? refreshOnMount,
  8. bool? refreshOnQueryFnChange,
})

Implementation

QueryClient({
  QueryCache? cache,
  this.cacheDuration = DefaultConstants.cacheDuration,
  int? maxRetries,
  Duration? retryDelay,
  Duration? staleDuration,
  Duration? refreshInterval,
  bool? refreshOnMount,
  bool? refreshOnQueryFnChange,
})  : this.cache = cache ?? QueryCache(cacheDuration: cacheDuration),
      this.retryConfig = DefaultConstants.retryConfig.copyWith(
        maxRetries: maxRetries,
        retryDelay: retryDelay,
      ),
      this.refreshConfig = DefaultConstants.refreshConfig.copyWith(
        staleDuration: staleDuration,
        refreshInterval: refreshInterval,
        refreshOnMount: refreshOnMount,
        refreshOnQueryFnChange: refreshOnQueryFnChange,
      );