Returning a single list of results

As discussed today about the @ignore directive for fields, After giving some thought

{
 me(uid: 1) {
  friends {
   relatives {
    name @only
   }
  }
 }
}

I feel this type of specifying that we only want the name of relatives of friends is more natural and easy to implement than the @ignore for all the parent attributes. Also, using @ignore would lead to lot of complication in the existing code as we can’t assign the merged result to any single uid, also the way to access the merged fields will get ambiguous in the query. One example:

{
 me(uid: 1) {
  name
  friends @ignore {
   relatives @ignore {
    name 
   }
  }
 }
}

Here, we wouldn’t be able to differentiate name list that we want and the name of me. If the goal is to get a list of some result (like in cypher), we could follow the @only (or some other keyword, say @merge) with the merged predicates directly linked with the root entity. What do you think about this @mrjn ? (I think we can discuss this over VC so that there is more clarity)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.