ProductMedia
Represents a product media.
type ProductMedia 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
sortOrder: Int
alt: String!
type: ProductMediaType!
oembedData: JSONString!
url(size: Int, format: ThumbnailFormatEnum = ORIGINAL): String!
productId: ID
}
Fields
ProductMedia.id ● ID! non-null scalar miscellaneous
The unique ID of the product media.
ProductMedia.privateMetadata ● [MetadataItem!]! non-null object miscellaneous
List of private metadata items. Requires staff permissions to access.
Added in Saleor 3.12
ProductMedia.privateMetafield ● String scalar miscellaneous
A single key from private metadata. Requires staff permissions to access.
Tip: Use GraphQL aliases to fetch multiple keys.
Added in Saleor 3.12
ProductMedia.privateMetafield.key●String!non-null scalar miscellaneous
ProductMedia.privateMetafields ● Metadata scalar miscellaneous
Private metadata. Requires staff permissions to access. Use
Added in Saleor 3.12keysto control which fields you want to include. The default is to include everything.
ProductMedia.privateMetafields.keys●[String!]list scalar miscellaneous
ProductMedia.metadata ● [MetadataItem!]! non-null object miscellaneous
List of public metadata items. Can be accessed without permissions.
Added in Saleor 3.12
ProductMedia.metafield ● String scalar miscellaneous
A single key from public metadata.
Tip: Use GraphQL aliases to fetch multiple keys.
Added in Saleor 3.12
ProductMedia.metafield.key●String!non-null scalar miscellaneous
ProductMedia.metafields ● Metadata scalar miscellaneous
Public metadata. Use
Added in Saleor 3.12keysto control which fields you want to include. The default is to include everything.
ProductMedia.metafields.keys●[String!]list scalar miscellaneous
ProductMedia.sortOrder ● Int scalar miscellaneous
The sort order of the media.
ProductMedia.alt ● String! non-null scalar miscellaneous
The alt text of the media.
ProductMedia.type ● ProductMediaType! non-null enum products
The type of the media.
ProductMedia.oembedData ● JSONString! non-null scalar miscellaneous
The oEmbed data of the media.
ProductMedia.url ● String! non-null scalar miscellaneous
The URL of the media.
ProductMedia.url.size●Intscalar miscellaneousDesired longest side the image in pixels. Defaults to 4096. Images are never cropped. Pass 0 to retrieve the original size (not recommended).
ProductMedia.url.format ● ThumbnailFormatEnum enum miscellaneous
The format of the image. When not provided, format of the original image will be used.
Added in Saleor 3.6
ProductMedia.productId ● ID scalar miscellaneous
Product id the media refers to.
Added in Saleor 3.12
Interfaces
Node interface miscellaneous
An object with an ID
ObjectWithMetadata interface miscellaneous
Member Of
Product object ● ProductMediaCreate object ● ProductMediaCreated object ● ProductMediaDelete object ● ProductMediaDeleted object ● ProductMediaReorder object ● ProductMediaUpdate object ● ProductMediaUpdated object ● ProductVariant object ● VariantMediaAssign object ● VariantMediaUnassign object
Implemented By
_Entity union