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 |
---|---|
50 | |
11 | |
6 | |
5 | |
5 |
Thanks to all who participated in our AMA with 2H Media on planning your 2023 marketing bu...
By Jacqui Mar 30, 2023Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023