Skip to main content

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

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.

Was this section helpful?