Skip to content
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

Feature: add meta on get hooks #38

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Feature: add meta on get hooks #38

wants to merge 7 commits into from

Conversation

JuraJuki
Copy link
Contributor

@JuraJuki JuraJuki requested a review from renatoruk August 25, 2020 06:04
@JuraJuki JuraJuki changed the base branch from master to feat/pass-headers August 25, 2020 06:09
Copy link
Contributor

@renatoruk renatoruk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good, it will be a helpful addition!

Some things to keep in mind:

  • these would be awesome to cover with
  • there is a change some of these getOperationMeta calls are incomplete as they're missing id and request method (I think the compiler does not warn about it because they're optional)

Base automatically changed from feat/pass-headers to master September 8, 2020 21:02
@JuraJuki
Copy link
Contributor Author

JuraJuki commented Sep 9, 2020

@renatoruk updated get tests with meta expects. Added additional params for getOperationMeta. If ID is passed at useGet or useGetControlled the meta returned is undefined.

Checked the checkboxes

@JuraJuki JuraJuki requested a review from renatoruk September 9, 2020 09:05
@renatoruk
Copy link
Contributor

@renatoruk updated get tests with meta expects. Added additional params for getOperationMeta. If ID is passed at useGet or useGetControlled the meta returned is undefined.

Checked the checkboxes

Looks good!

If ID is passed at useGet or useGetControlled the meta returned is undefined.
Not sure if this is expected behaviour or a bug?

@codecov
Copy link

codecov bot commented Sep 15, 2020

Codecov Report

Merging #38 into master will increase coverage by 0.16%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #38      +/-   ##
==========================================
+ Coverage   85.41%   85.57%   +0.16%     
==========================================
  Files          49       49              
  Lines        1049     1061      +12     
  Branches      161      161              
==========================================
+ Hits          896      908      +12     
  Misses        151      151              
  Partials        2        2              
Impacted Files Coverage Δ
src/hooks/useGet.ts 100.00% <100.00%> (ø)
src/hooks/useGetAll.ts 100.00% <100.00%> (ø)
src/hooks/useGetAllControlled.ts 92.85% <100.00%> (+0.85%) ⬆️
src/hooks/useGetControlled.ts 91.30% <100.00%> (+1.30%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0955069...43015c2. Read the comment docs.

@JuraJuki
Copy link
Contributor Author

@renatoruk updated get tests with meta expects. Added additional params for getOperationMeta. If ID is passed at useGet or useGetControlled the meta returned is undefined.
Checked the checkboxes

Looks good!

If ID is passed at useGet or useGetControlled the meta returned is undefined.
Not sure if this is expected behaviour or a bug?

It is a bug, it should return meta :C

@renatoruk
Copy link
Contributor

@renatoruk updated get tests with meta expects. Added additional params for getOperationMeta. If ID is passed at useGet or useGetControlled the meta returned is undefined.
Checked the checkboxes

Looks good!

If ID is passed at useGet or useGetControlled the meta returned is undefined.
Not sure if this is expected behaviour or a bug?

It is a bug, it should return meta :C

Did you have the time to work on this? As you said, it's prerequisite for #41

@JuraJuki
Copy link
Contributor Author

@renatoruk updated get tests with meta expects. Added additional params for getOperationMeta. If ID is passed at useGet or useGetControlled the meta returned is undefined.
Checked the checkboxes

Looks good!

If ID is passed at useGet or useGetControlled the meta returned is undefined.
Not sure if this is expected behaviour or a bug?

It is a bug, it should return meta :C

Did you have the time to work on this? As you said, it's prerequisite for #41

I did not sadly, should be having a couple of hours in the next few days so I will take a lot. Or perhaps you wish to take a look?

@renatoruk
Copy link
Contributor

renatoruk commented Oct 20, 2020

@renatoruk updated get tests with meta expects. Added additional params for getOperationMeta. If ID is passed at useGet or useGetControlled the meta returned is undefined.
Checked the checkboxes

Looks good!

If ID is passed at useGet or useGetControlled the meta returned is undefined.
Not sure if this is expected behaviour or a bug?

It is a bug, it should return meta :C

Did you have the time to work on this? As you said, it's prerequisite for #41

I did not sadly, should be having a couple of hours in the next few days so I will take a lot. Or perhaps you wish to take a look?

Can you make the tests actually fail (prepare them with the real expected result) so it's easier to debug on what is needed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants