customAttributeMetadata
customAttributeMetadata is a Magento 2 GraphQL query in the Eav module. Return the attribute type, given an attribute code and entity type. It returns CustomAttributeMetadata and is callable anonymously.
Deprecated: Use `customAttributeMetadataV2` query instead.
Last verified: against Magento 2.4.9.
Returns
Resolver class
Magento\EavGraphQl\Model\Resolver\CustomAttributeMetadata
Cache
identity: Magento\EavGraphQl\Model\Resolver\Cache\CustomAttributeMetadataIdentity
Arguments
An input object that specifies the attribute code and entity type to search.
Example request
Auto-generated from the SDL — paste-ready against your store's /graphql endpoint. Replace the host, store code, and any required values before running.
Headers
Query
query ($attributes: [AttributeInput!]!) {
customAttributeMetadata(attributes: $attributes) {
items {
attribute_code
entity_type
attribute_type
input_type
attribute_options {
label
value
}
storefront_properties {
use_in_product_listing
position
visible_on_catalog_pages
use_in_layered_navigation
use_in_search_results_layered_navigation
}
}
}
}Variables
{
"attributes": [
{}
]
}Related in EavGraphQl
Other fields shipped by the same module.
attributesForm
Retrieve EAV attributes associated to a frontend form. Use countries query provided by DirectoryGraphQl module to retrieve region_id and country_id attribute options.
Eav · returns AttributesFormOutput!
attributesList
Returns a list of attributes metadata for a given entity type.
Eav · returns AttributesMetadataOutput
customAttributeMetadataV2
Retrieve EAV attributes metadata.
Eav · returns AttributesMetadataOutput!
Every Magento dev tool, in one hosted workspace.
Free to sign up. Nothing to install. Drafts, audits, and projects saved across every tool.