trying to use graphql group by and get nested details of a key.
for example lets say my schema is this:
post {
_id
title
isPublished
}
user {
_id
username
name
[posts]
}
graphql query:
{
postsConnection(where: {isPublished: true}){
groupBy{
author{
key
connection{
aggregate{
count
}
}
}
}
}
}
and results:
{
"data": {
"postsConnection": {
"groupBy": {
"author": [
{
"key": "5c9136976238de2cc029b5d3",
"connection": {
"aggregate": {
"count": 5
}
}
},
{
"key": "5c99d5d5fcf70010b75c07d5",
"connection": {
"aggregate": {
"count": 3
}
}
}
]
}
}
}
}
but i would like instead of a key id to get the name of the author (author.name)
can it be done with strapi?