Discussing APIs and development related to customers, discounts, and order management.
We are using this query to export product in collections
mutation {
bulkOperationRunQuery(
query: """
{
collections(query:"published_status:published"){
edges {
node {
id
title
handle
updatedAt
products {
edges {
node {
id
}
}
}
}
}
}
}
"""
) {
bulkOperation {id status}
userErrors {field message}
}
}
It works perfect for many shops, but I found there was a problem with the shop: btc***ine.myshopify.com
The returned product data was wrong, specifically wrong Collection ID.
Is there someone of Shopify API team could check this issue?
Hi @globosoftware - thanks for getting in touch. If I'm understanding this correctly, the Bulk Query returned incorrect collection ids? If so, could you share an X-Request-ID from the response you received from us for an example GraphQL call for this store? I'll be able to take a look at the logs on my end using that Request ID and we can take a deeper look at this together.
Hope to hear from you soon - thanks!
Alan | API 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
Hi @Alan - Thank for your response quickly.
This is X Request ID:
'x-request-id' => '17b25b4a-c82a-4a06-984d-9bd0bf1ab38d'
For example this product: 7598066663666
it is belong to 3 collections.
But the data response:
{"id":"gid:\/\/shopify\/Product\/7598066663666","__parentId":"gid:\/\/shopify\/Collection\/399727591666"}
...
{"id":"gid:\/\/shopify\/Product\/7598066663666","__parentId":"gid:\/\/shopify\/Collection\/407558390002"}
...
{"id":"gid:\/\/shopify\/Product\/7598066663666","__parentId":"gid:\/\/shopify\/Collection\/407558390002"}
This collection ID has been duplicated: 407558390002
This collection ID was missing: 399729983730
Please let me know if you need any information.
Thank you
Hi @globosoftware - thanks for providing the X-Request-IDs and for your patience on this, it's appreciated! I've run a few tests on the store referenced in the logs using a basic GraphQL query on the specific product GID and it appears that the right collections are showing up there without duplication. Would you be able to run another Bulk Query and let us know if the error persists for the specific product? No worries if you've done that already - I'd just like to see if the error is resolved or was just a "one off" issue as I can't seem to replicate it on my end.
Hope to hear from you soon and thanks again - happy to keep digging into this with you.
Alan | API 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