Handling A bulk operation for this app and shop is already in progress correctly in GraphQL

We are hitting this error and my guess is that it is because we are submitting exactly the same query twice.

For example below:

{
    "data": {
        "bulkOperationRunQuery": {
            "bulkOperation": null,
            "userErrors": [
                {
                    "field": null,
                    "message": "A bulk operation for this app and shop is already in progress: gid://shopify/BulkOperation/{operation_id}."
                }
            ]
        }
    },
    "extensions": {
        "cost": {
            "requestedQueryCost": 10,
            "actualQueryCost": 10,
            "throttleStatus": {
                "maximumAvailable": 2000.0,
                "currentlyAvailable": 1990,
                "restoreRate": 100.0
            }
        }
    }
}

Does this mean that I can use the {operation_id} instead of waiting for the previously submitted operation?

Or the {operation_id} that is currently running is for a different query? Is this truth that one QUERY per APP per SHOP?

Hey @annapurna

Per https://shopify.dev/tutorials/perform-bulk-operations-with-admin-api your app is only able to run a single bulk operation at a time on your shop. You can query the status of any running bulk operations on the shop before submitting another one (see the heading “Check an operation’s progress” in the guide linked above).