Now we can fetch the required data with the appropriate access control by using the relationship.
query {
user_info {
id
name
city
private_info {
email
phone
address
}
}
}
query {
user_info {
id
name
city
private_info {
email
phone
address
}
}
}
{
"data": {
"user_info": [
{
"id": 1,
"name": "Julie",
"city": "Boston",
"private_info": null
},
{
"id": 2,
"name": "Josh",
"city": "Bangalore",
"private_info": {
"email": "josh@josh.com",
"phone": "+91-9787675678",
"address": "#141, 7th Main Road, Koramangala 3rd Block",
}
},
{
"id": 3,
"name": "John",
"city": "Berlin",
"private_info": null
}
]
}
}