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 | |
5 | |
3 | |
3 | |
3 |
Photo by Marco Verch Sales channels on Shopify are various platforms where you can sell...
By Ollie May 25, 2023Summary of EventsBeginning in January of 2023, some merchants reported seeing a large amo...
By Trevor May 15, 2023With 2-Factor Authentication being required to use Shopify Payments, we’re here to help yo...
By Imogen Apr 26, 2023