Error on access.admin value MetafieldDefinitionInput

Not sure what would be the best place to put this, so let me know if there is a better spot for bugs.

I’m creating a MetafieldDefinition by passing a MetafieldDefinitionInput. When using ctrl+k to get suggestions for the access.admin field, the options are: MERCHANT_READ and MERCHANT_READ_WRITE. But using those I get a userError telling me I can only use public_read_write

  1. The error is vague: “Setting this access control”. There are three possible options: admin, storeFront and customerAccount, so which one is “this access control” referencing? By testing different combinations I see only the admin one triggers the error, so why doesn’t it mention admin in the error?
  2. None of the above 3 (in the form ofMetafieldAdminAccessInput, MetafieldStorefrontAccessInput and MetafieldCustomerAccountAccessInput) accept a value of public_read_write according to the docs (also, aren’t these values always uppercase?)

1 Like

Any merchant owned (not app reserved) metafields cant set admin access.

There’s more info in the guide, it tripped me up as well.

1 Like