---
title: >-
  Bulk query operation userErrors now includes code field - Shopify developer
  changelog
description: >-
  Shopify’s developer changelog documents all changes to Shopify’s platform.
  Find the latest news and learn about new platform opportunities.
source_url:
  html: >-
    https://shopify.dev/changelog/bulk-query-operation-usererrors-now-includes-code-field
  md: >-
    https://shopify.dev/changelog/bulk-query-operation-usererrors-now-includes-code-field.md
metadata:
  effectiveApiVersion: 2025-01
  affectedApi:
    - displayName: Admin GraphQL API
      handle: admin-graphql
  primaryTag:
    displayName: API
    handle: api
  secondaryTag:
    displayName: Update
    handle: update
  indicatesActionRequired: false
  createdAt: '2024-10-02T09:07:22-04:00'
  postedAt: '2024-10-02T09:02:00-04:00'
  updatedAt: '2025-10-03T16:02:38-04:00'
  effectiveAt: '2024-10-02T09:02:00-04:00'
---

October 2, 2024

Tags:

* Admin GraphQL API
* 2025-01

# Bulk query operation userErrors now includes code field

As of version 2025-01, the `userErrors` field that is returned by the GraphQL Admin API [`bulkOperationRunMutation`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/bulkOperationRunMutation) includes an optional `code` field.

The GraphQL type for the `userErrors` field changes from a `UserErrors` type to a `BulkOperationUserError` type. However, the `userErrors` field name remains unchanged.

```graphql
mutation bulkOperationRunMutation($clientIdentifier: String, $mutation: String!, $stagedUploadPath: String!) {
  bulkOperationRunMutation(clientIdentifier: $clientIdentifier, mutation: $mutation, stagedUploadPath: $stagedUploadPath) {
    bulkOperation {
      # BulkOperation fields
    }
    userErrors { # Type is now BulkOperationUserError instead of UserErrors
      field
      message
      code # New field added in 2025-01
    }
  }
}
```

This shows the changes to the GraphQL `type` that is used for the `userErrors` field above:

```
# Before (pre-2025-01)
type UserErrors {
  field: String
  message: String
}

# After (2025-01+)
type BulkOperationUserError {
  field: String
  message: String
  code: String  # New optional field
}
```

The query syntax remains unchanged despite the type change.
