Skip to main content
object

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.

DateTime

When the bulk operation was successfully completed.

DateTime!non-null

When the bulk operation was created.

BulkOperationErrorCode

Error code for failed operations.

UnsignedInt64

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

ID!non-null

A globally-unique ID.

UnsignedInt64!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.

URL

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.

String!non-null

GraphQL query document specified in bulkOperationRunQuery.

UnsignedInt64!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.

BulkOperationStatus!non-null

Status of the bulk operation.

BulkOperationType!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?

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.


Was this section helpful?

mutation

Starts the cancelation process of a running bulk operation.

There may be a short delay from when a cancelation starts until the operation is actually canceled.

Arguments

ID!required

The ID of the bulk operation to cancel.


Fields

BulkOperation

The bulk operation to be canceled.

[UserError!]!non-null

The list of errors that occurred from executing the mutation.

mutation

Creates and runs a bulk operation mutation.

To learn how to bulk import large volumes of data asynchronously, refer to the bulk import data guide.

Arguments

String

An optional identifier which may be used for querying.

Boolean!requiredDefault:true

Whether to group objects under their corresponding parent objects in the JSONL output. Grouping is costly, causes bulk operations to take longer to complete, and increases the chances of failures such as timeouts.

String!required

The mutation to be executed in bulk.

String!required

The staged upload path of the file containing mutation variables.


Fields

BulkOperation

The newly created bulk operation.

[BulkMutationUserError!]!non-null

The list of errors that occurred from executing the mutation.

mutation

Creates and runs a bulk operation query.

See the bulk operations guide for more details.

Arguments

Boolean!requiredDefault:true

Whether to group objects under their corresponding parent objects in the JSONL output. Grouping is costly, causes bulk operations to take longer to complete, and increases the chances of failures such as timeouts.

String!required

The query to be executed in bulk.


Fields

BulkOperation

The newly created bulk operation.

[BulkOperationUserError!]!non-null

The list of errors that occurred from executing the mutation.


Was this section helpful?

interface

Was this section helpful?