Capabilities
Capabilities provide a way to mix in behaviors and logic with your metaobjects. When you create a metaobject definition, you can enable capabilities
that provide additional behavior.
Drafting custom content using the publishable
capability
Anchor link to section titled "Drafting custom content using the publishable capability"The publishable
capability enables users of your metaobject to set it's status to either DRAFT
or ACTIVE
. This can be useful for providing merchants a way to stage their content before making it available to their storefronts - even if you defined it to be available to storefronts using access controls.
In the following, the metaobjectDefinitionCreate
mutation is called with publishable
set to true
to enable this capability:
Next, using the metaobjectCreate
mutation, you'll notice that the default status for a created "Custom Article" metaobject is DRAFT
.
To publish the custom article metaobject, you can use the metaobjectUpdate
mutation and set the status to ACTIVE
.