Introducing New Bulk Operation Queries for Shopify Admin API

Introducing New Bulk Operation Queries for Shopify Admin API

Shopify Updates: 

We're excited to announce the introduction of new GraphQL queries to help you effectively manage bulk operations in the Shopify Admin API. These updates provide enhanced filtering, sorting, and retrieval capabilities, making it easier to work with your bulk operations at scale.

What’s New?

1. New Bulk Operations Retrieval Queries

We’ve added two new ways to access and manage bulk operations:

  • BulkOperations: A connection-based query that returns a paginated list of your bulk operations. It includes options to filter and sort operations.
  • BulkOperation: A single-object query that lets you retrieve details for a specific bulk operation using its unique ID.

2. Enhanced Filtering and Search Capabilities

The bulkOperations connection now supports a range of flexible querying options, including:

  • Status Filtering: Search for bulk operations by their status (e.g., canceled, completed, running).
  • Type Filtering: Filter operations by their type, such as query or mutation.
  • Date Filtering: Retrieve operations created before or after a specific date.
  • Sorting Options: Sort by fields like created_at, completed_at, or status, in ascending or descending order.
  • Search Syntax: Use precise field:value patterns for custom filtering.

How to Use These New Queries

1. To List and Filter Bulk Operations

Use the bulkOperations connection query with custom filtering and sorting options. Below is an example:

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     }   } }

2. To Retrieve a Specific Bulk Operation

Use the bulkOperation query to get details for a single bulk operation by providing its ID:

query {   bulkOperation(id: "gid://shopify/BulkOperation/123456789") {     id     status     query     createdAt     completedAt     url     errorCode   } }

3. If You're Using Existing Bulk Operation Workflows

If you’re currently using currentBulkOperation, no immediate action is required. However, do note that currentBulkOperation is being deprecated, and we encourage you to transition to the new queries.

Why Are We Making These Changes?

Previously, you could only access the most recent bulk operation through currentBulkOperation. These new updates allow for:

  • Complete Visibility: Manage and monitor all past and current bulk operations, not just the latest one.
  • Better Debugging: Filter operations by attributes like status or date to identify issues more easily.
  • Improved Pagination: Manage large volumes of operations efficiently with effective pagination tools.
  • Simplified Workflow Management: Enjoy streamlined monitoring, debugging, and scaling of operations.

For additional details, check out our full Bulk Operations Queries Guide.

Back to blog