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 621 forks source link

feat: Update options #1037

Closed budde377 closed 2 years ago

budde377 commented 2 years ago

This PR improves equality checks on options by making options immutable and supports the operator==. This is used to decide if the queries should be re-fetched.

The PR contains:

codecov[bot] commented 2 years ago

Codecov Report

Merging #1037 (8aaf9d6) into beta (05ca62a) will increase coverage by 1.16%. The diff coverage is 49.31%.

:exclamation: Current head 8aaf9d6 differs from pull request most recent head 3af3454. Consider uploading reports for the commit 3af3454 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             beta    #1037      +/-   ##
==========================================
+ Coverage   51.25%   52.42%   +1.16%     
==========================================
  Files          36       35       -1     
  Lines        1389     1505     +116     
==========================================
+ Hits          712      789      +77     
- Misses        677      716      +39     
Impacted Files Coverage Δ
...ackages/graphql/lib/src/core/observable_query.dart 40.32% <0.00%> (-0.67%) :arrow_down:
packages/graphql/lib/src/core/query_manager.dart 66.87% <0.00%> (ø)
packages/graphql/lib/src/core/query_options.dart 39.28% <44.94%> (+13.83%) :arrow_up:
...ackages/graphql/lib/src/core/mutation_options.dart 40.98% <48.27%> (+7.65%) :arrow_up:
packages/graphql/lib/src/graphql_client.dart 74.28% <88.88%> (+1.31%) :arrow_up:
packages/graphql/lib/src/core/_base_options.dart 87.50% <90.90%> (+29.43%) :arrow_up:
packages/graphql/lib/src/core/policies.dart 57.81% <0.00%> (+10.93%) :arrow_up:

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 405e8bd...3af3454. Read the comment docs.