zino-hofmann / graphql-flutter

A GraphQL client for Flutter, bringing all the features from a modern GraphQL client to one easy to use package.
https://zino-hofmann.github.io/graphql-flutter
MIT License
3.25k stars 620 forks source link

fix: Hive integration #1093

Closed budde377 closed 2 years ago

budde377 commented 2 years ago

This PR fixes #1091. The underlying issue is that Hive doesn't work well with generics. By not assuming that the box will be Box<Map<String, dynamic>?>, but rather Box<Map<dynamic, dynamic>?> and handling conversion appropriately, we can prevent the bugs reported.

codecov[bot] commented 2 years ago

Codecov Report

Merging #1093 (a8726cb) into main (ebc96e7) will not change coverage. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1093   +/-   ##
=======================================
  Coverage   60.01%   60.01%           
=======================================
  Files          41       41           
  Lines        1528     1528           
=======================================
  Hits          917      917           
  Misses        611      611           
Impacted Files Coverage Δ
packages/graphql/lib/src/cache/hive_store.dart 94.73% <100.00%> (ø)
packages/graphql/lib/src/cache/store.dart 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ebc96e7...a8726cb. Read the comment docs.