Skip to content
This repository has been archived by the owner on Jan 14, 2021. It is now read-only.

Can't query models without scalar fields #569

Closed
timsuchanek opened this issue Mar 13, 2020 · 1 comment
Closed

Can't query models without scalar fields #569

timsuchanek opened this issue Mar 13, 2020 · 1 comment
Assignees
Labels
bug/2-confirmed We have confirmed that this is a bug. kind/bug A reported bug.
Milestone

Comments

@timsuchanek
Copy link
Contributor

In other words, if a model only consists of relations to other models, as of now, a findMany call with Prisma Client fails, as by default there has to be some selection set and Prisma Client can't generate one.

Our solution, for now, will be to disable the prisma.MODEL_NAME.ACTION API for that particular model.

The current assumption is, that this is fine for now, as you can always query or mutate that model from one of the sides that it's related to.

This also fixes #530

@timsuchanek timsuchanek added bug/2-confirmed We have confirmed that this is a bug. kind/bug A reported bug. labels Mar 13, 2020
@timsuchanek timsuchanek added this to the Preview 25 milestone Mar 13, 2020
@timsuchanek timsuchanek self-assigned this Mar 13, 2020
@timsuchanek
Copy link
Contributor Author

Fixed in latest alpha by 039c261

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug/2-confirmed We have confirmed that this is a bug. kind/bug A reported bug.
Projects
None yet
Development

No branches or pull requests

1 participant