Shopify / shopify-api-js

Shopify Admin API Library for Node. Accelerate development with support for authentication, graphql proxy, webhooks
MIT License
944 stars 390 forks source link

feat: add Shop.current method #1318

Closed nullndr closed 7 months ago

nullndr commented 7 months ago

Changelog

This PR adds the new method Shop.current() that behaves the same as Shop.all() with the exception of unwrapping the response to return only the data[0] object like the method Customer.find().

nullndr commented 7 months ago

I have signed the CLA!

nullndr commented 7 months ago

Hey @paulomarg, I completely agree with you. I'll add the test and the same api to other versions asap

paulomarg commented 7 months ago

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 :)