Skip to main content
Version: 3.x

ProductType

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
taxType: TaxType
variantAttributes(variantSelection: VariantAttributeScope): [Attribute!]
assignedVariantAttributes(
variantSelection: VariantAttributeScope
): [AssignedVariantAttribute!]
productAttributes: [Attribute!]
availableAttributes(
filter: AttributeFilterInput
before: String
after: String
first: Int
last: Int
): AttributeCountableConnection
}

Fields

id (ID!)

privateMetadata ([MetadataItem!]!)

List of private metadata items. Requires staff permissions to access.

privateMetafield (String)

A single key from private metadata. Requires staff permissions to access.

Tip: Use GraphQL aliases to fetch multiple keys.

Added in Saleor 3.3.

Note: this API is currently in Feature Preview and can be subject to changes at later point.

privateMetafields (Metadata)

Private metadata. Requires staff permissions to access. Use keys to control which fields you want to include. The default is to include everything.

Added in Saleor 3.3.

Note: this API is currently in Feature Preview and can be subject to changes at later point.

metadata ([MetadataItem!]!)

List of public metadata items. Can be accessed without permissions.

metafield (String)

A single key from public metadata.

Tip: Use GraphQL aliases to fetch multiple keys.

Added in Saleor 3.3.

Note: this API is currently in Feature Preview and can be subject to changes at later point.

metafields (Metadata)

Public metadata. Use keys to control which fields you want to include. The default is to include everything.

Added in Saleor 3.3.

Note: this API is currently in Feature Preview and can be subject to changes at later point.

name (String!)

slug (String!)

hasVariants (Boolean!)

isShippingRequired (Boolean!)

isDigital (Boolean!)

weight (Weight)

kind (ProductTypeKindEnum!)

The product type kind.

products (ProductCountableConnection)

List of products of this type.

Slug of a channel for which the data should be returned.

Return the elements in the list that come before the specified cursor.

Return the elements in the list that come after the specified cursor.

Return the first n elements from the list.

Return the last n elements from the list.

taxType (TaxType)

A type of tax. Assigned by enabled tax gateway

variantAttributes ([Attribute!])

Variant attributes of that product type.

Define scope of returned attributes.

assignedVariantAttributes ([AssignedVariantAttribute!])

Variant attributes of that product type with attached variant selection.

Added in Saleor 3.1.

Define scope of returned attributes.

productAttributes ([Attribute!])

Product attributes of that product type.

availableAttributes (AttributeCountableConnection)

List of attributes which can be assigned to this product type.

Requires one of the following permissions: MANAGE_PRODUCTS.

Return the elements in the list that come before the specified cursor.

Return the elements in the list that come after the specified cursor.

Return the first n elements from the list.

Return the last n elements from the list.

Interfaces

Node

An object with an ID

ObjectWithMetadata