-
Notifications
You must be signed in to change notification settings - Fork 24
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
chore: Migrate useOwner to ts #3601
base: main
Are you sure you want to change the base?
Conversation
Bundle ReportChanges will increase total bundle size by 707 bytes (0.0%) ⬆️. This is within the configured threshold ✅ Detailed changes
|
Bundle ReportChanges will increase total bundle size by 707 bytes (0.0%) ⬆️. This is within the configured threshold ✅ Detailed changes
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #3601 +/- ##
=======================================
Coverage 99.00% 99.00%
=======================================
Files 810 810
Lines 14557 14562 +5
Branches 4146 4140 -6
=======================================
+ Hits 14412 14417 +5
Misses 138 138
Partials 7 7
Continue to review full report in Codecov by Sentry.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #3601 +/- ##
=======================================
Coverage 99.00% 99.00%
=======================================
Files 810 810
Lines 14557 14562 +5
Branches 4139 4140 +1
=======================================
+ Hits 14412 14417 +5
Misses 138 138
Partials 7 7
Continue to review full report in Codecov by Sentry.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #3601 +/- ##
=======================================
Coverage 99.00% 99.00%
=======================================
Files 810 810
Lines 14557 14562 +5
Branches 4146 4140 -6
=======================================
+ Hits 14412 14417 +5
Misses 138 138
Partials 7 7
Continue to review full report in Codecov by Sentry.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #3601 +/- ##
=======================================
Coverage 99.00% 99.00%
=======================================
Files 810 810
Lines 14557 14562 +5
Branches 4139 4140 +1
=======================================
+ Hits 14412 14417 +5
Misses 138 138
Partials 7 7
Continue to review full report in Codecov by Sentry.
|
✅ Deploy preview for gazebo ready!Previews expire after 1 month automatically.
|
Migrate useOwner hook to ts, including adding zod schema validation.
Note based on a spot-check, I assumed the api for the useOwner (DetailOwner) graphQL schema declared here to be unreliable, so marked all fields here as nullish (can be null or undefined).
In theory if the schema were correct, we would expect below:
But going through the tests and also the implementation of the owner fields,
avatarUrl
andusername
were missing (only present on theUser
schema, not theOwner
schema). Also some of the fields didn't look nullable based on the api implementation but were treated as nullable downstream in frontend code.In general, since the owner related fields are sensitive (can be the difference between whole pages of the app rendering or not), I left it to be looser in what we consider a schema failure in this TS conversion ticket. I spun off this ticket for later to make any necessary logical changes in
api
to make this zod schema stricter.Closes codecov/engineering-team#2858