14 July 2025
GraphQLExtensibility
GraphQL queries now support Reference Expansion for references within Custom Objects in public beta.
For more details and usage examples, see the GraphQL Custom Objects section of our reference documentation.
Changes:
- [GraphQL API] Added the following types to the GraphQL schema:
ReferencedResource
- [GraphQL API] Changed the
CustomObject
type:- Added the
referencedResources
field to theCustomObject
type.
- Added the
The following changes were introduced in terms of GraphQL SDL:
extend type CustomObject {
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
referencedResources(expand: [String!]): [ReferencedResource!]
}
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
type ReferencedResource {
path: String!
objs: [ReferenceExpandable!]
}