We've introduced new GraphQL queries to help you retrieve and manage bulk operations in the Admin API.
What's Changed
Here's an overview of the updates:
New Bulk Operations Retrieval Queries
We have added two new queries for accessing your bulk operations:
-
bulkOperations: A connection-based query that returns a paginated list of all your bulk operations, complete with filtering and sorting options. -
bulkOperation: A single-object query that retrieves a specific bulk operation by its ID.
Enhanced Filtering and Search Capabilities
The bulkOperations connection now supports flexible querying with the following features:
- Status Filtering: Locate operations by status (e.g., canceled, completed, running).
- Type Filtering: Filter operations by type (query or mutation).
- Date Filtering: Search for operations created before or after a specific date.
-
Sorting Options: Sort operations by
created_at,completed_at, orstatusin ascending or descending order. -
Search Syntax: Use
field:valuepatterns for precise filtering.
What You Need to Do
Depending on your requirements, follow these steps:
To List and Filter Bulk Operations
Utilize the bulkOperations connection query with search syntax:
query {
bulkOperations(
first: 10
query: "status:completed operation_type:query created_at:>2025-10-10"
sortKey: CREATED_AT
reverse: true
) {
edges {
node {
id
status
query
createdAt
completedAt
url
}
}
pageInfo {
hasNextPage
hasPreviousPage
}
}
}
To Retrieve a Specific Bulk Operation
Use the bulkOperation query:
query {
bulkOperation(id: "gid://shopify/BulkOperation/123456789") {
id
status
query
createdAt
completedAt
url
errorCode
}
}
If You're Using Existing Bulk Operation Workflows
No changes are necessary. The currentBulkOperation can still be used but is being deprecated.
Why We Made This Change
Previously, you could only access the most recent bulk operation through currentBulkOperation. These new queries offer:
- Complete visibility into all your bulk operations, not just the current one.
- Enhanced debugging capabilities by filtering operations by status or date.
- Efficient pagination for managing large numbers of operations.
- Simplified monitoring, debugging, and management of bulk operations at scale.