hayes / pothos

Pothos GraphQL is library for creating GraphQL schemas in typescript using a strongly typed code first approach
https://pothos-graphql.dev
ISC License
2.28k stars 153 forks source link

Can prismaConnectionHelpers provide totalCount field? #1185

Open charleslai2000 opened 2 months ago

charleslai2000 commented 2 months ago

I have tried prismaConnectionHelpers, when I connect it to a t.connection, it report error because I defined totalCount for all my connection object.

Now can just trying to resolve it from t.connection resolve function but can not find the parent node id.

hayes commented 2 months ago

Not currently, I that this could be added but currently I think you'd need to do it outside the helper

charleslai2000 commented 2 months ago

Yes, I finally found a way to do it in t.connnection's resolve function.