Attribute
Custom attribute of a product. Attributes can be assigned to products and variants at the product type level.
type Attribute implements Node, ObjectWithMetadata {
id: ID!
externalId: String
externalSource: String
productTypes(
offset: Int
before: String
after: String
first: Int
last: Int
): ProductTypeCountableConnection!
productVariantTypes(
offset: Int
before: String
after: String
first: Int
last: Int
): ProductTypeCountableConnection!
isLocked: Boolean!
privateMetadata: [MetadataItem!]!
metadata: [MetadataItem!]!
inputType: AttributeInputTypeEnum!
name: String!
slug: String!
allProductTypes: [ProductType!]!
values: [AttributeValue!]!
valueRequired: Boolean!
visibleInStorefront: Boolean!
filterableInStorefront: Boolean!
filterableInDashboard: Boolean!
availableInGrid: Boolean!
storefrontSearchPosition: Int!
createdBy: Seller
warnings: [AttributeWarningMessageItem!]!
}
Fields
Attribute.id ● ID! non-null scalar
The ID of the object
Attribute.externalId ● String scalar
Attribute.externalSource ● String scalar
Attribute.productTypes ● ProductTypeCountableConnection! non-null object
Attribute.productTypes.offset ● Int scalar
Attribute.productTypes.before ● String scalar
Attribute.productTypes.after ● String scalar
Attribute.productTypes.first ● Int scalar
Attribute.productTypes.last ● Int scalar
Attribute.productVariantTypes ● ProductTypeCountableConnection! non-null object
Attribute.productVariantTypes.offset ● Int scalar
Attribute.productVariantTypes.before ● String scalar
Attribute.productVariantTypes.after ● String scalar
Attribute.productVariantTypes.first ● Int scalar
Attribute.productVariantTypes.last ● Int scalar
Attribute.isLocked ● Boolean! non-null scalar
Attribute.privateMetadata ● [MetadataItem!]! non-null object
List of private metadata items.Requires proper staff permissions to access.
Attribute.metadata ● [MetadataItem!]! non-null object
List of public metadata items. Can be accessed without permissions.
Attribute.inputType ● AttributeInputTypeEnum! non-null enum
The input type to use for entering attribute values in the dashboard.
Attribute.name ● String! non-null scalar
Name of an attribute displayed in the interface.
Attribute.slug ● String! non-null scalar
Internal representation of an attribute name.
Attribute.allProductTypes ● [ProductType!]! non-null object
List of all product types that are using this attribute
Attribute.values ● [AttributeValue!]! non-null object
List of attribute's values.
Attribute.valueRequired ● Boolean! non-null scalar
Whether the attribute requires values to be passed or not.
Attribute.visibleInStorefront ● Boolean! non-null scalar
Whether the attribute should be visible or not in storefront.
Attribute.filterableInStorefront ● Boolean! non-null scalar
Whether the attribute can be filtered in storefront.
Attribute.filterableInDashboard ● Boolean! non-null scalar
Whether the attribute can be filtered in dashboard.
Attribute.availableInGrid ● Boolean! non-null scalar
Whether the attribute can be displayed in the admin product list.
Attribute.storefrontSearchPosition ● Int! non-null scalar
The position of the attribute in the storefront navigation (0 by default).
Attribute.createdBy ● Seller object
ID of the Seller that created the Product Type, or null if Marketplace Operator
Attribute.warnings ● [AttributeWarningMessageItem!]! non-null object
List of warnings for this attribute.
Interfaces
Node interface
An object with an ID
ObjectWithMetadata interface
Returned By
attribute query
Member Of
AttributeCountableEdge object ● AttributeCreate object ● AttributeDelete object ● AttributeUpdate object ● AttributeValue object ● AttributeValueCreate object ● AttributeValueDelete object ● AttributeValuesReorder object ● AttributeValueUpdate object ● CustomFieldTemplate object ● Product object ● ProductType object ● SelectedAttribute object