We are looking for a way to access order metafields from a Checkout UI extension.
Following suggestions from old threads like this and this we’ve tried to access it through a Storefront API query:
query Order($orderId: ID!, $namespace: String!, $key: String!) {
node(id: $orderId) {
id
... on Order {
metafield(namespace: $namespace, key: $key) {
value
}
}
}
}
But such requests fail with the error:
Access denied for order field. Required access: `unauthenticated_read_customers` access scope.
This can be the case as this access scope is not listed in the docs.
Therefore, I wonder if there is a way to retrieve order metafields client-side (thank-you target), without introducing a proxy for a back-end call?