-
Notifications
You must be signed in to change notification settings - Fork 58
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
Upgrade apollo and related packages #3304
Conversation
c713b64
to
d03af15
Compare
d03af15
to
c2aacd9
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Spent some time this morning digging into why 3.5.x is breaking our tests. Didn't get into a firm resolution but leaving findings here for posterity/in case it sparks anything for anyone. It looks like the failing tests are generally failing because the mocks we're using on the relevant components aren't finding enough defined mocks as passed into the Adding back in the specified mock in the error console (which in this case is just duplicating a mock that's already been defined) fixes the errors related to that issue. There are some notes in the 3.5.0 changelog that describes changes to the way Apollo is handling the cache (which tbh I don't really understand) that might be related? Potentially defining those mocks once in 3.4.x and reading subsequent ones from the apollo cache (if this is how this works) might have changed in 3.5.0 given the changes. I might be way off base here though since I don't really understand much about the interactions at play here between RTL/Apollo, and React/GraphQL Also worth noting that the above fixes/explanation only addresses some of the failures, so at best this is a half baked explanation 🙃 |
Great digging Bob! I had seen the missing mock messages as well, but I didn't see the notes about changes to cache handling... I will take another peek there and see if anything stands out. Thanks for looking into it!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Related Issue or Background Info
Changes Proposed
@apollo/client
to3.4.17
, the latest3.4.x
. The latest is3.5.8
, but upgrading to any3.5.x
broke our frontend unit tests, and I couldn't for the life of me figure out why. Changelogapollo-upload-client
to17.0.0
. Changelog@graphql-codegen
packages, all minor version upgrades. Also regenerated the output. Changeloggraphql
to16.3.0
. Lots of breaking changes, but none seem to affect us. ChangelogAdditional Information
Screenshots / Demos
Checklist for Author and Reviewer
Infrastructure
terraform-plan
job inside the "Terraform Checks" workflow run for this PR. Confirm that there are no unexpected changes!Design
test
,dev
, orpentest
and smoke-tested by both the engineering and design teamsContent
Support
Testing
Changes are Backwards Compatible
(including re-granting permission to the no-PHI user if need be)
./gradlew liquibaseRollbackSQL
orliquibaseRollback
Security
Cloud
test
,dev
, orpentest
environment for verification