hey guys quick question that is driving me nuts, a...
# orm-help
d
hey guys quick question that is driving me nuts, and dont know i its possible i have this resolver:
Copy code
async placesWithFriends(parent, args, ctx, info) {
    const id = getUserId(ctx)
    const friends = await ctx.db.query.user({ where: { id } },
      `{
        friends{
           friend{
             id
           }
        }}`
      )
    let idsFriends = friends.friends.map(friend => friend.friend.id)
    return ctx.db.query.places({ where: {
      checkins_every:{
        user:{
          id_in: idsFriends
        }
      }
      
    }}, info)
  },
which the outcome is the same as this one:
Copy code
query{
	places(
      where: {
        checkins_some:{
          user:{
            id_in:["cxxxxxxxxxx8829pbcte3g", "cjlxxxxxxxxxx882zi7drfeh"] #ARRAY idsFriends
          }
          
        }
      }
 		){
    id
    name
    checkins{
      user{
        id
        name
      }
    }
  }
}
but im trying to set the "where" clause on the checkins like this
Copy code
query{
	places{
    id
    name
    checkins(
      where: {
        user:{
          id_in:["cjlxxxxxxxxxxnpt8osm", "cjle5yxxxxxxxxx82czmke786"] #ARRAY idsFriends
        }
      }
 		){
      user{
        id
        name
      }
    }
  }
}
i cannot do that exact query on the resolver because when i use "ctx.db.query.places({ where..." it will filter the places and i need ALL the places, what im trying to do is filter the checkins inside every place