from: <https://www.prisma.io/forum/t/access-connec...
# orm-help
v
from: https://www.prisma.io/forum/t/access-connection-info-e-g-count-for-type-in-a-resolver/2522/3 this gives access to the count inside my resolver, but not as the result of my query?
Copy code
let connection = await ctx.db.query.postsConnection(
  { },
  `{ aggregate { count } } }`,
)
let count = connection.aggregate.count
a
What does the entire resolver method look like? What comes back from the query will depend on what you return from that resolver method.
v
Copy code
profile(parent: any, { id }: ProfileArgs, ctx: Context, info: any) {
    return ctx.db.query.profile({ where: { id } }, info);
  },
a
I'm not seeing any of the code from the original message in that resolver. Where are you calling the
postsConnection
method?
v
the
postsConnection
was an example provided by the forum thread
a
It sounds like you'd need to setup two prisma-binding method calls. One to get the profile, and another to get whatever aggregate data you need.