I am currently setting the product category on productCreate using the category GID (ex. snowboard is: gid://shopify/TaxonomyCategory/sg-4-17-2-17). I would like to use the Shopify Taxonomy ID instead (5173 in this case). I can’t figure how to specify this in GraphQL. Any ideas? Here is the working mutation with the GID:
# GraphQL mutation for creating a product
mutation = '''
mutation CreateProduct($input: ProductInput!) {
productCreate(input: $input) {
product {
id
title
vendor
descriptionHtml
productType
tags
category {
id
}
}
userErrors {
field
message
}
}
}
'''
# Variables for the mutation
variables = {
"input": {
"title": "Café Racer",
"vendor": "Korua",
"descriptionHtml": "A Fantastic Snowboard",
"productType": "Snowboard",
"tags": ["winter", "2025"],
"category": "gid://shopify/TaxonomyCategory/sg-4-17-2-17"
}
}


