Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Bulk Operation - INTERNAL_SERVER_ERROR - productVendors

Bulk Operation - INTERNAL_SERVER_ERROR - productVendors

recom
Shopify Partner
1 0 0

Summary

We want to get a list of all ProductVendors for a store. We initially tried using graphql with pagination, but it seems that ProductVendors does not accept the "after" field so we can only fetch the first 250. 

 

As a next step, we're now trying to use a bulk operation to fetch all Product vendors in a single query but the bulk operation is consistently failing. Any idea what's wrong? 

 

Begin bulk query

Bulk operation to fetch first 250 productVendors. X-request-id: "5e45c5ee-164e-4830-b1dc-7d1ece46e269"

 

mutation {
  bulkOperationRunQuery(
   query: """
    {
  shop {
    productVendors(first:250){
      edges {
        node
      }
    }
  }
}
    """
  ) {
    bulkOperation {
      id
      status
    }
    userErrors {
      field
      message
    }
  }
}

 

 

Response

 

{"data"=>{"currentBulkOperation"=>{"id"=>"gid://shopify/BulkOperation/1649642733740", "status"=>"RUNNING", "errorCode"=>nil, "createdAt"=>"2022-08-16T14:28:26Z", "completedAt"=>nil, "objectCount"=>"0", "fileSize"=>nil, "url"=>nil, "partialDataUrl"=>nil}},
 "extensions"=>{"cost"=>{"requestedQueryCost"=>1, "actualQueryCost"=>1, "throttleStatus"=>{"maximumAvailable"=>2000.0, "currentlyAvailable"=>1008, "restoreRate"=>100.0}}}}

 

 

Check status of query

I use this query to check the status

 

query {
  currentBulkOperation {
    id
    status
    errorCode
    createdAt
    completedAt
    objectCount
    fileSize
    url
    partialDataUrl
  }
}

 

 

for a minute or two after it start, the status is "RUNNING" but then it always fails eventually

Response

 

{"data"=>{"currentBulkOperation"=>{"id"=>"gid://shopify/BulkOperation/1649642733740", "status"=>"FAILED", "errorCode"=>"INTERNAL_SERVER_ERROR", "createdAt"=>"2022-08-16T14:28:26Z", "completedAt"=>nil, "objectCount"=>"0", "fileSize"=>nil, "url"=>nil, "partialDataUrl"=>nil}}

 

 

Any idea why this might be failing?

Replies 0 (0)