-
Notifications
You must be signed in to change notification settings - Fork 20
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
fix: ensure useSubscriptions and useEnterpriseCourseEnrollments uses queryOptions.select from args #1235
Conversation
if (select) { | ||
return select({ | ||
original: data, | ||
transformed: transformedData, | ||
}); | ||
} |
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.
This is the primary fix for the bug ticket.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1235 +/- ##
==========================================
+ Coverage 89.03% 89.05% +0.02%
==========================================
Files 401 401
Lines 8670 8708 +38
Branches 2116 2123 +7
==========================================
+ Hits 7719 7755 +36
- Misses 909 911 +2
Partials 42 42 ☔ View full report in Codecov by Sentry. |
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.
Looks great. Nice job tackling the REVERSED
state as well 👍🏽
https://2u-internal.atlassian.net/browse/ENT-9857
In both
useSubscriptions
anduseEnterpriseCourseEnrollments
, this PR ensures any optionalqueryOptions.select
functions passed in follow the established convention of being called with an object containing the following:This pattern ensures any custom
select
functions passed to the helper query hooks (e.g.,useSubscriptions
) are given a choice of using the original query data or transformed query data from the parent hook.For all changes
Only if submitting a visual change