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 @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
The ID of the product type.
ProductType.privateMetadata
● [MetadataItem!]!
non-null object
List of private metadata items. Requires staff permissions to access.
ProductType.privateMetafield
● String
scalar
A single key from private metadata. Requires staff permissions to access.
Tip: Use GraphQL aliases to fetch multiple keys.
Added in Saleor 3.3
ProductType.privateMetafield.key
●String!
non-null scalar
ProductType.privateMetafields
● Metadata
scalar
Private metadata. Requires staff permissions to access. Use
Added in Saleor 3.3keys
to control which fields you want to include. The default is to include everything.
ProductType.privateMetafields.keys
●[String!]
list scalar
ProductType.metadata
● [MetadataItem!]!
non-null object
List of public metadata items. Can be accessed without permissions.
ProductType.metafield
● String
scalar
A single key from public metadata.
Tip: Use GraphQL aliases to fetch multiple keys.
Added in Saleor 3.3
ProductType.metafield.key
●String!
non-null scalar
ProductType.metafields
● Metadata
scalar
Public metadata. Use
Added in Saleor 3.3keys
to control which fields you want to include. The default is to include everything.
ProductType.metafields.keys
●[String!]
list scalar
ProductType.name
● String!
non-null scalar
Name of the product type.
ProductType.slug
● String!
non-null scalar
Slug of the product type.
ProductType.hasVariants
● Boolean!
non-null scalar
Whether the product type has variants.
ProductType.isShippingRequired
● Boolean!
non-null scalar
Whether shipping is required for this product type.