How to see who references a Type

#1

Say I have MyType.
I want to see who references MyType, for example:
SomeType
{
someField: MyType
}

How do I do that, in a recursive way throughout the tag?

0 Likes

#2

You’re probably looking for MetadataGraph and its associated apis.

var g = MetadataStore.tag().graph();
var uses = g.usages({element: {name: ‘MyType’, kind: MetadataElement.TYPE}})

This is a very new api so you will probably find bugs

0 Likes