I have 2 users in my database, and you can see tha...
# orm-help
s
I have 2 users in my database, and you can see that
hasNextPage
is true, but I get back a
count
of 1
h
Because you just get first one in
userConnection
n
^ yep
you're getting the aggregate of the data queried
s
In the tutorial video, it shows a count of 2... 🤔
h
If you want get count of all users + user connection you can do alias for aggregation count.
s
Thanks for the explanation. Could I trouble you for either a link or an example that shows how to do this? Very new to gql & prisma
h
Copy code
query {
  userConnection(first ...){}
  count: userConnection { aggregate { count }}
}
s
ahhh fantastic
thank you!