attribute Query
Look up an attribute by ID, slug or external reference.
attribute(id: ID, slug: String, externalReference: String): Attribute
Returns
Show return type
type Attribute implements Node & ObjectWithMetadata {
id: ID!
privateMetadata: [MetadataItem!]!
privateMetafield(key: String!): String
privateMetafields(keys: [String!]): Metadata
metadata: [MetadataItem!]!
metafield(key: String!): String
metafields(keys: [String!]): Metadata
inputType: AttributeInputTypeEnum
entityType: AttributeEntityTypeEnum
referenceTypes(limit: PositiveInt = 100): [ReferenceType!]
name: String!
slug: String!
type: AttributeTypeEnum!
unit: MeasurementUnitsEnum
choices(sortBy: AttributeChoicesSortingInput, filter: AttributeValueFilterInput @deprecated(reason: "Use `where` filter instead."), where: AttributeValueWhereInput, search: String, before: String, after: String, first: Int, last: Int): AttributeValueCountableConnection
valueRequired: Boolean!
visibleInStorefront: Boolean!
filterableInStorefront: Boolean! @deprecated(reason: "This flag is not used by Saleor. Keep the logic in the storefront or use `Attribute` metadata instead.")
filterableInDashboard: Boolean! @deprecated(reason: "This flag is not used by Saleor. Keep the logic in the dashboard or use `Attribute` metadata instead.")
availableInGrid: Boolean! @deprecated(reason: "This flag is not used by Saleor. Keep the logic in the storefront or use `Attribute` metadata instead.")
storefrontSearchPosition: Int! @deprecated(reason: "This flag is not used by Saleor. Keep the logic in the storefront or use `Attribute` metadata instead.")
translation(languageCode: LanguageCodeEnum!): AttributeTranslation
withChoices: Boolean!
productTypes(before: String, after: String, first: Int, last: Int): ProductTypeCountableConnection!
productVariantTypes(before: String, after: String, first: Int, last: Int): ProductTypeCountableConnection!
externalReference: String
}Arguments
id
id · ID
ID of the attribute.
slug
slug · String
Slug of the attribute.
externalReference
externalReference · String
External ID of the attribute.
Schema: Saleor 3.23.43. Download SDL.