AttributeCreateInput Input Type
Represents an input for create of attribute.
NOTE: Deprecated fields filterableInStorefront, storefrontSearchPosition and availableInGrid are not supported in bulk mutations: attributeBulkCreate, attributeBulkUpdate.
input AttributeCreateInput {
inputType: AttributeInputTypeEnum
entityType: AttributeEntityTypeEnum
name: String!
slug: String
type: AttributeTypeEnum!
unit: MeasurementUnitsEnum
values: [AttributeValueCreateInput!]
valueRequired: Boolean
isVariantOnly: 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.")
storefrontSearchPosition: Int @deprecated(reason: "This flag is not used by Saleor. Keep the logic in the storefront 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.")
externalReference: String
referenceTypes: [ID!]
}
Fields
inputType
inputType · AttributeInputTypeEnum
The input type to use for entering attribute values in the dashboard.
entityType
entityType · AttributeEntityTypeEnum
The entity type which can be used as a reference.
name
name · String!
Name of an attribute displayed in the interface.
slug
slug · String
Internal representation of an attribute name.
type
type · AttributeTypeEnum!
The attribute type.
unit
unit · MeasurementUnitsEnum
The unit of attribute values.
values
values · [AttributeValueCreateInput!]
List of attribute’s values.
valueRequired
valueRequired · Boolean
Whether the attribute requires values to be passed or not.
isVariantOnly
isVariantOnly · Boolean
Whether the attribute is for variants only.
visibleInStorefront
visibleInStorefront · Boolean
Whether the attribute should be visible or not in storefront.
filterableInStorefront
filterableInStorefront · Boolean
Whether the attribute can be filtered in storefront.
filterableInDashboard
filterableInDashboard · Boolean
Whether the attribute can be filtered in dashboard.
storefrontSearchPosition
storefrontSearchPosition · Int
The position of the attribute in the storefront navigation (0 by default).
availableInGrid
availableInGrid · Boolean
Whether the attribute can be displayed in the admin product list.
externalReference
externalReference · String
External ID of this attribute.
referenceTypes
referenceTypes · [ID!]
Specifies reference types to narrow down the choices of reference objects. Applicable only for REFERENCE and SINGLE_REFERENCE attributes with PRODUCT, PRODUCT_VARIANT and PAGE entity types. Accepts ProductType IDs for PRODUCT and PRODUCT_VARIANT entity types, and PageType IDs for PAGE entity type. If omitted, all objects of the selected entity type are available as attribute values.
A maximum of 100 reference types can be specified.
Added in Saleor 3.22Used by
Schema: Saleor 3.23.43. Download SDL.