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.23k stars 613 forks source link

feat: Cache parsed data #1343

Closed budde377 closed 1 year ago

budde377 commented 1 year ago

This change caches the parsed data for performance. The getter-setter variant ensures that we don't need to change the API and never needs to check equality of the provided data.

Fixes #1342

codecov[bot] commented 1 year ago

Codecov Report

Merging #1343 (dfd93a9) into main (0953e94) will increase coverage by 0.15%. The diff coverage is 100.00%.

:exclamation: Current head dfd93a9 differs from pull request most recent head aa81251. Consider uploading reports for the commit aa81251 to get more accurate results

@@            Coverage Diff             @@
##             main    #1343      +/-   ##
==========================================
+ Coverage   63.52%   63.67%   +0.15%     
==========================================
  Files          41       41              
  Lines        1689     1696       +7     
==========================================
+ Hits         1073     1080       +7     
  Misses        616      616              
Impacted Files Coverage Δ
packages/graphql/lib/src/core/query_result.dart 57.14% <100.00%> (+8.57%) :arrow_up: