I’m using the following mutation (2024-07 GraphQL API):
mutation CreateProduct($input: ProductInput!) {
productCreate(input: $input) {
product {
id
}
userErrors {
message
field
}
}
}
with the following parameters definition:
{
"input": {
"title": "Example product"
}
}
And I get the following response:
[
{
"message": "Variable $input of type ProductInput! was provided invalid value",
"locations": [
{
"line": 1,
"column": 33
}
],
"extensions": {
"value": null,
"problems": [
{
"path": [],
"explanation": "Expected value to not be null"
}
]
}
}
]
I really don’t understand what I’m doing wrong… I’m pretty new to GraphQL, but this seemed pretty straightforward.
Any help would be greatly appreciated!