Bulk Query using Graphql

Solved
poojafmile
Tourist
13 1 0

Hello, 

I want to make a request to get all the orders from my store (which is more than 250) therefor am trying to use the bulk query.

poojafmile_0-1618888879662.png

 

 

Can someone please help me to convert this to a bulk query? 
I cant seem to understand this documentation: https://shopify.dev/tutorials/perform-bulk-operations-with-admin-api

Thanks

0 Likes
_JB
Shopify Staff
Shopify Staff
809 95 176

This is an accepted solution.

Hey @poojafmile,

To use a query with Bulk Operations, simply remove the first:100 argument. Also query is implied so you don't need to include that. Worth mentioning that most editors I've seen don't play nice with the syntax Shopify uses for bulk operation queries, so you may see errors in the editor but sending the query will still work.

 

Here's your query as a bulk operation:

 

mutation {
  bulkOperationRunQuery(
   query: """
  {
    orders {
      edges {
        node {
          id
        }
      }
    }
  }
    """
  ) {
    bulkOperation {
      id
      status
    }
    userErrors {
      field
      message
    }
  }
}

 

 

 

JB | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog