Tag: flutter-hive
-
Flutter graphql using cache with hive, when calling query with police ‘cacheAndNetwork’ it always uses the network without the cache
2 Flutter graphql using cache with hive, when calling query with police ‘cacheAndNetwork’ it always uses the network without the cache Here is caple of my code Future<QueryResult> query(String query, {Map<String, dynamic> variables}) async { QueryOptions options = QueryOptions( document: gql(query), variables: variables, fetchPolicy: FetchPolicy.cacheAndNetwork, errorPolicy: ErrorPolicy.none, cacheRereadPolicy: CacheRereadPolicy.mergeOptimistic, ); final result = await _client.query(options);…