A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Dear Community,
I have a problem creating a GraphQL bulkrequest. I can issue the normal query in Postman with successful response. But if I try to use the same query in a bulkrequest, polling the result gives an error: "ACCESS_DENIED". I use the same X-Shopify-Access-Token header for the request(which has the read_orders access scope). I would be really glad, to get help on this topic, since I'am a Graphql beginner!
Single Request:
{
orders (first: 20) {
edges {
node {
id,
email,
name,
fullyPaid,
customer {
firstName,
lastName,
email
},
lineItems(first: 10) {
edges {
node {
id,
image(maxHeight: 65, maxWidth: 65) {
originalSrc
},
title,
quantity
}
}
}
}
}
}
}
BulkRequest:
mutation {
bulkOperationRunQuery(
query: """
{
orders (first: 20) {
edges {
node {
id,
email,
name,
fullyPaid,
customer {
firstName,
lastName,
email
},
lineItems(first: 10) {
edges {
node {
id,
image(maxHeight: 65, maxWidth: 65) {
originalSrc
},
title,
quantity
}
}
}
}
}
}
}
""") {
bulkOperation {
id
status
}
userErrors {
field
message
}
}
}
admin/oauth/access_scopes.json :
{
"access_scopes": [
{
"handle": "read_third_party_fulfillment_orders"
},
{
"handle": "read_fulfillments"
},
{
"handle": "write_products"
},
{
"handle": "write_shipping"
},
{
"handle": "read_orders"
},
{
"handle": "read_all_orders"
},
{
"handle": "read_products"
},
{
"handle": "read_shipping"
}
]
}
Greetings, Tommy
Hey @tommydev ,
Happy to help you out with this. Could you provide the x-request-id from the response headers from the ACCESS_DENIED request. With the request-id I can review our logs to hopefully help identify the cause of the issue.
Regards,
John
John C | Developer Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Running into the same issue, did this ever get solved?
If you can provide the x-request-id from the response headers of a request where you're having an issue I can take a further look at our logs.
John C | Developer Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Dear,
I have the same issue, can you help me check this?
POST /api/webhook HTTP/1.1
Host: wb.test
User-Agent: Shopify-Captain-Hook
Content-Length: 195
Accept: */*
Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
Content-Type: application/json
X-Forwarded-For: 34.139.151.98
X-Forwarded-Host: wb.ap.ngrok.io
X-Forwarded-Proto: https
X-Shopify-Api-Version: 2022-10
X-Shopify-Hmac-Sha256: c/09bl5p/oYqnS/E5sHu2sS5A7MZGbXg9mgi/eifrtI=
X-Shopify-Shop-Domain: longhm-pro-02.myshopify.com
X-Shopify-Topic: bulk_operations/finish
X-Shopify-Webhook-Id: bf5149af-331d-4326-ab9b-80e9c88625bf
{"admin_graphql_api_id":"gid:\/\/shopify\/BulkOperation\/2765510639927","completed_at":null,"created_at":"2023-01-31T10:04:57+07:00","error_code":"access_denied","status":"failed","type":"query"}
Thank you