Skip to content

[Bug]: Extension Metafield Config has Higher Minimum Length For Key String Than Admin API or UI - Blocks Extension Access To Metafield #6159

@themikem

Description

@themikem

Please confirm that you have:

  • Searched existing issues to see if your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
  • Reproduced the issue in the latest CLI version.

In which of these areas are you experiencing a problem?

Extension

Expected behavior

Able to reference all app metafield definitions in extension.toml file according to the same spec listed for the Admin API:

key String! non-null
Must be 2-64 characters long and only contain alphanumeric, hyphen, and underscore characters.

https://shopify.dev/docs/api/admin-graphql/latest/input-objects/MetafieldDefinitionInput#fields-key

Actual behavior

Requesting the custom id metafield:
[[extensions.metafields]] namespace = "custom" key = "id"
per https://shopify.dev/docs/apps/build/custom-data/metafields/working-with-custom-ids

results in this error when deploying:
╭─ error │ Version couldn't be created. │ │ Each entry needs a 'key' value between 3 and 64 characters. │ ╰─────

Verbose output

Verbose output
Paste the output here!

Reproduction steps

  1. Create custom ID metafield definition with key = "id"
  2. Request same custom.id metafield in shopify.extension.toml
  3. Observe error message

Operating System

Windows 11 - Ubuntu 24.04 LTS in WSL2

Shopify CLI version (shopify --version)

3.83.0

Shell

Bash

Node version (run node -v if you're not sure)

v20.0.17

What language and version are you using in your application?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions