metafield Definition
Requires API client to have access to the resource type associated with the metafield definition.
Retrieves a by its identifier. You can identify a definition using either its owner type, namespace, and key, or its global ID.
Use this query to inspect a definition's configuration, including its data type, validations, access settings, and the count of metafields using it.
Arguments
- Anchor to identifieridentifier•Metafield
Definition Identifier Input The identifier of the MetafieldDefinition to return.
- •IDDeprecated
Anchor to Possible returnsPossible returns
- Anchor to MetafieldDefinitionMetafield•Metafield
Definition Definition Defines the structure, validation rules, and permissions for
Metafieldobjects attached to a specific owner type. Each definition establishes a schema that metafields must follow, including the data type and validation constraints.The definition controls access permissions across different APIs, determines whether the metafield can be used for filtering or as a collection condition, and can be constrained to specific resource subtypes.
- Anchor to accessaccess•Metafield
Access! non-null The access settings associated with the metafield definition.
- Anchor to capabilitiescapabilities•Metafield
Capabilities! non-null The capabilities of the metafield definition.
- Anchor to constraintsconstraints•Metafield
Definition Constraints The constraints that determine what subtypes of resources a metafield definition applies to.
- Anchor to descriptiondescription•String
The description of the metafield definition.
- •ID!non-null
A globally-unique ID.
- •String!non-null
The unique identifier for the metafield definition within its namespace.
- Anchor to metafieldsmetafields•Metafield
Connection! non-null The metafields that belong to the metafield definition.
- Anchor to validationStatusvalidation•Metafield
Status Validation Status Default:ANY Returns the metafields filtered by the validation status.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
Arguments
- Anchor to metafieldsCountmetafields•Int!
Count non-null The count of the metafields that belong to the metafield definition.
- Anchor to validationStatusvalidation•Metafield
Status Validation Status The current validation status.
Arguments
- Anchor to namename•String!non-null
The human-readable name of the metafield definition.
- Anchor to namespacenamespace•String!non-null
The container for a group of metafields that the metafield definition is associated with.
- Anchor to ownerTypeowner•Metafield
Type Owner Type! non-null The resource type that the metafield definition is attached to.
- Anchor to pinnedPositionpinned•Int
Position The position of the metafield definition in the pinned list.
- Anchor to standardTemplatestandard•Standard
Template Metafield Definition Template The standard metafield definition template associated with the metafield definition.
- Anchor to typetype•Metafield
Definition Type! non-null The type of data that each of the metafields that belong to the metafield definition will store. Refer to the list of supported types.
- Anchor to useAsCollectionConditionuse•Boolean!
As Collection Condition non-null Whether the metafield definition can be used as a collection condition.
- Anchor to validationsvalidations•[Metafield
Definition Validation!]! non-null A list of validation options for the metafields that belong to the metafield definition. For example, for a metafield definition with the type
date, you can set a minimum date validation so that each of the metafields that belong to it can only store dates after the specified minimum.- Anchor to validationStatusvalidation•Metafield
Status Definition Validation Status! non-null The validation status for the metafields that belong to the metafield definition.