Unable to use nodes query with bulk mutation

ft3
Tourist
9 1 3

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?

UncleWu
Tourist
3 0 0

I am having the same problem. It seems it is not supported yet.

0 Likes