All Release Notes

Added Messages GraphQL Query Schema

21 October 2020
Enhancement
GraphQLMessages/Subscriptions

Messages can now be queried using the GraphQL API.

  • [GraphQL API] Added the following types to the GraphQL schema: CategoryCreated, CategorySlugChanged, CustomLineItemStateTransition, CustomerAddressAdded, CustomerAddressChanged, CustomerAddressRemoved, CustomerCompanyNameSet, CustomerCreated, CustomerDateOfBirthSet, CustomerEmailChanged, CustomerEmailVerified, CustomerGroupSet, CustomerPasswordUpdated, DeliveryAdded, DeliveryAddressSet, DeliveryItemsUpdated, DeliveryRemoved, DummyLocalizedString, InventoryEntryCreated, InventoryEntryCreatedContent, InventoryEntryDeleted, InventoryEntryQuantitySet, LineItemStateTransition, Message, MessageId, MessagePayload, MessageQueryResult, OrderBillingAddressSet, OrderCreated, OrderCustomLineItemAdded, OrderCustomLineItemDiscountSet, OrderCustomLineItemQuantityChanged, OrderCustomLineItemRemoved, OrderCustomerEmailSet, OrderCustomerGroupSet, OrderCustomerSet, OrderDeleted, OrderDiscountCodeAdded, OrderDiscountCodeRemoved, OrderDiscountCodeStateSet, OrderEditApplied, OrderImported, OrderLineItemAdded, OrderLineItemDiscountSet, OrderLineItemDistributionChannelSet, OrderLineItemRemoved, OrderPaymentStateChanged, OrderReturnShipmentStateChanged, OrderShipmentStateChanged, OrderShippingAddressSet, OrderShippingInfoSet, OrderShippingRateInputSet, OrderStateChanged, OrderStateTransition, OrderStoreSet, ParcelAddedToDelivery, ParcelItemsUpdated, ParcelMeasurementsUpdated, ParcelRemovedFromDelivery, ParcelTrackingDataUpdated, PaymentCreated, PaymentInteractionAdded, PaymentStatusInterfaceCodeSet, PaymentStatusStateTransition, PaymentTransactionAdded, PaymentTransactionStateChanged, ProductAddedToCategory, ProductCreated, ProductDeleted, ProductImageAdded, ProductPriceDiscountUpdateMessagePayload, ProductPriceDiscountsSet, ProductPriceExternalDiscountSet, ProductProjectionMessagePayload, ProductPublished, ProductRemovedFromCategory, ProductRevertedStagedChanges, ProductSlugChanged, ProductStateTransition, ProductUnpublished, ProductVariantAdded, ProductVariantDeleted, ReferenceId, ReturnInfoAdded, ReviewCreated, ReviewRatingSet, ReviewStateTransition, UserProvidedIdentifiers.
  • [GraphQL API] Changed the Query type:
    • Added the message field to the Query type.
    • Added the messages field to the Query type.

The following changes were introduced in terms of GraphQL SDL:

