Modelling relationships in Uni Schema

Hi All,

I am new to Vendia (apologies in advance if this is a simple problem to solve).
When creating a new Uni I expect to model a relationship between two objects within the schema.

Company
→ Employees

Of course, I can add the “keys” between them as strings, but this does not “feel” right.
If I look at a typical GraphQL Schema I would reference the related “object”

image

Thanks in advance for your advice,
Warren

PS> I did look at sample registration files in data modeling documentation

1 Like

Hi @warrenei - Thanks for the great question. We don’t yet offer the ability to define object relationships in Vendia Share. The approach you’re taking (including a reference key in related objects) is the right one to take.

I’ll add this feature for our team to prioritize. Keep the suggestions coming!

Thanks,
Brian

1 Like

Thank you for prompt feedback @brian-vendia

Just including some additional info here for others considering this scenario.
It is possible to define a nested array as part of the Uni Schema structure, as per my example:

Regards, Warren

2 Likes

Happy to help, @warrenei.

It is possible to use nested array and objects in your schema if you need. We have examples defined in our Track and Trace Quickstart schema.json file. The Order type has properties that are simple - like string - as well as more complex types like array and object. The items property is a combination of the two - an array of objects.

Hoping this helps!
Brian