All Release Notes

Added Reference Expansion for Custom Fields in the GraphQL API

18 March 2022
Enhancement
GraphQL

Reference Expansion for Custom Fields of CustomFieldReferenceType (as well as for the CustomFieldSetType of it) is now supported in the GraphQL API.
We appreciate your feedback on this new in public beta feature; for an example query, please refer to the respective section in the GraphQL API documentation.

Changes:

  • [GraphQL API] Changed the RawCustomField type:
    • Added the referencedResourceSet field to the RawCustomField type.
    • Added the referencedResource field to the RawCustomField type.
  • [GraphQL API] Changed the Cart type:
    • Cart object type now implements ReferenceExpandable interface
  • [GraphQL API] Changed the CartDiscount type:
    • CartDiscount object type now implements ReferenceExpandable interface
  • [GraphQL API] Changed the Category type:
    • Category object type now implements ReferenceExpandable interface
  • [GraphQL API] Changed the Channel type:
    • Channel object type now implements ReferenceExpandable interface
  • [GraphQL API] Changed the Customer type:
    • Customer object type now implements ReferenceExpandable interface
  • [GraphQL API] Changed the CustomerGroup type:
    • CustomerGroup object type now implements ReferenceExpandable interface
  • [GraphQL API] Changed the CustomObject type:
    • CustomObject object type now implements ReferenceExpandable interface
  • [GraphQL API] Changed the DiscountCode type:
    • DiscountCode object type now implements ReferenceExpandable interface
  • [GraphQL API] Changed the Extension type:
    • Extension object type now implements ReferenceExpandable interface
  • [GraphQL API] Changed the InventoryEntry type:
    • InventoryEntry object type now implements ReferenceExpandable interface
  • [GraphQL API] Changed the Message type:
    • Message object type now implements ReferenceExpandable interface
  • [GraphQL API] Changed the Order type:
    • Order object type now implements ReferenceExpandable interface
  • [GraphQL API] Changed the Product type:
    • Product object type now implements ReferenceExpandable interface
  • [GraphQL API] Changed the ProductDiscount type:
    • ProductDiscount object type now implements ReferenceExpandable interface
  • [GraphQL API] Changed the ProductTypeDefinition type:
    • ProductTypeDefinition object type now implements ReferenceExpandable interface
  • [GraphQL API] Changed the Review type:
    • Review object type now implements ReferenceExpandable interface
  • [GraphQL API] Changed the ShippingMethod type:
    • ShippingMethod object type now implements ReferenceExpandable interface
  • [GraphQL API] Changed the ShoppingList type:
    • ShoppingList object type now implements ReferenceExpandable interface
  • [GraphQL API] Changed the State type:
    • State object type now implements ReferenceExpandable interface
  • [GraphQL API] Changed the Store type:
    • Store object type now implements ReferenceExpandable interface
  • [GraphQL API] Changed the TaxCategory type:
    • TaxCategory object type now implements ReferenceExpandable interface
  • [GraphQL API] Changed the TypeDefinition type:
    • TypeDefinition object type now implements ReferenceExpandable interface
  • [GraphQL API] Changed the Zone type:
    • Zone object type now implements ReferenceExpandable interface

The following changes were introduced in terms of GraphQL SDL:

extend type RawCustomField {
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
referencedResource: ReferenceExpandable
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
referencedResourceSet: [ReferenceExpandable!]!
}
interface ReferenceExpandable {
id: String!
}