But then to go from user 456 to user 123 via the field user_id do I have to do a linear search of all users to check their IDs?
query {
user {
id
name
childUser: userByUserId {
id
name
}
}
}
The response would be: {
"data": {
"user": [
{
"id": 123,
"name": "John Doe",
"childUser": {
"id": 123,
"name": "John Doe"
}
},
{
"id": 456,
"name": "Sita K",
"childUser": {
"id": 123,
"name": "John Doe"
}
}
]
}
}
Did I answer your question?I was thinking you could replace or supplement the real user IDs with their indices in the array of returned users.
https://stackoverflow.com/questions/6163683/cycles-in-family...