Skip to main content
Log inSign up
Anchor to currentBulkOperation

currentBulkOperation

query

Returns the current app's most recent BulkOperation. Apps can run one bulk query and one bulk mutation operation at a time, by shop.

BulkOperationTypeDefault:QUERY

The current bulk operation's type.


Was this section helpful?

An asynchronous long-running operation to fetch data in bulk or to bulk import data.

Bulk operations are created using the bulkOperationRunQuery or bulkOperationRunMutation mutation. After they are created, clients should poll the status field for updates. When COMPLETED, the url field contains a link to the data in JSONL format.

Refer to the bulk operations guide for more details.

completedAt

When the bulk operation was successfully completed.

createdAt
non-null

When the bulk operation was created.

errorCode

Error code for failed operations.

fileSize

File size in bytes of the file in the url field.

id
non-null

A globally-unique ID.

objectCount
non-null

A running count of all the objects processed. For example, when fetching all the products and their variants, this field counts both products and variants. This field can be used to track operation progress.

partialDataUrl

The URL that points to the partial or incomplete response data (in JSONL format) that was returned by a failed operation. The URL expires 7 days after the operation fails. Returns null when there's no data available.

query
non-null

GraphQL query document specified in bulkOperationRunQuery.

rootObjectCount
non-null

A running count of all the objects that are processed at the root of the query. For example, when fetching all the products and their variants, this field only counts products. This field can be used to track operation progress.

status
non-null

Status of the bulk operation.

type
non-null

The bulk operation's type.

url

The URL that points to the response data in JSONL format. The URL expires 7 days after the operation completes.


Was this section helpful?