Skip to content

Support optional owner_type in UI extension metafields - #8534

Merged
kumar303 merged 3 commits into
mainfrom
ui-ext-metafield-owners-in-toml
Sep 18, 2026
Merged

kumar303 merged 3 commits into
mainfrom
ui-ext-metafield-owners-in-toml

Conversation

@kumar303

@kumar303 kumar303 commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

For checkout and customer account UI extensions, we're introducing owner_type as an optional field for metafield declarations. See UI-TAG spec (private link).

WHAT is this pull request doing?

This enables TOML configuration like:

[[extensions.metafields]]
namespace = "$app"
key = "energy-rating"
owner_type = "PRODUCTVARIANT"

[[extensions.metafields]]
namespace = "custom"
key = "age-verification-required"
owner_type = "CUSTOMER"

The owner_type allows surfaces to optimize metafield fetching in ways that was previously not possible.

API change to support this https://meteorite.shopify.io/repos/shop/world/pulls/2062315/files (private)

How to manually test your changes?

I set up a local CLI and ran two tests:

I tried to deploy an app with bogus owner types. Failed as expected:

Expand Screenshot 2026-09-16 at 15 28 42

I deployed the app with a valid owner type. It succeeded and was saved correctly:

Expand Screenshot 2026-09-16 at 15 34 29

I also made a UI extension that reads app metafields and verified that it was able to see the new one (keep in mind that the type hasn't been updated yet).

Expand Screenshot 2026-09-16 at 17 22 55

In Checkout, I verified that the GraphQL response includes the PRODUCT type:

Expand Screenshot 2026-09-16 at 17 22 37

Post-release steps

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've considered analytics changes to measure impact
  • The change is user-facing — I've identified the correct bump type (patch for bug fixes · minor for new features · major for breaking changes) and added a changeset with pnpm changeset add

@github-actions github-actions Bot added the Area: @shopify/app @shopify/app package issues label Sep 14, 2026
@kumar303
kumar303 marked this pull request as ready for review September 14, 2026 16:33
@kumar303
kumar303 requested a review from a team as a code owner September 14, 2026 16:33
Comment thread packages/app/src/cli/models/extensions/schemas.ts Outdated
@kumar303
kumar303 force-pushed the ui-ext-metafield-owners-in-toml branch from 2de14c3 to 050709b Compare September 15, 2026 08:49
@kumar303
kumar303 force-pushed the ui-ext-metafield-owners-in-toml branch from 050709b to 42fdcaf Compare September 18, 2026 08:47

@vividviolet vividviolet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few minor cleanups

Comment thread packages/app/src/cli/models/extensions/specifications/ui_extension.test.ts Outdated
Comment thread packages/app/src/cli/models/extensions/specifications/ui_extension.test.ts Outdated
Comment thread packages/app/src/cli/models/extensions/specifications/ui_extension.test.ts Outdated
@kumar303
kumar303 force-pushed the ui-ext-metafield-owners-in-toml branch from 42fdcaf to e754d36 Compare September 18, 2026 14:03
@kumar303
kumar303 added this pull request to the merge queue Sep 18, 2026
Merged via the queue into main with commit 7692333 Sep 18, 2026
30 checks passed
@kumar303
kumar303 deleted the ui-ext-metafield-owners-in-toml branch September 18, 2026 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: @shopify/app @shopify/app package issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants