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.

Can bulkOperationRunQuery return all products from a store?

Solved

Can bulkOperationRunQuery return all products from a store?

stefanb1234
Shopify Partner
19 0 9

I would like to use a bulk operation to return all product ids and some more info. In the documentation, there is no hard limit specified. There are some posts here that specify that sometimes the queries can return a fraction of the data.

Is there any way to enforce the query to return all products?

Otherwise, how can you combine a bulkOperationRunQuery with cursor/pagination such that I would manage to get all products?

Accepted Solution (1)

ShopifyDevSup
Shopify Staff
1453 239 534

This is an accepted solution.

Hi @stefanb1234,

 

There's no real limitation to how many products are returned by a Bulk Operation Query, however there may be some cases where the operation times out if the query you are running in the operation is particularly complex. If that does happen we would suggest reducing the complexity of the query by either removing some of the fields you are requesting, or by limiting the query with a query filter, such as CREATED_AT to get products created before or after a certain date.

Bulk Operation Queries do not accept cursor pagination, and will work without it to return all the resources requested.

However there are some additional limitations to Bulk Operation Queries that you should also keep in mind:
 

  • Maximum of five total connections in the query.
  • Connections must implement the Node interface
  • The top-level node and nodes fields can't be used.
  • Maximum of two levels deep for nested connections.

These limitations are explained further in our developer documentation: Perform bulk operations with the GraphQL Admin API

 

I hope this helps, and I hope you have a great day 🙂

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us 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

View solution in original post

Reply 1 (1)

ShopifyDevSup
Shopify Staff
1453 239 534

This is an accepted solution.

Hi @stefanb1234,

 

There's no real limitation to how many products are returned by a Bulk Operation Query, however there may be some cases where the operation times out if the query you are running in the operation is particularly complex. If that does happen we would suggest reducing the complexity of the query by either removing some of the fields you are requesting, or by limiting the query with a query filter, such as CREATED_AT to get products created before or after a certain date.

Bulk Operation Queries do not accept cursor pagination, and will work without it to return all the resources requested.

However there are some additional limitations to Bulk Operation Queries that you should also keep in mind:
 

  • Maximum of five total connections in the query.
  • Connections must implement the Node interface
  • The top-level node and nodes fields can't be used.
  • Maximum of two levels deep for nested connections.

These limitations are explained further in our developer documentation: Perform bulk operations with the GraphQL Admin API

 

I hope this helps, and I hope you have a great day 🙂

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us 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