I am getting issue during error during mutation of order metafields.
“message”: “Access to this namespace and key on Metafields for this resource type is not allowed.”
const response = await fetch(
“shopify:customer-account/api/2024-10/graphql.json”,
{
method: “POST”,
headers: {
“Content-Type”: “application/json”,
},
body: JSON.stringify({
query: mutation { metafieldsSet(metafields: [ { ownerId: "${orderId}", namespace: "${namespace}", key: "${key}", value: "hola", type: "single_line_text_field" } ]) { metafields { id value } userErrors { field message } } }
,
}),
}
);
scopes = “customer_read_orders,customer_write_orders,customer_read_customers,customer_write_customers,read_customers,read_products,write_customers,write_discounts,write_discounts_allocator_functions,write_orders,write_products,write_purchase_options”
When querying data, I am getting null even though both query and mutation works in shopify graphql App.
Some more resources on customer account UI extensions would be really appreciated.