Can I run bulkOperationRunMutation while another app is running one on the same store?

I’m planning to develop a feature using bulkOperationRunMutation. According to the documentation (Bulk import data with the GraphQL Admin API), there’s a limitation that says:
“You can run only one bulk operation of each type (bulkOperationRunMutation or bulkOperationRunQuery) at a time per shop.”

Does this limitation apply per app, or does it mean only one bulk operation can run at a time across all apps for the same shop?

Which of the following is correct?

  1. If App A is running a bulkOperationRunMutation on a store (status is RUNNING), then App B cannot start a new bulkOperationRunMutation.
  2. Even if App A has a bulkOperationRunMutation running, App B can still run its own bulkOperationRunMutation as long as it hasn’t started one yet.

From this Shopify forum discussion, it seems that an app cannot check the bulk operation status initiated by a different app. If that’s true, then option 2 seems more likely—otherwise, error handling would be very difficult.

Hi @ayaMatsu_Rewire

No, API access is isolated per app. Your GraphQL operations, rate limits or bulk operations aren’t affected by other apps on the same store.

Rate limits and rules apply per OAuth access token issued per app.

So you can run a single bulk operation per store, regardless if other apps are making use of bulk operations as well on the same store.

Hi Dylan, Thank you very much!

I’m new to this board, and since my account was pending approval, I actually contacted Shopify Support about the same issue in parallel.

==
Here is the response I received: (just copy and past as I received)
もしアプリAがストアでbulkOperationRunMutationを実行中(ステータスがRUNNING)である場合、アプリBは新しいbulkOperationRunMutationを開始することができません。

これは、Shopifyが1回のストアに対して1つのバルク操作のみを許可する制限を設けているためです。1つのアプリがバルク操作を実行中の場合、他のアプリは最初の操作が完了するまで新しいバルク操作を開始することができません。

Here’s the Google-translated version of the response:

If app A has a bulkOperationRunMutation running in its store (status RUNNING), app B cannot initiate a new bulkOperationRunMutation.

This is because Shopify has a limit of only allowing one bulk operation per store at a time; if one app is running a bulk operation, the other apps cannot start a new bulk operation until the first operation is complete.

==

According to your answer, this response from Shopify Support seems to be incorrect—
which would actually be good news for me, since currentBulkOperation only lets me check the state of the operation in my own app. :laughing:

I followed up with Shopify again, and here is the response I received.

They replied in Japanese, so I’ll just paste it below as-is.
But in short, it seems their answer hasn’t changed from the previous one:

“If app A has a bulkOperationRunMutation running in its store (status RUNNING), app B cannot initiate a new bulkOperationRunMutation.”

Here is the full reply I received:

  1. 開発者ではございませんが、内部リソースを確認したところ、このオプションが正しい回答であるようです:

  2. App AがストアでbulkOperationRunMutationを実行中(ステータスがRUNNING)の場合、App Bは新しいbulkOperationRunMutationを開始することができません。

  3. 一つのアクティブな_bulkOperationRunMutation_の制限は、アプリごとではなくショップレベルで適用されます。

  4. これは以下を意味します:

    • ショップは、どのアプリが開始したかに関わらず、一つのアクティブなミューテーション一つのアクティブなクエリのバルク操作を同時に持つことができます。
    • App Aがバルクミューテーションを開始した場合、App Bはそれが完了するまで自分の操作を開始することができません。
  5. このように動作しません:

    • アプリAが変更を開始すると、ステータスは「実行中」となります。
    • アプリBが別の変更を開始しようとすると、「一括操作が既に進行中です」というメッセージと共に失敗します。