-
Notifications
You must be signed in to change notification settings - Fork 23
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
feat: Convert useInvoices from rest to GQL query #2920
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found @@ Coverage Diff @@
## main #2920 +/- ##
=======================================
Coverage 98.45% 98.45%
=======================================
Files 886 887 +1
Lines 13139 13177 +38
Branches 3507 3498 -9
=======================================
+ Hits 12936 12974 +38
Misses 199 199
Partials 4 4
... and 7 files with indirect coverage changes
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 #2920 +/- ##
=======================================
Coverage 98.45% 98.45%
=======================================
Files 886 887 +1
Lines 13139 13177 +38
Branches 3512 3498 -14
=======================================
+ Hits 12936 12974 +38
Misses 199 199
Partials 4 4
... and 7 files with indirect coverage changes
Continue to review full report in Codecov by Sentry.
|
Bundle ReportChanges will decrease total bundle size by 3.07kB ⬇️
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #2920 +/- ##
=======================================
Coverage 98.45% 98.45%
=======================================
Files 886 887 +1
Lines 13139 13177 +38
Branches 3442 3517 +75
=======================================
+ Hits 12936 12974 +38
Misses 199 199
Partials 4 4
... and 7 files with indirect coverage changes
Continue to review full report in Codecov by Sentry.
|
Bundle ReportChanges will decrease total bundle size by 3.07kB ⬇️
|
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 #2920 +/- ##
===========================================
Coverage 98.45000 98.45000
===========================================
Files 886 887 +1
Lines 13139 13177 +38
Branches 3507 3522 +15
===========================================
+ Hits 12936 12974 +38
Misses 199 199
Partials 4 4
... and 7 files with indirect coverage changes
Continue to review 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.
LGTM
currency: 'usd', | ||
customerAddress: null, | ||
customerName: 'Accounts Payable Codecov', | ||
customerEmail: '[email protected]', |
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.
Nice to meet you Bob ✋
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.
Just some quick tweaks to the schema and we're good to go
src/services/account/useInvoices.ts
Outdated
periodEnd: z.number().nullable(), | ||
periodStart: z.number().nullable(), | ||
status: z.string().nullable(), | ||
subtotal: z.number().nullable(), |
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.
not nullable
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.
Fixed in d3feda3!
Description
This PR aims to convert the useInvoices hook from calling the rest endpoint to the GQL query.
In the process of updating the tests, I've created a new mock invoice object which is the new "Source of Truth" for the invoice model. There were some deprecated fields that were removed in codecov/codecov-api#598 that I hope to remove from our other invoice mocks as the time comes.
Screenshots
Screenshots showing successful retrieval of the invoices locally with the updated hook
Link to Sample Entry
Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.