Deprecating REST API

Deprecating REST API

Snodgers
Shopify Partner
25 1 19

I'm not sure I can find a clear answer on this. Is Shopify completely deprecating the REST API next year?

 

Obviously, I understand that they don't want to maintain both REST and GraphQL. However, REST has been around longer and is significantly more popular than GraphQL. GraphQL also has several issues, including:

 

  • Security — GraphQL exposes public APIs to exfiltration, tampering and denial-of-service from bad actors.
  • Performance — GraphQL exposes all APIs to bad performance even from friendly actors.
  • Complexity — GraphQL exposes developers – especially backend developers – to enormous complexity.

For simple queries, I don't see the advantage of GraphQL. Do most Shopify developers need really advanced queries?

 

Replies 19 (19)

LetterT
Shopify Partner
53 5 19

@Snodgers wrote:

I'm not sure I can find a clear answer on this. Is Shopify completely deprecating the REST API next year?

 

 


Not sure about completely, but it has a wide ranging effect 😭

 

All public apps that are built on existing GraphQL product APIs or REST product APIs must migrate to the new GraphQL product APIs by February 1, 2025.

https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model

 

 

 

Don't be shy, click that like button!
Snodgers
Shopify Partner
25 1 19

Yes and custom apps must migrate by April 1, 2025.

Also, the documentation says this:

 

Developers should expect that the GraphQL API will be the only supported API over the long term and will be made aware of these timelines as they become available.

 

Why won't Shopify be open about this? They are clearly removing the REST API and have no intention of supporting it.

 

I would like a straightforward answer.

hattmall
Tourist
5 0 6

Custom applications that do not need more than 100 variants don't need to migrate to GraphQL in April 2025. Needless complexity of GraphQL wille end many popular public apps. GraphQL creates far more problems than it solves for most scenarios and is already falling out of favor in many companies. Shopify is not likely to harm so many of their merchants by fully ending REST support. Shopify may do what some others have done and maintain REST wrappers of their GraphQL API, which is what developers have to do anyway. If they don't expect a 3rd party tool to fill this gap quickly.

LeeHiles
Shopify Partner
1 0 1

For anyone that comes across this thread in the future:

 

As of October 1, 2024, the entire REST admin API is now marked as deprecated.  Shopify has stated that all apps should be migrated to GraphQL.  

AlexVanLan
Shopify Partner
2 0 1

Discovered tonight while trying to upload a customer list from our prod store to a dev storefront that create customer now can only be done through the GraphQL api. I gotta go into work tomorrow and explain to everyone that the entire integration system we built is about to completely **bleep** the bed.  Thanks, Shopify. 

etrolmos
Shopify Partner
27 1 5

Are you saying you have a custom/private app already connected to an existing dev store that uses the Customer REST API, and it suddenly stopped working? What error message does it say and which API version is it using?

the_continuous
Visitor
1 0 0

I am sending POST to REST API and am getting an error, as of the 1st. Testing now to confirm but this seems to be the only reasonable explanation. I guess they decided to terminate support suddenly for no apparent reason.

hattmall
Tourist
5 0 6

Which Version and which API of the REST are you using?  I'm not getting any errors 2024-01. They have never said it would be turned off, just that new features wouldn't be added and Public Apps should migrate. GraphQL is incredibly cumbersome and error prone.  It can support more advanced functionality but 99.9% of stores have no such requirements.

hattmall
Tourist
5 0 6

To add further information:

 

By April 1 2025, all new apps will default to GraphQL. Organizations created after this date will only be permitted to use GraphQL for their custom apps. All new public apps submitted to the App Store after this date must only use GraphQL.

There are no changes for existing apps, which can continue to use the Admin REST API. Migration timelines will be announced in 2025*, and ample time will be provided for the transition. 

 

That's from: https://www.shopify.com/ca/partners/blog/all-in-on-graphql

 

On that page Shopify is really trying to sell GraphQL which is ironic as most major organizations are moving AWAY from GraphQL. It sounds good to management but developers know it combines the worst features of the environments it try to merge.   

 

A type based, scheme defined, query language as an API!?!? Exposing the database to the web? Shopify data is not nearly complex enough to benefit from the concepts of graphs, maybe 1% of stores. Maybe. And even still that should be purely on the backend. Really defeats the concept of an API.

 

Perhaps Shopify is big enough to pull it off and not enough stores rely on advanced usages. It's incredibly user hostile.

etrolmos
Shopify Partner
27 1 5

I'm curious as to what you find, but it's probably your app was auto-upgraded to 2024-01 API and your app was specifying something that's been removed. Eg., on the Customer & Order resources these fields were removed: accepts_marketing, accepts_marketing_updated_at, marketing_opt_in_level

 

