Skip to main content

metafieldInteger collection condition removed in API version 2027-01

As of API version 2027-01, the metafieldInteger collection source condition inputs and types is removed from GraphQL Admin API. If you use metafieldInteger to create or read collection source conditions, you need to migrate to metafieldInt before you upgrade to API version 2027-01.

What changed

With metafieldInt, the value field on integer metafield conditions changes type from Int to String, to align with the metafield value field on the Storefront API. For details, see the Storefront Metafield.value field reference.

The following types and fields are replaced:

The relation enum members are unchanged (EQUALS, GREATER_THAN, LESS_THAN). The behavioral difference is that value is now a String instead of an Int.

Writes

These examples show the required switch from metafieldInteger to metafieldInt and the change in the value literal type.

Before:

conditionsToCreate: [{
metafieldInteger: { definitionId: "gid://shopify/MetafieldDefinition/1", relation: GREATER_THAN, value: 2000 }
}]

After:

conditionsToCreate: [{
metafieldInt: { definitionId: "gid://shopify/MetafieldDefinition/1", relation: GREATER_THAN, value: "2000" }
}]

Reads

This example shows the updated type condition you need to use when you read collection source conditions.

Before:

... on CollectionSourceInclusionConditionMetafieldInteger { relation value }

After:

... on CollectionSourceInclusionConditionMetafieldInt { relation value }

Action required

Before you move to API version 2027-01, you need to:

  • Update all Admin GraphQL queries and mutations that reference metafieldInteger to use metafieldInt.
  • Ensure all integer metafield condition value fields are strings.

If you don’t update your app before you use API version 2027-01, mutations that send metafieldInteger fail validation, and queries that select CollectionSourceInclusionConditionMetafieldInteger return errors. You can test metafieldInt behavior on 2026-10 before you upgrade to 2027-01.

metafieldInteger continues to work on API versions up to and including 2026-10. On 2026-10, integer metafield conditions resolve to CollectionSourceInclusionConditionMetafieldInt when present. In API version 2027-01, metafieldInteger is no longer available.

Related docs

Was this page helpful?