does the prisma dataloader use the facebook graphq...
# orm-help
r
does the prisma dataloader use the facebook graphql dataloader under the covers?
r
@Raif Harik 👋 As Prisma is made using Rust, it doesn’t use FB’s dataloader but it’s own implementation.
r
Hi, so I'm kind of in a bind because I need to do a .unique().myChildren() and then I need a count of the children. But both unique an myChildren have where clauses. So I have to try and combine the queries, reversing the first one and do the count on the myChidren object directly.
This is not working because sometimes the query is an and for the root and an or for the children and I can't combine the And and the Or in one query it seem
r
Maybe you could use the
dataloader
package directly in your application code then?
r
@Ryan so your suggesting do my queries directly on the target object ( rather than the parent ) foregoing the prisma dataloader, but make up for it by using facebooks dataloader?
I was looking at that. fb dataloader, like so many of their libraries is kind of a half measure. good enough but not really user friendly. but I'll figure it out.
But to be clear there's no way to do a parent.findUnique(blah).children.count(). is that correct?
r
You want to count the children? If so you can add
count
inside
findUnique
to get the relation count.