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

REST API being deprecated in April '25? #668

Open
warwickprice opened this issue Dec 7, 2024 · 1 comment
Open

REST API being deprecated in April '25? #668

warwickprice opened this issue Dec 7, 2024 · 1 comment

Comments

@warwickprice
Copy link

Less of an issue... more of a question....

Been using your shopify package for a few years and it's made my life so much easier! I obviously use the shopify dev site to lookup info on the API endpoints themselves and noticed the other day a message saying that the REST API will be deprecated in April '25 and that everyone should be using the Graph QL API end points. Started freaking out and double checked your page and see that you can already ".query" to use the Graph QL APIs. So, my question is... if I start switching my code over to use the .query rather than the regular shopify.product, shopify.order, etc.... is that all I need to do to be compliant and still having everything work for me after the deprecation of REST APIs.

Thanks!!

@ikudosi
Copy link
Contributor

ikudosi commented Dec 7, 2024

@warwickprice wouldn't it be .graphql? If you're using that function (per their guide), you would be hitting Shopify's GraphQL API instead of the deprecated REST.

`
const shopify = new Shopify({
shopName: 'your-shop-name',
accessToken: 'your-oauth-token'
});

const query = { customers(first: 5) { edges { node { displayName totalSpent } } } };

shopify
.graphql(query)
.then((customers) => console.log(customers))
.catch((err) => console.error(err));
`

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

No branches or pull requests

2 participants