`postss {
content
liked_by_me
}`
onQuery(builder){
// NOT WORK
builder
.select(['posts.*',
Post.relatedQuery('liked_users').count().as('liked_count'),
Post.relatedQuery('liked_users').select(raw('true')).where('uid', 1).as('liked_by_me')
])
}
but got undefined
remove the liked_by_me field works fine
liked_by_me also works fine in normal query
furthermore, I want to extend the liked_by_me with redis, so how to do that?
requery the redis after getting the actual data from db? then how to bind it to graphql?
I tried
but got undefined
remove the
liked_by_me
field works fineliked_by_me
also works fine in normal queryfurthermore, I want to extend the liked_by_me with redis, so how to do that?
requery the redis after getting the actual data from db? then how to bind it to graphql?
any advice?
many thanks