A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Trying to update a Pending Marketing Activity but keep failing.
Below piece of code works:
$query = <<<QUERY
mutation marketingActivityUpdate(\$id: ID!, \$status: MarketingActivityStatus!){
marketingActivityUpdate(input: {id: \$id, status: \$status}) {
marketingActivity {
id
title
status
}
}
}
QUERY;
$variables = [
"id" => $this->request["marketing_activity_id"],
"status" => "FAILED"
];
$response = $client->query(['query' => $query, 'variables' => $variables]);
but when trying to change the status to something else e.g. ACTIVE it fails.
I tried everything in documentation but keep failing. https://shopify.dev/apps/app-extensions/marketing-activities/reference/endpoints#create-a-marketing-...
I would appreciate any assistance.