Is it OK to use a deprecated field in the Storefront API so long as the API version is still valid?

christian_s_dev
Tourist
8 1 1

We recently updated the version we use in the GraphQL storefront API from "2021-10" to "2022-10" at the request of an e-mail that stated "One or more of your apps have made deprecated API calls in the last 14 days. Support for this version will be removed on January 31, 2023."

The e-mail also mentioned that these there were breaking changes that would affect our app:

  • As of 2022-10, the Money scalar is being removed from the Storefront API, and fields with V2 ({field}V2: MoneyV2) suffixes are being deprecated. Please check the changelog notes for full details of the change. View change.
  • Several previously deprecated fields have been removed from the Storefront API. Please check the release notes for a full list of changes. View change.

 

In response we've upgraded to "2022-10" version, but I see we're still using some fields that are present in the "2022-10" version but marked as "@deprecated", such as the compareAtPriceV2 field. 

 

So my question is: is it OK to use deprecated fields (such as the compareAtPriceV2 field) so long as the version of the API (2022-10) still has them present and working, or will these deprecated fields stop working on January 31st as stated in the e-mail?

Replies 2 (2)

casey-customs
Shopify Partner
143 13 23

When they depreciate something they make it unusable so yes you'll have to update your app accordingly eventually.

christian_s_dev
Tourist
8 1 1

Hi @casey-customs thanks for the response-- I understand the fields will be unusable eventually, but do you know if it's OK to use them so long as they still exist in the schema (and marked with @deprecated)? I'm wondering if Shopify removes deprecated fields in future version but maintains the functionality for supported versions that still have fields that are marked as deprecated