-
Notifications
You must be signed in to change notification settings - Fork 388
Conversation
I have signed the CLA! |
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 looks good to me! We should probably copy-paste this method to the other API versions as well so it's available for everyone.
I wonder if it's worth copying one of the tests for the all
method just to ensure we don't have regressions.
Hey @paulomarg, I completely agree with you. I'll add the test and the same api to other versions asap |
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! If you can please add a changeset (yarn changeset
at the project root), I'll merge this :)
Hey, I took the liberty of tweaking the changeset since this is a minor and not a major version change (we're not changing any existing APIs). Thanks again for contributing, I'll be merging as soon as CI passes :) |
Shop.all()
returns the complete response #1300Changelog
This PR adds the new method
Shop.current()
that behaves the same asShop.all()
with the exception of unwrapping the response to return only thedata[0]
object like the methodCustomer.find()
.