---
title: HasCompareDigest - Customer API
description: >-
  Represents a summary of the current version of data in a resource.


  The `compare_digest` field can be used as input for mutations that implement a
  compare-and-swap mechanism.
api_version: 2026-01
api_name: customer
type: interface
api_type: graphql
source_url:
  html: 'https://shopify.dev/docs/api/customer/latest/interfaces/HasCompareDigest'
  md: 'https://shopify.dev/docs/api/customer/latest/interfaces/HasCompareDigest.md'
---

# Has​Compare​Digest

interface

Represents a summary of the current version of data in a resource.

The `compare_digest` field can be used as input for mutations that implement a compare-and-swap mechanism.

## Fields

* compare​Digest

  [String!](https://shopify.dev/docs/api/customer/latest/scalars/String)

  non-null

  The data stored in the resource, represented as a digest.

***

## Types implemented in

* [Metafield](https://shopify.dev/docs/api/customer/latest/objects/Metafield)

  OBJECT

  The custom metadata attached to a resource. Metafields can be sorted into namespaces and are comprised of keys, values, and value types.

  * compare​Digest

    [String!](https://shopify.dev/docs/api/customer/latest/scalars/String)

    non-null

    The data stored in the resource, represented as a digest.

  * created​At

    [Date​Time!](https://shopify.dev/docs/api/customer/latest/scalars/DateTime)

    non-null

    The date and time when the metafield was created.

  * id

    [ID!](https://shopify.dev/docs/api/customer/latest/scalars/ID)

    non-null[Pre-auth accessible](https://shopify.dev/docs/apps/build/customer-accounts/order-status-page#customer-account-api)

    A globally-unique ID.

  * json​Value

    [JSON!](https://shopify.dev/docs/api/customer/latest/scalars/JSON)

    non-null

    The data stored in the metafield in JSON format.

  * key

    [String!](https://shopify.dev/docs/api/customer/latest/scalars/String)

    non-null[Pre-auth accessible](https://shopify.dev/docs/apps/build/customer-accounts/order-status-page#customer-account-api)

    The key name for a metafield.

  * namespace

    [String!](https://shopify.dev/docs/api/customer/latest/scalars/String)

    non-null[Pre-auth accessible](https://shopify.dev/docs/apps/build/customer-accounts/order-status-page#customer-account-api)

    The namespace for a metafield.

  * reference

    [Metafield​Reference](https://shopify.dev/docs/api/customer/latest/unions/MetafieldReference)

    [Pre-auth accessible](https://shopify.dev/docs/apps/build/customer-accounts/order-status-page#customer-account-api)

    Returns a reference object if the metafield's type is a resource reference.

  * references

    [Metafield​Reference​Connection](https://shopify.dev/docs/api/customer/latest/connections/MetafieldReferenceConnection)

    [Pre-auth accessible](https://shopify.dev/docs/apps/build/customer-accounts/order-status-page#customer-account-api)

    A list of reference objects if the metafield's type is a resource reference list.

    * first

      [Int](https://shopify.dev/docs/api/customer/latest/scalars/Int)

      ### Arguments

      The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

    * after

      [String](https://shopify.dev/docs/api/customer/latest/scalars/String)

      The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

    * last

      [Int](https://shopify.dev/docs/api/customer/latest/scalars/Int)

      The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

    * before

      [String](https://shopify.dev/docs/api/customer/latest/scalars/String)

      The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

    ***

  * type

    [String!](https://shopify.dev/docs/api/customer/latest/scalars/String)

    non-null[Pre-auth accessible](https://shopify.dev/docs/apps/build/customer-accounts/order-status-page#customer-account-api)

    The type name of the metafield. See the list of [supported types](https://shopify.dev/apps/metafields/definitions/types).

  * updated​At

    [Date​Time!](https://shopify.dev/docs/api/customer/latest/scalars/DateTime)

    non-null

    The date and time when the metafield was updated.

  * value

    [String!](https://shopify.dev/docs/api/customer/latest/scalars/String)

    non-null[Pre-auth accessible](https://shopify.dev/docs/apps/build/customer-accounts/order-status-page#customer-account-api)

    The value of a metafield.

  * description

    [String](https://shopify.dev/docs/api/customer/latest/scalars/String)

    Deprecated

***

##### Variables

```json
{
	"compareDigest": ""
}
```

##### Schema

```graphql
interface HasCompareDigest {
  compareDigest: String!
}
```
