New Shopify Certification now available: Liquid Storefronts for Theme Developers

Create Metafield Definition For App-Data Metafield Of Type 'API_PERMISSION'

Shopify Partner
5 1 1

In my app, I am using app-data metafield to create a metafield using metafieldsSet which creates metafield of ownerType 'API_PERMISSION'. But I got a deprecation notice saying that As of 2023-01, `metafieldsSet` no longer requires `type` when a corresponding metafield definition exists. So I tried to create metafield definition using metafieldDefinitionCreate query and passed the ownerType as 'API_PERMISSION'. But the metafield definition is not getting created.
Below is the error message:

  "data": {
    "metafieldDefinitionCreate": {
      "createdDefinition": null,
      "userErrors": [
          "code": "INCLUSION",
          "field": [
          "message": "Owner type is not included in the list"


App-Data metafield Doc:
Metafield Definition Create:


Replies 0 (0)