Since today, we have been receiving a deprecation warning for the 2025-01 GraphQL endpoint. Since we haven’t made any changes to the code, the issue must stem from a change on Shopify’s side. Unfortunately, I couldn’t find anything relevant in the changelog. Additionally, the error message from Shopify isn’t helpful at all— all I know is that it relates to a ProductSet mutation query.
Message and Context from the PHP Client / Response: (The deprecation is indicated from the api, trough the X_SHOPIFY_API_DEPRECATED_REASON Header)
API Deprecation notice
[url] => https://<MYTESTSTORE>.myshopify.com/admin/api/2025-01/graphql.json
[reason] => https://shopify.dev/api/usage/versioning#deprecation-practices
the mutation:
mutation createProductAsynchronous($entity1: ProductSetInput!, $synchronous: Boolean!) {
entity1: productSet(synchronous: $synchronous, input: $entity1) {
product {
id
}
userErrors {
code
field
message
}
}
}
the example payload:
{
"entity1": {
"title": "Random Product Title #1 (Updated)",
"handle": "product-random-handle-12345",
"descriptionHtml": "Lorem Ipsum Dolor Sit Amet Consectetur",
"vendor": "Generic Vendor",
"productType": "Snowboard",
"files": [
{
"originalSource": "https://some-random-domain.com/support-teaser.png",
"contentType": "IMAGE"
}
],
"variants": [
{
"optionValues": [
{
"optionName": "Color",
"name": "Blue"
},
{
"optionName": "Size",
"name": "XL"
}
],
"inventoryItem": {
"measurement": {
"weight": {
"unit": "KILOGRAMS",
"value": 1
}
}
}
},
{
"optionValues": [
{
"optionName": "Color",
"name": "Red"
},
{
"optionName": "Size",
"name": "XXL"
}
],
"inventoryItem": {
"measurement": {
"weight": {
"unit": "KILOGRAMS",
"value": 2
}
}
}
}
],
"productOptions": [
{
"name": "Color",
"position": 1,
"values": [
{ "name": "Blue" },
{ "name": "Red" }
]
},
{
"name": "Size",
"position": 2,
"values": [
{ "name": "XL" },
{ "name": "XXL" }
]
}
],
"id": "gid://shopify/Product/9876543210"
},
"synchronous": true
}
Any hint into the right direction?