-
Notifications
You must be signed in to change notification settings - Fork 2
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
HP-894: Apollo client update #223
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #223 +/- ##
===========================================
+ Coverage 76.38% 76.55% +0.16%
===========================================
Files 121 121
Lines 2181 2188 +7
Branches 484 483 -1
===========================================
+ Hits 1666 1675 +9
+ Misses 386 385 -1
+ Partials 129 128 -1
Continue to review full report at Codecov.
|
Apollo converts props in headers into lowercase, so tests started to fail. Fixed the failing test and also changed the property name in middleware to avoid confusion.
Since Apollo converts the property to "authorization", same should be used everywhere to avoid confusion. Header properties are case-insensitive in the http spec.
3253f95
to
2918602
Compare
The "useEffect"-hook calls the "onError" when error is present and object changes. After the Apollo client update, the error object is not the same object anymore, it changes on each render. If error is found, "onError" is called on each render, because useEffect is triggered Ref to the error object is now stored and cleared when "fetch" or "refetch" is called.
New kind of warning started to show up after Apollo client update: https://fb.me/setstate-in-render Child components caused parent component to re-render while parent was still rendering. Moved the triggering functions inside "useEffect" to delay them until rendering is done.
2918602
to
33fa0ed
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
The update caused few minor issues: