All Release Notes

Added 'oldSlug' field to CategorySlugChanged and ProductSlugChanged Messages

14 December 2020
Enhancement
MessagesGraphQLProduct Catalog

We added the new field oldSlug to the CategorySlugChangedMessage and ProductSlugChangedMessage that contains the slug as it was before the change. This information makes it easier for you to track changes of your slugs and to implement auto-redirection strategies for those product and category pages that have moved temporarily or permanently. On the GraphQL API you can now also query for the oldSlugAllLocales field of the messages in the fragments CategorySlugChanged and ProductSlugChanged.

  • [API] Added optional field oldSlug to CategorySlugChangedMessage.
  • [API] Added optional field oldSlug to ProductSlugChangedMessage.
  • [GraphQL API] Added the oldSlug and oldSlugAllLocales fields to CategorySlugChanged type of messages query.
  • [GraphQL API] Added the oldSlug and oldSlugAllLocales fields to ProductSlugChanged type to messages query.

The following changes were introduced in terms of GraphQL SDL:

type CategorySlugChanged implements MessagePayload {
slug(
"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
slugAllLocales: [LocalizedString!]!
oldSlug(
"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
oldSlugAllLocales: [LocalizedString!]!
type: String!
}
type ProductSlugChanged implements MessagePayload {
slug(
"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
slugAllLocales: [LocalizedString!]!
oldSlug(
"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
oldSlugAllLocales: [LocalizedString!]!
type: String!
}