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

Null access fix #1234

Closed tauu closed 1 year ago

tauu commented 2 years ago

This PR fixes a null access error in query manager. If query.latestResult is null, _cachedDataHasChangedFor will cause an error. This is easily fixes by checking that query.latestResult is not null.

vincenzopalazzo commented 2 years ago

You have the git history wrong! This commit https://github.com/zino-hofmann/graphql-flutter/pull/1234/commits/94566b922a5fac78fc9394a673d904d3fc05d3c3 is mine and committed more than 6 month ago

codecov[bot] commented 2 years ago

Codecov Report

Merging #1234 (e2dea87) into main (0a0afb3) will increase coverage by 0.02%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1234      +/-   ##
==========================================
+ Coverage   59.29%   59.32%   +0.02%     
==========================================
  Files          41       41              
  Lines        1683     1684       +1     
==========================================
+ Hits          998      999       +1     
  Misses        685      685              
Impacted Files Coverage Δ
packages/graphql/lib/src/core/query_manager.dart 76.35% <100.00%> (+0.16%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

tauu commented 2 years ago

Ups sorry! I missed the renaming of master to main, and rebased the patch onto main afterwards. Git must have picked up the commit during the rebase. The history has been cleaned now. :-)