Skip to main content

Hi Community,

For a catalog item you can add one or more linked instances (other catalog items). With a Desktop plan I would like to make visible which linked catalog items exist, but I cannot find an object in the metadata model that reflects the linked instances.

Does anyone have an idea which metadata entity I should use?

Kind regards,

Albert

Hello Albert,

 

I tried creating a linked instance using the UI and checked the graphql in the developer tools:

mutation CreateAndPublishEntity_catalogItemGroup($parentNode: String!, $parentGid: GID!, $parentProperty: String!, $new: catalogItemGroupNew!) {
catalogItemGroupCreateAndPublish(
parentNode: $parentNode
parentGid: $parentGid
parentProperty: $parentProperty
new: $new
) {
aliasMapping {
gid
alias
__typename
}
result {
draftVersion {
_constraintViolations {
code
constraintId
constraintType
... on PropertyConstraintViolation {
propertyName
__typename
}
... on PropertiesConstraintViolation {
propertyNames
__typename
}
__typename
}
_displayName
_draftType
_from {
id
timestamp
author {
numericalIdentifier
... on Person {
username
firstName
lastName
email
userId
__typename
}
... on Service {
module
instanceId
__typename
}
__typename
}
__typename
}
__typename
}
operationsPermissions {
_operations {
operation
__typename
}
__typename
}
hasDeepDraft
gid
nodePath
parentNodePath
parentGid
__typename
}
__typename
}
}

Variables:

{
"parentNode": "metadata",
"parentGid": "00000000-0000-0000-0000-000000000001",
"parentProperty": "catalogItemGroups",
"new": {
"targets": [
{
"target": {
"gid": "08664d56-0000-7000-0000-00000008d94a",
"fixAtLatest": false
},
"_alias": "alias-0",
"_type": "catalogItemGroupTarget"
},
{
"target": {
"gid": "36ed325c-0000-7000-0000-000000333ced",
"fixAtLatest": false
},
"_alias": "alias-1",
"_type": "catalogItemGroupTarget"
}
],
"_alias": "alias-2",
"_type": "catalogItemGroup"
}
}

It looks like the entity is called catalogItemGroup with targets embedded array inside, where the target is catalogItemGroupTarget and that contains the ID of the catalogitem.

Let me know if this helps.

 

Kind regards,

Anna


Hi ​@anna.spakova , thanks a lot, your answer helped me further. Have to remember your approach in this, very convenient.

Kind regards,

Albert