extend type Query {
message(
"Queries with specified ID"
id: String,
"Queries with specified key"
key: String): Message
messages(where: String, sort: [String!], limit: Int, offset: Int): MessageQueryResult!
}
type CategoryCreated implements MessagePayload {
category: Category!
type: String!
}
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!]!
type: String!
}
type CustomLineItemStateTransition implements MessagePayload {
customLineItemId: String!
transitionDate: DateTime!
quantity: Long!
fromState: State
toState: State
fromStateRef: Reference!
toStateRef: Reference!
type: String!
}
type CustomerAddressAdded implements MessagePayload {
address: Address!
type: String!
}
type CustomerAddressChanged implements MessagePayload {
address: Address!
type: String!
}
type CustomerAddressRemoved implements MessagePayload {
address: Address!
type: String!
}
type CustomerCompanyNameSet implements MessagePayload {
companyName: String
type: String!
}
type CustomerCreated implements MessagePayload {
customer: Customer!
type: String!
}
type CustomerDateOfBirthSet implements MessagePayload {
dateOfBirth: Date
type: String!
}
type CustomerEmailChanged implements MessagePayload {
email: String!
type: String!
}
type CustomerEmailVerified implements MessagePayload {
type: String!
}
type CustomerGroupSet implements MessagePayload {
customerGroup: CustomerGroup
customerGroupRef: Reference
type: String!
}
type CustomerPasswordUpdated implements MessagePayload {
reset: Boolean!
type: String!
}
type DeliveryAdded implements MessagePayload {
delivery: Delivery!
type: String!
}
type DeliveryAddressSet implements MessagePayload {
deliveryId: String!
address: Address
oldAddress: Address
type: String!
}
type DeliveryItemsUpdated implements MessagePayload {
deliveryId: String!
items: [DeliveryItem!]!
oldItems: [DeliveryItem!]!
type: String!
}
type DeliveryRemoved implements MessagePayload {
delivery: Delivery!
type: String!
}
interface DummyLocalizedString {
dummy: String!
}
type InventoryEntryCreated implements MessagePayload {
inventoryEntry: InventoryEntryCreatedContent!
type: String!
}
type InventoryEntryCreatedContent {
inventoryEntryId: String!
sku: String!
quantityOnStock: Long!
restockableInDays: Int
expectedDelivery: DateTime
messageId: MessageId
supplyChannel: Channel
supplyChannelRef: Reference
custom: CustomFieldsType
}
type InventoryEntryDeleted implements MessagePayload {
sku: String!
supplyChannel: Channel
supplyChannelRef: Reference
type: String!
}
type InventoryEntryQuantitySet implements MessagePayload {
oldQuantityOnStock: Long!
newQuantityOnStock: Long!
oldAvailableQuantity: Long!
newAvailableQuantity: Long!
type: String!
}
type LineItemStateTransition implements MessagePayload {
lineItemId: String!
transitionDate: DateTime!
quantity: Long!
fromState: State
toState: State
fromStateRef: Reference!
toStateRef: Reference!
type: String!
}
type Message implements Versioned {
id: String!
type: String!
sequenceNumber: Long!
resourceRef: Reference!
resourceVersion: Long!
userProvidedIdentifiers: UserProvidedIdentifiers
payload: MessagePayload!
version: Long!
createdAt: DateTime!
lastModifiedAt: DateTime!
createdBy: Initiator
lastModifiedBy: Initiator
}
type MessageId {
id: String!
sequenceNumber: Long!
}
interface MessagePayload {
type: String!
}
type MessageQueryResult {
offset: Int!
count: Int!
total: Long!
results: [Message!]!
}
type OrderBillingAddressSet implements MessagePayload {
address: Address
oldAddress: Address
type: String!
}
type OrderCreated implements MessagePayload {
order: Order!
type: String!
}
type OrderCustomLineItemAdded implements MessagePayload {
customLineItem: CustomLineItem!
type: String!
}
type OrderCustomLineItemDiscountSet implements MessagePayload {
customLineItemId: String!
discountedPricePerQuantity: [DiscountedLineItemPriceForQuantity!]!
taxedPrice: TaxedItemPrice
type: String!
}
type OrderCustomLineItemQuantityChanged implements MessagePayload {
customLineItemId: String!
quantity: Long!
oldQuantity: Long
type: String!
}
type OrderCustomLineItemRemoved implements MessagePayload {
customLineItemId: String!
customLineItem: CustomLineItem
type: String!
}
type OrderCustomerEmailSet implements MessagePayload {
email: String
oldEmail: String
type: String!
}
type OrderCustomerGroupSet implements MessagePayload {
customerGroup: CustomerGroup
oldCustomerGroup: CustomerGroup
customerGroupRef: Reference
oldCustomerGroupRef: Reference
type: String!
}
type OrderCustomerSet implements MessagePayload {
customer: Customer
oldCustomer: Customer
customerGroup: CustomerGroup
oldCustomerGroup: CustomerGroup
customerRef: Reference
oldCustomerRef: Reference
customerGroupRef: Reference
oldCustomerGroupRef: Reference
type: String!
}
type OrderDeleted implements MessagePayload {
order: Order
type: String!
}
type OrderDiscountCodeAdded implements MessagePayload {
discountCode: DiscountCode
discountCodeRef: Reference!
type: String!
}
type OrderDiscountCodeRemoved implements MessagePayload {
discountCode: DiscountCode
discountCodeRef: Reference!
type: String!
}
type OrderDiscountCodeStateSet implements MessagePayload {
state: DiscountCodeState!
oldState: DiscountCodeState
discountCode: DiscountCode
discountCodeRef: Reference!
type: String!
}
type OrderEditApplied implements MessagePayload {
result: Applied!
edit: OrderEdit
editRef: Reference!
type: String!
}
type OrderImported implements MessagePayload {
order: Order!
type: String!
}
type OrderLineItemAdded implements MessagePayload {
lineItem: LineItem!
addedQuantity: Long!
type: String!
}
type OrderLineItemDiscountSet implements MessagePayload {
lineItemId: String!
discountedPricePerQuantity: [DiscountedLineItemPriceForQuantity!]!
totalPrice: Money!
taxedPrice: TaxedItemPrice
type: String!
}
type OrderLineItemDistributionChannelSet implements MessagePayload {
lineItemId: String!
distributionChannel: Channel
distributionChannelRef: Reference
type: String!
}
type OrderLineItemRemoved implements MessagePayload {
lineItemId: String!
removedQuantity: Long!
newQuantity: Long!
newState: Set!
newTotalPrice: Money!
newTaxedPrice: TaxedItemPrice
newPrice: ProductPrice
newShippingDetails: ItemShippingDetails
type: String!
}
type OrderPaymentStateChanged implements MessagePayload {
paymentState: PaymentState!
oldPaymentState: PaymentState
type: String!
}
type OrderReturnShipmentStateChanged implements MessagePayload {
returnItemId: String!
returnShipmentState: ReturnShipmentState!
type: String!
}
type OrderShipmentStateChanged implements MessagePayload {
shipmentState: ShipmentState!
oldShipmentState: ShipmentState
type: String!
}
type OrderShippingAddressSet implements MessagePayload {
address: Address
oldAddress: Address
type: String!
}
type OrderShippingInfoSet implements MessagePayload {
shippingInfo: ShippingInfo
oldShippingInfo: ShippingInfo
type: String!
}
type OrderShippingRateInputSet implements MessagePayload {
shippingRateInput: ShippingRateInput
oldShippingRateInput: ShippingRateInput
type: String!
}
type OrderStateChanged implements MessagePayload {
orderId: String!
orderState: OrderState!
oldOrderState: OrderState
type: String!
}
type OrderStateTransition implements MessagePayload {
force: Boolean!
state: State
oldState: State
stateRef: Reference!
oldStateRef: Reference
type: String!
}
type OrderStoreSet implements MessagePayload {
store: Store
oldStore: Store
storeRef: KeyReference
oldStoreRef: KeyReference
type: String!
}
type ParcelAddedToDelivery implements MessagePayload {
delivery: Delivery!
parcel: Parcel!
type: String!
}
type ParcelItemsUpdated implements MessagePayload {
deliveryId: String!
parcelId: String!
items: [DeliveryItem!]!
oldItems: [DeliveryItem!]!
type: String!
}
type ParcelMeasurementsUpdated implements MessagePayload {
deliveryId: String!
parcelId: String!
measurements: ParcelMeasurements
type: String!
}
type ParcelRemovedFromDelivery implements MessagePayload {
deliveryId: String!
parcel: Parcel!
type: String!
}
type ParcelTrackingDataUpdated implements MessagePayload {
deliveryId: String!
parcelId: String!
trackingData: TrackingData
type: String!
}
type PaymentCreated implements MessagePayload {
payment: Payment!
type: String!
}
type PaymentInteractionAdded implements MessagePayload {
interaction: CustomFieldsType!
type: String!
}
type PaymentStatusInterfaceCodeSet implements MessagePayload {
paymentId: String!
interfaceCode: String
type: String!
}
type PaymentStatusStateTransition implements MessagePayload {
force: Boolean!
state: State
stateRef: Reference
type: String!
}
type PaymentTransactionAdded implements MessagePayload {
transaction: Transaction!
type: String!
}
type PaymentTransactionStateChanged implements MessagePayload {
transactionId: String!
state: TransactionState!
type: String!
}
type ProductAddedToCategory implements MessagePayload {
category: ReferenceId!
staged: Boolean!
type: String!
}
type ProductCreated implements MessagePayload {
productProjection: ProductProjectionMessagePayload!
type: String!
}
type ProductDeleted implements MessagePayload {
removedImageUrls: Set!
currentProjection: ProductProjectionMessagePayload
type: String!
}
type ProductImageAdded implements MessagePayload {
variantId: Int!
image: Image!
staged: Boolean!
type: String!
}
type ProductPriceDiscountUpdateMessagePayload {
variantId: Int!
variantKey: String
sku: String
priceId: String!
discounted: DiscountedProductPriceValue
staged: Boolean!
}
type ProductPriceDiscountsSet implements MessagePayload {
updatedPrices: [ProductPriceDiscountUpdateMessagePayload!]!
type: String!
}
type ProductPriceExternalDiscountSet implements MessagePayload {
variantId: Int!
variantKey: String
sku: String
priceId: String!
discounted: DiscountedProductPriceValue
staged: Boolean!
type: String!
}
type ProductProjectionMessagePayload {
id: String!
version: Long!
createdAt: DateTime!
lastModifiedAt: DateTime!
productTypeRef: Reference!
productType: ProductTypeDefinition
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!]
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!]!
categoryOrderHints: [CategoryOrderHint!]!
categoriesRef: [Reference!]!
categories: [Category!]!
searchKeywords: [SearchKeywords!]!
metaTitle(
"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
metaTitleAllLocales: [LocalizedString!]
metaKeywords(
"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
metaKeywordsAllLocales: [LocalizedString!]
metaDescription(
"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
metaDescriptionAllLocales: [LocalizedString!]
hasStagedChanges: Boolean!
published: Boolean!
masterData: ProductVariant!
variants: [ProductVariant!]!
taxCategoryRef: Reference
taxCategory: TaxCategory
stateRef: Reference
state: State
reviewRatingStatistics: ReviewRatingStatistics
}
type ProductPublished implements MessagePayload {
productProjection: ProductProjectionMessagePayload!
removedImageUrls: [String!]!
scope: PublishScope!
type: String!
}
type ProductRemovedFromCategory implements MessagePayload {
category: ReferenceId!
staged: Boolean!
type: String!
}
type ProductRevertedStagedChanges implements MessagePayload {
removedImageUrls: Set!
type: String!
}
type ProductSlugChanged implements MessagePayload {
slug: DummyLocalizedString!
type: String!
}
type ProductStateTransition implements MessagePayload {
force: Boolean!
state: State
stateRef: Reference!
type: String!
}
type ProductUnpublished implements MessagePayload {
type: String!
}
type ProductVariantAdded implements MessagePayload {
variant: ProductVariant!
staged: Boolean!
type: String!
}
type ProductVariantDeleted implements MessagePayload {
removedImageUrls: Set!
variant: ProductVariant
type: String!
}
type ReferenceId {
typeId: String!
id: String!
}
type ReturnInfoAdded implements MessagePayload {
returnInfo: ReturnInfo!
type: String!
}
type ReviewCreated implements MessagePayload {
review: Review!
type: String!
}
type ReviewRatingSet implements MessagePayload {
oldRating: Int
newRating: Int
includedInStatistics: Boolean!
target: ReviewTarget
targetRef: Reference
type: String!
}
type ReviewStateTransition implements MessagePayload {
oldIncludedInStatistics: Boolean!
newIncludedInStatistics: Boolean!
force: Boolean!
target: ReviewTarget
oldState: State
newState: State
targetRef: Reference
oldStateRef: Reference
newStateRef: Reference!
type: String!
}
type UserProvidedIdentifiers {
key: String
orderNumber: String
customerNumber: String
externalId: String
sku: String
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!]
}