current Bulk Operation
Returns the current app's most recent . Apps can run one bulk query and one bulk mutation operation at a time per shop.
The operation type parameter determines whether to retrieve the most recent query or mutation bulk operation. Use this query to check the operation's status, track its progress, and retrieve the result URL when it completes.
Arguments
- type (BulkOperationType)
- Anchor to typetype•Bulk
Operation Type Default:QUERY The current bulk operation's type.
Anchor to Possible returnsPossible returns
- BulkOperation (BulkOperation)
- Anchor to BulkOperationBulk•Bulk
Operation Operation An asynchronous operation that exports large datasets or imports data in bulk. Create bulk operations using bulkOperationRunQuery to export data or bulkOperationRunMutation to import data.
After creation, check the
statusfield to track progress. When completed, theurlfield contains a link to download results in JSONL format. Thefield shows the running total of processed objects, whiletracks only root-level objects in nested queries.If an operation fails but retrieves partial data, then the
field provides access to incomplete results.Noteurlandvalues expire after seven days.Note:urlandvalues expire after seven days.Note: <code>url</code> and <code><span class="PreventFireFoxApplyingGapToWBR">partial<wbr/>Data<wbr/>Url</span></code> values expire after seven days.
- Anchor to completedAtcompleted•Date
At Time When the bulk operation was successfully completed.
- Anchor to createdAtcreated•Date
At Time! non-null When the bulk operation was created.
- Anchor to errorCodeerror•Bulk
Code Operation Error Code Error code for failed operations.
- Anchor to fileSizefile•Unsigned
Size Int64 File size in bytes of the file in the
urlfield.- •ID!non-null
A globally-unique ID.
- Anchor to objectCountobject•Unsigned
Count Int64! 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.
- Anchor to partialDataUrlpartial•URL
Data 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
nullwhen there's no data available.- Anchor to queryquery•String!non-null
GraphQL query document specified in
.- Anchor to rootObjectCountroot•Unsigned
Object Count Int64! 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.
- Anchor to statusstatus•Bulk
Operation Status! non-null Status of the bulk operation.
- Anchor to typetype•Bulk
Operation Type! non-null The bulk operation's type.