I use cURL, not a github library. I have a next code
$query = <<<GRAPHQL
mutation InventorySet(\$input: [InventorySetQuantitiesInput!]!)
{
inventorySetQuantities(input: \$input) {
inventoryAdjustmentGroup {
createdAt
reason
changes {
name
delta
}
}
userErrors {
field
message
}
}
}";
GRAPHQL;
$variables = [
'input' => [
'name' => 'available',
'quantities' => [
'inventoryItemId' => $inventoryItemId,
'locationId' => $locationId,
'quantity' => $newQuantity
],
'reason' => 'correction'
]
];
return $this->makeGraphQLRequest($query, $variables);
why do i get the error
syntax error, unexpected invalid token ("\"") at [33, 2]
Please help
Explanation of the error and what to fix in the code
}";.