In a Prisma result extension, is it possible to require ("needs") a relation?
Hi!
I love extensions, in particular result extensions that I use extensively!
For now, I use it only with fields that belong directly to the model, but I often want to "require" (the "needs" field) fields that are in a relation. Is that possible?
I managed to make it work, but typescript is not happy about it :/
Do you have any solution?
Thanks a lot!
1 Reply
Hi @foobar ๐
We have a feature request for this case here:
https://github.com/prisma/prisma/issues/20091
Can you add a ๐ to it, so that our product team can look into prioritising this?
GitHub
Support relations in
result
extensions ยท Issue #20091 ยท prisma/pr...Problem At the moment, only scalar fields are allowed to be specified in needs block of result extension. This is by design โ since we include computed fields into the default selection, we can'...