I used the interface in the following document to test the product's operations creation function, but why do I always make mistakes. I am using case code. document url:
https://shopify.dev/docs/api/admin-graphql/2024-04/mutations/productOptionsCreate?language=cURL errors: stdClass Object ( [errors] => Array ( [0] => stdClass Object ( [message] => OptionCreateInput isn't a defined input type (on $options) [locations] => Array ( [0] => stdClass Object ( [line] => 1 [column] => 41 ) ) [path] => Array ( [0] => mutation createOptions ) [extensions] => stdClass Object ( [code] => variableRequiresValidType [typeName] => OptionCreateInput [variableName] => options ) ) [1] => stdClass Object ( [message] => Field 'productOptionsCreate' doesn't exist on type 'Mutation' [locations] => Array ( [0] => stdClass Object ( [line] => 1 [column] => 76 ) ) [path] => Array ( [0] => mutation createOptions [1] => productOptionsCreate ) [extensions] => stdClass Object ( [code] => undefinedField [typeName] => Mutation [fieldName] => productOptionsCreate ) ) [2] => stdClass Object ( [message] => Variable $productId is declared by createOptions but not used [locations] => Array ( [0] => stdClass Object ( [line] => 1 [column] => 1 ) ) [path] => Array ( [0] => mutation createOptions ) [extensions] => stdClass Object ( [code] => variableNotUsed [variableName] => productId ) ) [3] => stdClass Object ( [message] => Variable $options is declared by createOptions but not used [locations] => Array ( [0] => stdClass Object ( [line] => 1 [column] => 1 ) ) [path] => Array ( [0] => mutation createOptions ) [extensions] => stdClass Object ( [code] => variableNotUsed [variableName] => options ) ) ) ) postdata: { "query": "mutation createOptions($productId: ID!, $options: [OptionCreateInput!]!) { productOptionsCreate(productId: $productId, options: $options) { userErrors { field message code } product { id variants(first: 5) { nodes { id title selectedOptions { name value } } } options { id name values position optionValues { id name hasVariants } } } } }", "variables": { "productId": "gid://shopify/Product/7898713718984", "options": [ { "name": "Color", "values": [ { "name": "Blue" }, { "name": "Red" } ] }, { "name": "Size", "values": [ { "name": "Small" }, { "name": "Medium" } ] } ] } }