4 November 2022
GraphQLProduct catalog
You can now organize related Attributes together into Attributes Groups and ease your product data enhancement workflows.
Changes:
- [API] Added Attribute Groups API.
- [API] Added the
view_attribute_groupsandmanage_attribute_groupsOAuth scopes. - [GraphQL API] Added the following types to the GraphQL schema:
AddAttributeGroupAttribute,AttributeGroup,AttributeGroupDraft,AttributeGroupQueryResult,AttributeGroupUpdateAction,ChangeAttributeGroupName,RemoveAttributeGroupAttribute,SetAttributeGroupAttributes,SetAttributeGroupDescription,SetAttributeGroupKey,AttributeReference.
- [GraphQL API] Changed the
Querytype:- Added the
attributeGroupsfield to theQuerytype. - Added the
attributeGroupfield to theQuerytype.
- Added the
- [GraphQL API] Changed the
Mutationtype:- Added the
deleteAttributeGroupfield to theMutationtype. - Added the
updateAttributeGroupfield to theMutationtype. - Added the
createAttributeGroupfield to theMutationtype.
- Added the
The following changes were introduced in terms of GraphQL SDL:
extend type Query {
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
attributeGroup(
"Queries with specified ID"
id: String,
"Queries with specified key"
key: String): AttributeGroup
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
attributeGroups(where: String, sort: [String!], limit: Int, offset: Int): AttributeGroupQueryResult!
}
extend type Mutation {
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
createAttributeGroup(draft: AttributeGroupDraft!): AttributeGroup
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
deleteAttributeGroup(version: Long!,
"Queries with specified ID"
id: String,
"Queries with specified key"
key: String): AttributeGroup
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
updateAttributeGroup(version: Long!, actions: [AttributeGroupUpdateAction!]!,
"Queries with specified ID"
id: String,
"Queries with specified key"
key: String): AttributeGroup
}
input AttributeReferenceInputType {
key: String
}
input AddAttributeGroupAttribute {
attribute: AttributeReference!
}
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
type AttributeGroup implements Versioned {
id: String!
version: Long!
createdAt: DateTime!
lastModifiedAt: DateTime!
name(
"String is defined for different locales. This argument specifies the desired locale."
locale: Locale,
"List of languages the client is able to understand, and which locale variant is preferred."
acceptLanguage: [Locale!]): String
nameAllLocales: [LocalizedString!]!
description(
"String is defined for different locales. This argument specifies the desired locale."
locale: Locale,
"List of languages the client is able to understand, and which locale variant is preferred."
acceptLanguage: [Locale!]): String
descriptionAllLocales: [LocalizedString!]
key: String
attributes: [AttributeReference!]!
createdBy: Initiator
lastModifiedBy: Initiator
}
input AttributeGroupDraft {
name: [LocalizedStringItemInputType!]!
description: [LocalizedStringItemInputType!]
key: String
attributes: [AttributeReferenceInputType!]!
}
type AttributeGroupQueryResult {
offset: Int!
count: Int!
total: Long!
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
exists: Boolean!
results: [AttributeGroup!]!
}
input AttributeGroupUpdateAction {
addAttribute: AddAttributeGroupAttribute
changeName: ChangeAttributeGroupName
removeAttribute: RemoveAttributeGroupAttribute
setDescription: SetAttributeGroupDescription
setKey: SetAttributeGroupKey
setAttributes: SetAttributeGroupAttributes
}
input ChangeAttributeGroupName {
name: [LocalizedStringItemInputType!]!
}
input RemoveAttributeGroupAttribute {
attribute: AttributeReferenceInputType!
}
input SetAttributeGroupAttributes {
attributes: [AttributeReferenceInputType!]!
}
input SetAttributeGroupDescription {
description: [LocalizedStringItemInputType!]
}
input SetAttributeGroupKey {
key: String
}