Open aidangilmore opened 1 year ago
I was actually thinking about this the other day, it should be possible after #250. I'd want it to look something like this:
foo::select!(foo_detailed {
name
bar: #bar_with_children
})
bar::include!(bar_with_children {
baz: select {
thud
}
bongo: select {
grunt
}
});
Forgive me if this already exists, but I think it would be neat and rather useful if you could compose define several instances of
select!
andinclude!
. Currently, when working with complex schemas involving multiple models and nested relations, it can be a tedious process to repeatedly specify all the fields to be included or selected.Consider the following Prisma schema:
Here is a rendered example of what I think an enhanced
select!
andinclude!
could look likeThank you very much for the wonderful library!