I have the following data in a collection called “projects”:
{
_id: "project-id",
title: "Project Title",
credits: [
{
personId: "person-id"
roles: ["writer"]
}
]
}
I have the following collection called “people”:
{
_id: "person-id"'
name: "John Doe"
}
Is there a way to create a “Relationship” in Realm for GraphQL that is nested like this? Normally I would write some kind of foreign key relationship like this in the Realm UI under Realm > Schema > Relationships:
{
"credits": {
"foreign_key": "_id",
"ref": "#/relationship/mongodb-atlas/burns_media/people",
"is_list": true
}
}
However, since “personId” is contained in an object inside an array, I’m not sure how to define the nested relationship. Is this possible?