ProductType Object
Represents a type of product. It defines what attributes are available to products of this type.
type ProductType 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
name: String!
slug: String!
hasVariants: Boolean!
isShippingRequired: Boolean!
isDigital: Boolean!
weight: Weight
kind: ProductTypeKindEnum!
products(
channel: String
before: String
after: String
first: Int
last: Int
): ProductCountableConnection @deprecated
taxType: TaxType @deprecated
taxClass: TaxClass
variantAttributes(
variantSelection: VariantAttributeScope
): [Attribute!] @deprecated
assignedVariantAttributes(
variantSelection: VariantAttributeScope
): [AssignedVariantAttribute!]
productAttributes: [Attribute!]
availableAttributes(
filter: AttributeFilterInput
where: AttributeWhereInput
before: String
after: String
first: Int
last: Int
): AttributeCountableConnection
}
Fields
ProductType.id ● ID! non-null scalar miscellaneous
The ID of the product type.
ProductType.privateMetadata ● [MetadataItem!]! non-null object miscellaneous
List of private metadata items. Requires staff permissions to access.
ProductType.privateMetafield ● String scalar miscellaneous
A single key from private metadata. Requires staff permissions to access.
Tip: Use GraphQL aliases to fetch multiple keys.
ProductType.privateMetafield.key ● String! non-null scalar miscellaneous
ProductType.privateMetafields ● Metadata scalar miscellaneous
Private metadata. Requires staff permissions to access. Use keys to control which fields you want to include. The default is to include everything.
ProductType.privateMetafields.keys ● [String!] list scalar miscellaneous
ProductType.metadata ● [MetadataItem!]! non-null object miscellaneous
List of public metadata items. Can be accessed without permissions.
ProductType.metafield ● String scalar miscellaneous
A single key from public metadata.
Tip: Use GraphQL aliases to fetch multiple keys.
ProductType.metafield.key ● String! non-null scalar miscellaneous
ProductType.metafields ● Metadata scalar miscellaneous
Public metadata. Use keys to control which fields you want to include. The default is to include everything.
ProductType.metafields.keys ● [String!] list scalar miscellaneous
ProductType.name ● String! non-null scalar miscellaneous
Name of the product type.
ProductType.slug ● String! non-null scalar miscellaneous
Slug of the product type.
ProductType.hasVariants ● Boolean! non-null scalar miscellaneous
Whether the product type has variants.
ProductType.isShippingRequired ● Boolean! non-null scalar miscellaneous
Whether shipping is required for this product type.
ProductType.isDigital ● Boolean! non-null scalar miscellaneous
Whether the product type is digital.
ProductType.weight ● Weight object miscellaneous
Weight of the product type.
ProductType.kind ● ProductTypeKindEnum! non-null enum products
The product type kind.
ProductType.products ● ProductCountableConnection deprecated object products
This field will be removed in Saleor 4.0. Use the top-level products query with the productTypes filter.
List of products of this type.
ProductType.products.channel ● String scalar miscellaneous
Slug of a channel for which the data should be returned.
ProductType.products.before ● String scalar miscellaneous
Return the elements in the list that come before the specified cursor.
ProductType.products.after ● String scalar miscellaneous
Return the elements in the list that come after the specified cursor.
ProductType.products.first ● Int scalar miscellaneous
Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
ProductType.products.last ● Int scalar miscellaneous
Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
ProductType.taxType ● TaxType deprecated object taxes
This field will be removed in Saleor 4.0. Use taxClass field instead.
A type of tax. Assigned by enabled tax gateway
ProductType.taxClass ● TaxClass object taxes
Tax class assigned to this product type. All products of this product type use this tax class, unless it's overridden in the Product type.
ProductType.variantAttributes ● [Attribute!] deprecated list object attributes
This field will be removed in Saleor 4.0. Use assignedVariantAttributes instead.
Variant attributes of that product type.
ProductType.variantAttributes.variantSelection ● VariantAttributeScope enum products
Define scope of returned attributes.
ProductType.assignedVariantAttributes ● [AssignedVariantAttribute!] list object attributes
Variant attributes of that product type with attached variant selection.
ProductType.assignedVariantAttributes.variantSelection ● VariantAttributeScope enum products
Define scope of returned attributes.
ProductType.productAttributes ● [Attribute!] list object attributes
Product attributes of that product type.
ProductType.availableAttributes ● AttributeCountableConnection object attributes
List of attributes which can be assigned to this product type.
ProductType.availableAttributes.filter ● AttributeFilterInput input attributes
ProductType.availableAttributes.where ● AttributeWhereInput input attributes
ProductType.availableAttributes.before ● String scalar miscellaneous
Return the elements in the list that come before the specified cursor.
ProductType.availableAttributes.after ● String scalar miscellaneous
Return the elements in the list that come after the specified cursor.
ProductType.availableAttributes.first ● Int scalar miscellaneous
Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
ProductType.availableAttributes.last ● Int scalar miscellaneous
Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
Interfaces
Node interface miscellaneous
An object with an ID
ObjectWithMetadata interface miscellaneous
Returned By
productType query
Member Of
Product object ● ProductAttributeAssign object ● ProductAttributeAssignmentUpdate object ● ProductAttributeUnassign object ● ProductTypeCountableEdge object ● ProductTypeCreate object ● ProductTypeDelete object ● ProductTypeReorderAttributes object ● ProductTypeUpdate object
Implemented By
_Entity union