我正在尝试使用 Shopify GraphQL API 编辑已下订单。我获得了获取商店信息的有效结果,因此连接到 shopify 没有问题。但是在创建beginEdit突变时,我得到了响应
Field 'orderEditBegin' doesn't exist on type 'Mutation'.
我用的PHP库是this,使用的代码也是基于这个库的。使用的凭据来自私人 Shopify 应用程序。我也尝试过使用另一个PHP 库,但得到了相同的响应。
以下是我尝试过的,
$config = array(
'ShopUrl' => '*******.myshopify.com',
'ApiKey' => '********************',
'SharedSecret' => '********************',
'AccessToken' => '********************'
);
$shopify = PHPShopify\ShopifySDK::config($config);
$graphQL = <<<Query
mutation beginEdit{
orderEditBegin(id: "gid://shopify/Order/1234"){
calculatedOrder{
id
}
}
}
Query;
var_dump($shopify->GraphQL->post($graphQL));
我在这里做错了什么?