Skip to main content
objectRelationDefinition

Fields

createdAt

When the relation definition was created (UTC).

createdByUser

Id of the user who created the relation definition.

description
String

Free-text note about the relation definition.

displayCategory

Display hint for clients such as Studio. See RelationDisplayCategory.

Endpoints whose live or pending content follows the relation definition.

Arguments
after
String

Returns the elements in the list that come after the specified cursor.

first
Int

Returns the first n elements from the list.

id
ID!

Global id of the relation definition: base64 of RelationDefinition:<raw id>. relationDefinitionById and the update, delete and restore mutations take it. The raw id (e.g. productAccessories) is what relationDefinitions(where: { id }), RelationsCriteriaInput.relationDefinitionId and endpoint content selections use.

inUse
Boolean!

True if an endpoint or a segment uses the relation definition. While it's true, deleteRelationDefinition fails.

isDeleted
Boolean!

True if the relation definition is archived. relationDefinitions returns archived ones too and can't filter on this field, so check it in the results. restoreRelationDefinition restores it.

lastModified

When the relation definition last changed (UTC).

lastModifiedByUser

Id of the user who last changed the relation definition.

name
String!

Name of the relation definition.

relationDefinitionStatus

State of the relation definition. See RelationDefinitionStatus.

Segments whose criteria include a relations criterion for the relation definition.

Arguments
after
String

Returns the elements in the list that come after the specified cursor.

before
String

Returns the elements in the list that come before the specified cursor.

first
Int

Returns the first n elements from the list.

last
Int

Returns the last n elements from the list.

sourceCardDefinition

Source card definition.

sourceCardDefinitionId
ID!

Global id of the source card definition (CardDefinition.id).

sourceCriteria

Criteria on the source side, as a JSON list of objects, each with an operator. Exactly one dynamic item, in sourceCriteria or targetCriteria, links the cards: {"operator":"dynamic","sourcePropertyId":"sku","targetPropertyId":"parentSku"} relates a source card to the target cards whose parentSku matches its sku. Other items use the search criteria shapes (e.g. equals) with source card property ids, and filter the source cards when the relation is followed from a target card.

sourceCriteriaPropertyIds
[String!]!

Card property ids of the source card definition that the criteria use: the dynamic item's sourcePropertyId and the property ids of the filters in sourceCriteria.

sourceRelationDisplayName
String

Label for the relation on the source side (e.g. Accessories). Null when not set.

tags
[String!]!

Labels for grouping and filtering relation definitions.

targetCardDefinition

Target card definition.

targetCardDefinitionId
ID!

Global id of the target card definition (CardDefinition.id).

targetCriteria

Criteria on the target side, same shape as sourceCriteria. Items other than the dynamic one filter the target cards a source card is related to, by target card property id. Example: [{"operator":"equals","propertyId":"status","values":["Active"],"invert":false}] keeps only target cards whose status is Active.

targetCriteriaPropertyIds
[String!]!

Card property ids of the target card definition that the criteria use: the dynamic item's targetPropertyId and the property ids of the filters in targetCriteria.

targetRelationDisplayName
String

Label for the relation on the target side (e.g. Accessory of). Null when not set.

targetRelationOrderByProperty
String
deprecated
Target relation order by property should be set via TargetRelationSortingConfiguration using SortingType = BasedOnTargetProperty
targetRelationSortingConfiguration

How the target cards related to a source card are ordered. Null = no order set.

tenantId

Id of the tenant that owns the item.