I have my data in RealmSwift structured like:
class Dog {
owner: Person
}
class Person {
var dogs: LinkingObjects(Dog.self, "owner")
}
If I perform the following GraphQL query on my data I get unexpected results:
query {
persons {
dogs
}
}
The result I am getting looks liek this;
[{
name : "Person 1"
dogs: []
},
{
name : "Person 2"
dogs: []
}]
Even though several dogs point at Person1/Person2. Is there anything I am missing in my query to populate fields?
Also another question about the graphql endpoint: can I access it from my realm functions or is there another way to have a “stored query” taking an argument and delivering results to clients?