I suggest monitoring the X-Shopify-API-Deprecated-Reason response header and/or the Deprecated API Calls report endpoint to catch these possible issues.

friendoftheroot
Shopify Partner
55 5 8

Having a lot of code reliant both on REST API and GraphQL, we need some clarifications that this thread has not provided until now.

Keeping the REST API for existing customers seems like a soft rug:

"By April 1 2025, all new apps will default to GraphQL. Organizations created after this date will only be permitted to use GraphQL for their custom apps. All new public apps submitted to the App Store after this date must only use GraphQL.

There are no changes for existing apps, which can continue to use the Admin REST API. Migration timelines will be announced in 2025*, and ample time will be provided for the transition."
Source: https://shopify.dev/changelog/starting-april-2025-new-public-apps-submitted-to-shopify-app-store-mus...

Custom apps seem to be fine..

  • Public apps must migrate to supported GraphQL APIs by February 2025
  • Custom apps must migrate if they're integrated with stores that plan to have products with more than 100 variants. The REST API won't return more than 100 variants for each product and won't write to products with more than 100 variants.

Source: https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model

BUT ceasing of calls involving products and variations by February 2025, with deprecation announcement in October 2024 is a very hostile hard rug:
"Use the GraphQL going forward. The product and variant objects will cease to work on on Feb 1, 2025 due to the changes being made by Shopify. Shopify will phase out the REST API completely over time, you can read more about this here."
Source: https://learn.mechanic.dev/resources/converting-tasks-from-shopify-rest-to-graphql

 

Cheers

Gramatica_D
Shopify Partner
10 1 1

Hi and thanks a lot for your clarification. 

I'm working on a dev store right now and I'm doing REST API tests over a private app (is that a custom app?). 
Are you saying only public apps are affected by the REST API deprecation or also private apps, but later in 2025? Do you think it is safe to still use REST API? We do not have product variants. We use products, customers, addresses, metafields and orders only.
Thanks a lot

hattmall
Tourist
5 0 6

That announcement isn't from Shopify. Mechanic.dev appears to be a 3rd party public app. That information doesn't seem relevant to custom apps created directly with Shopify.

Gramatica_D
Shopify Partner
10 1 1

Hi Hattmall

Thanks for your response. Are you saying that the deprication of REST API does not affect custom apps?

hattmall
Tourist
5 0 6

Not from what I have seen officially communicated by Shopify. All I see is that if you are using more than 100 variants it would not work properly with REST. It does appear that they have indicated the REST will at some point be completely shutdown, but that has not been announced. New stores created at some point in the near future will stop having access to the REST API for their custom Apps. 

 

I am optimistic Shopify would not turn off the REST for existing stores anytime remotely soon, if ever. There are companies that have invested heavily in building their custom apps to manage very large businesses. Forcing them to pay tens of thousands of dollars to rebuild fully functional apps seems terrible. Especially in light of the idea of moving towards GraphQL which is a declining or at best stagnating technology. In fact Shopify pushing GraphQL has been one of the few things to reverse the trend of its decline from the 2018 usage peak. REST remains the leading technology by a huge margin.

Gramatica_D
Shopify Partner
10 1 1

Thank you for your valuable assessment. That reassures me a lot.

Deluxe
Shopify Partner
8 0 6

All I see is that if you are using more than 100 variants it would not work properly with REST

What does that mean? 100 Variations per product or in general?!

friendoftheroot
Shopify Partner
55 5 8

100 variants per product. Especially with 3 attributes it can become an issue easily

Imagine you have a product with three options:

  1. Size (Small, Medium, Large, Extra Large) — 4 choices
  2. Color (Red, Blue, Green, Black, White) — 5 choices
  3. Material (Cotton, Wool, Silk, Linen, Polyester) — 5 choices

Each specific combination of Size + Color + Material is one unique variant. For example, Medium + Blue + Wool is one variant, while Large + Red + Cotton is another variant.

  • If you multiply the number of choices (4 sizes × 5 colors × 5 materials), you get 4 × 5 × 5 = 100.

Because Shopify limits you to 100 variants per product, the example above exactly hits that maximum. If you tried to add a sixth color (for instance), you would have 4 × 6 × 5 = 120 possible variants, which is beyond the 100-variant limit that Shopify allows.

friendoftheroot
Shopify Partner
55 5 8

Yes, I hope they will keep it for some years. 
Mechanic.dev is a 3rd party public app that is correct. I had the impression that partners usually get some preview infos.

However, Shopify is usually not afraid of breaking changes eg. with API versions,

Also we are writing here on a deprecated forum and the new forum lacks a official answer for this problem:
https://community.shopify.dev/t/is-migration-to-graphql-mandatory-for-existing-apps-using-rest-api/2...