Arnab
02/05/2019, 12:31 PMasync personConnection(parent, args, context, info) {
return await prisma.personsConnection()
}
However, when I add the properties one by one:
const aggregate = await prisma.personsConnection().aggregate()
...
return { aggregate, pageInfo, edges }
This worksArnab
02/05/2019, 12:33 PMyanivos
02/05/2019, 12:36 PMArnab
02/05/2019, 12:36 PMArnab
02/05/2019, 12:37 PMArnab
02/05/2019, 12:51 PMweakky
02/06/2019, 10:58 PMpersonsConnection, you’ll see that aggregate isn’t part of the response. The reason why it’s not there is because it might be costy to make the count, so you have to do it yourself manually!Arnab
02/07/2019, 8:39 AMexport interface PersonConnectionPromise
extends Promise<PersonConnection>,
Fragmentable {
pageInfo: <T = PageInfoPromise>() => T;
edges: <T = FragmentableArray<PersonEdge>>() => T;
aggregate: <T = AggregatePersonPromise>() => T;
}Arnab
02/07/2019, 8:40 AMpageInfo are part of the shape.weakky
02/07/2019, 9:29 AMpersonsConnection is not in PersonConnectionPromise, but in the extended PersonConnection interface. What you see here are the methods available for prisma.personsConnections().something()