Naka
01/15/2019, 4:40 PMNaka
01/15/2019, 4:40 PMNaka
01/15/2019, 4:41 PM_modelMeta {
count
}
nikolasburk
count
is available through the aggregate
field of a connection query 🙂 https://www.prisma.io/docs/prisma-graphql-api/reference/queries-qwe1/#connection-queriesNaka
01/15/2019, 4:44 PMaggregate
works if you want to count the current model in querynikolasburk
Naka
01/15/2019, 4:59 PMtype Brand {
id: ID!
name: String!
products: [Products!]
}
type Product {
id: ID!
brand: Brand!
}
query {
brands(where: {
name: "BrandName"
}) {
products {
count
}
}
}
Harshit
01/15/2019, 5:00 PMHarshit
01/15/2019, 5:00 PMNaka
01/15/2019, 5:01 PMHarshit
01/15/2019, 5:01 PMNaka
01/15/2019, 5:03 PMNaka
01/15/2019, 5:17 PMHarshit
01/15/2019, 5:21 PMHarshit
01/15/2019, 5:22 PMNaka
01/15/2019, 5:45 PM