recursive queries in graphql

0

I have this

type Person{
    id: Int!
    nombre: String!
    amigos: [Person]
}

As I can from the resolve, bring me the friends of my friends. is to say something like this:

{
    "me":{
        "id": 1,
        "nombre": "yo",
        "amigos":[
           {
               "id": 2,
               "nombre": "pepe",
               "amigos":[
                   {
                       "id": 3
                       "nombre": "jose"
                   }
               ]
           },
           {
               "id": 4,
               "nombre": "lola",
               "amigos":[
                   {
                       "id": 1
                       "nombre": "yo"
                   }
               ]
           }
        ]
    }

}
    
asked by Johnny Pachecp 30.01.2018 в 18:00
source

0 answers