Include relationship objects in responses? #11
-
Hi Omar, thanks for this amazing package. Is it somehow possible to fetch related objects in find queries? Currently it does not seem that a schema is generated for such, or am I misunderstood? If I understand, it would imply extending the (?)Find(Unique|Many)Schema?
Are you working on this currently, or is it a non-issue? If you accept pull requests, I may have a look if I have the time. Best. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
Hello @vikt0r0 Is this what you mean?
This basically means that |
Beta Was this translation helpful? Give feedback.
-
Hi Omar,
Indeed - I am fairly new to TypeScript and the React environment, so
forgive me if I’m a bit slow on picking up.
But this means currently one would have to make several requests or write
my own routers, if I understand correctly?
Best.
fre. 15. jul. 2022 kl. 15.50 skrev Omar Dulaimi ***@***.***>:
… Hello @vikt0r0 <https://github.com/vikt0r0>
Is this what you mean?
const getUser = await prisma.user.findUnique({
where: {
id: 19,
},
include: {
posts: true,
},
});
This basically means that include types are currently missing.
—
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAUIXBXZJYGT7ME236LLF7TVUFUATANCNFSM53T3ZNDQ>
.
You are receiving this because you were mentioned.Message ID:
<omar-dulaimi/prisma-trpc-generator/repo-discussions/11/comments/3156938@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
Feature request issue created here: #13 |
Beta Was this translation helpful? Give feedback.
-
Cool. I’m actually also applying these days, hence I have a little more spare time on my hands than usually.
If you are up for it we could set up a call sometime and perhaps you could give me your take on how you think I should approach it?
… Den 17. jul. 2022 kl. 15.48 skrev Omar Dulaimi ***@***.***>:
Yes, of course. Though since I'm currently looking for a job, I might not be available much. Let me know how I can help.
—
Reply to this email directly, view it on GitHub <#11 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAUIXBRDQQSKLRUWAGFTED3VUQFKFANCNFSM53T3ZNDQ>.
You are receiving this because you were mentioned.
|
Beta Was this translation helpful? Give feedback.
Feature request issue created here: #13