How to create Metaobject definition with field which "Use as filter in metaobject index" and "Active-draft status" set to true

How do I create Metaobject definition with field which “Use as filter in metaobject index” and “Active-draft status” set to true using Admin API graphql mutation?
API version: 2025-07

My code:

mutation MetaobjectDefinitionCreate($definition: MetaobjectDefinitionCreateInput!) {
  metaobjectDefinitionCreate(definition: $definition) {
    metaobjectDefinition {
      id
      type
      fieldDefinitions {
        key
        name
        type {
          name
        }
      }
    }
  }
}
{
  "definition": {
    "name": "Info",
    "displayNameKey": "name",
    "type": "info",
		"access": {
      "storefront": "PUBLIC_READ"
    },
    "capabilities": {
      "translatable": {
        "enabled": true
      },
      "renderable": {
        "enabled": false
      }
    },
    "fieldDefinitions": [
      { "key": "name", "name": "Name", "type": "single_line_text_field", "description": "Name",  "validations": [{
        "name": "choices",
        "value": "[\"green\", \"blue\", \"red"]"
      	}], "required": true
      },
      { "key": "image", "name": "Image", "type": "file_reference", "description": "Image",  "validations": {
        "name": "file_type_options",
        "value": "[\"Image\"]" }, "required": true
      }
    ]
  }
}


Useful links:

https://help.shopify.com/en/manual/custom-data/options#list-of-options-available-for-metaobjects

Hi @madfcat

To create a Metaobject definition with “Active-draft status” enabled, you need to set the field’s filterable property to true in the field definition (this makes it available as a filter in the metaobject index).


For setting “Use as filter in metaobject index”, this may be only possible in the admin UI but digging into this more.

You mean publishable?
There is no filterable option. Probably, not implemented yet. Maybe in the next API version.

“Active-draft status” worked with publishable: { "enabled": true }.

^Sorry - I did mean publishable

I can also confirm it’s not currently possible to set “Use as filter in metaobject index” via the API but it is on the product teams roadmap to support.