Discuss all the new features introduced with the new product model in GraphQL.
Hi,
I am getting an error message that say 'The product_type field can't be used together with custom_product_type or standard_product_type.' when I run a productCreate mutation in 2024-07, but I have no ideas why this is happening. Would appreciate any insights on the cause.
GraphQL scripts are followed.
mutation productCreate($input: ProductInput!) {
result: productCreate(input: $input) {
item: product {
id
}
userErrors {
field
message
}
}
}
variables": {
"input": {
"descriptionHtml": "<div style=\"font-size:200%;\">HTML description</div>",
"handle": "html-test-description-08-26",
"productOptions": [{"name":"Default Title", "position":1, "values": [{"name": "Default Title"}]}],
"productType": "SHIRT",
"status": "DRAFT",
"title": "Html Description",
"vendor": "Nike"
}
}
Thanks
Hi Ray,
Are you only seeing this issue with that specific API version?
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Hi Liam,
This is a new implementation on GraphQL API. We currently use REST API (2024-01) for product creation.