Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Result Context, watchMutation, CacheRereadPolicy #795

Merged
merged 11 commits into from
Jan 24, 2021

Conversation

micimize
Copy link
Collaborator

@micimize micimize commented Jan 20, 2021

Closes #793
Closes #774

Breaking changes

  • Broke default Mutation behavior, which can be regained by overriding DefaultPolicies.watchMutation.

Fixes / Enhancements

watchMutation default policies are the same as mutation:

Policies(FetchPolicy.networkOnly, ErrorPolicy.none, CacheRereadPolicy.ignoreAll)

the old behavior can be regained via

Policies(FetchPolicy.cacheAndNetwork, ErrorPolicy.none, CacheRereadPolicy.mergeOptimistic)

Docs

  • Added docs on CacheRereadPolicy and watchMutation

@codecov
Copy link

codecov bot commented Jan 20, 2021

Codecov Report

Merging #795 (6e9ae85) into beta (8e4e7d9) will increase coverage by 0.22%.
The diff coverage is 50.98%.

Impacted file tree graph

@@            Coverage Diff             @@
##             beta     #795      +/-   ##
==========================================
+ Coverage   49.52%   49.74%   +0.22%     
==========================================
  Files          35       35              
  Lines        1357     1389      +32     
==========================================
+ Hits          672      691      +19     
- Misses        685      698      +13     
Flag Coverage Δ
graphql_client 53.01% <54.16%> (+0.22%) ⬆️
graphql_flutter 31.42% <0.00%> (-0.16%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ackages/graphql/lib/src/core/mutation_options.dart 29.72% <ø> (ø)
packages/graphql/lib/src/core/query_options.dart 25.45% <0.00%> (-0.97%) ⬇️
packages/graphql/lib/src/core/query_result.dart 45.94% <0.00%> (-1.28%) ⬇️
packages/graphql/lib/src/graphql_client.dart 74.35% <0.00%> (-8.50%) ⬇️
...ages/graphql_flutter/lib/src/widgets/mutation.dart 0.00% <0.00%> (ø)
packages/graphql/lib/src/core/_base_options.dart 60.00% <50.00%> (-2.07%) ⬇️
packages/graphql/lib/src/core/policies.dart 53.24% <52.17%> (+4.06%) ⬆️
packages/graphql/lib/src/core/query_manager.dart 68.08% <77.77%> (+1.90%) ⬆️
...es/graphql/lib/src/core/_query_write_handling.dart 65.38% <100.00%> (+1.38%) ⬆️
...ackages/graphql/lib/src/core/observable_query.dart 45.31% <100.00%> (+0.43%) ⬆️
... and 1 more

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 8e4e7d9...a2292ed. Read the comment docs.

@HofmannZ
Copy link
Member

🎉 This PR is included in version 4.0.0-beta.7 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@HofmannZ
Copy link
Member

🎉 This PR is included in version 4.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants