Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_count queries don't work #498

Open
mbergwall2222 opened this issue May 24, 2023 · 1 comment
Open

_count queries don't work #498

mbergwall2222 opened this issue May 24, 2023 · 1 comment

Comments

@mbergwall2222
Copy link

Hey, when doing joins like this:

{
   "joins":[
      "clients",
      "_count.select.comments"
   ]
}

the library is parsing that as:

{
   "_count":{
      "include":{
         "select":{
            "include":{
               "comments":true
            }
         }
      }
   },
   "client":true
}

Which throws a prisma error. It should parse to:

 {
   "client":true,
   "_count":{
      "select":{
         "comments":true
      }
   }
}
@mbergwall2222
Copy link
Author

Opened PR to resolve: #499

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant