Development discussions around Shopify APIs
Given that bulk operations currently don't support connection fields within a list field, the `nodes` query seems to be incompatible with the bulk mutation.
mutation {
bulkOperationRunQuery(
query: """
query {
nodes(ids: ["gid://shopify/Product/<:product_id>"]) {
... on Product {
title
variants(first: 25) {
edges {
node {
id
}
}
}
}
}
}
"""
) {
bulkOperation {
id
status
}
userErrors {
field
message
}
}
}
>>>
{
"data": {
"bulkOperationRunQuery": {
"bulkOperation": null,
"userErrors": [
{
"field": [
"query"
],
"message": "Queries that contain a connection field within a list field are not currently supported."
}
]
}
},
"extensions": {
"cost": {
"requestedQueryCost": 10,
"actualQueryCost": 10,
"throttleStatus": {
"maximumAvailable": 1000,
"currentlyAvailable": 990,
"restoreRate": 50
}
}
}
}
However, a connection is required for the bulk mutation.
mutation {
bulkOperationRunQuery(
query: """
query {
nodes(ids: ["gid://shopify/Product/<:product_id>"]) {
... on Product {
title
}
}
}
"""
) {
bulkOperation {
id
status
}
userErrors {
field
message
}
}
}
>>>
{
"data": {
"bulkOperationRunQuery": {
"bulkOperation": null,
"userErrors": [
{
"field": [
"query"
],
"message": "Bulk queries must contain at least one connection."
}
]
}
},
"extensions": {
"cost": {
"requestedQueryCost": 10,
"actualQueryCost": 10,
"throttleStatus": {
"maximumAvailable": 1000,
"currentlyAvailable": 990,
"restoreRate": 50
}
}
}
}
I am trying to pull products by id in bulk, but given that the `products` query doesn't support an `ids` property I am not sure if this is possible as a bulk operation. Am I missing something?
I am having the same problem. It seems it is not supported yet.
User | RANK |
---|---|
10 | |
4 | |
3 | |
3 | |
3 |
We're excited to announce improvements to the threaded messaging experience in our communi...
By TyW May 31, 2023Thank you to everyone who participated in our AMA with Klaviyo. It was great to see so man...
By Jacqui May 30, 2023Photo by Marco Verch Sales channels on Shopify are various platforms where you can sell...
By Ollie May 25, 2023