-
Notifications
You must be signed in to change notification settings - Fork 78
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
can't use auto generated types in graphql resolvers #184
Comments
Are you using swc as a typescript transpiler? |
No I don't explicitly use this but I am using this boilerplate:
https://github.com/notiz-dev/nestjs-prisma-starter which as I know it
doesn't use swc neither.
…On Mon, Aug 7, 2023, 11:21 PM Roman Vasilev ***@***.***> wrote:
Are you using swc as a typescript transpiler?
—
Reply to this email directly, view it on GitHub
<#184 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABAVQOBSIEXQFDHR6WLBOXLXUE2LRANCNFSM6AAAAAA3G453Y4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
@unlight I think it is related to how I am using these generated types inside my project, do you have any working example that shows how we should use these generated types inside our resolvers? (especially an example that shows how to get a where clause from user when there is a relationship between 2 objects) |
@esmaeilzadeh Assuming I understand your question, you might want to have a look at https://paljs.com/plugins/select. This is what we use to add the additional relations to our Prisma queries based on what is asked for by the GraphQL client. Otherwise, you need to use a |
have you resolved this yet? Current facing the same issue. Also with the https://github.com/notiz-dev/nestjs-prisma-starter boilerplate |
Same problem here. Using swc |
i'm using the same boilerplate, I solved the problem as follows:
example resolver:
|
Hi im using prisma with nestjs and graphql, I am trying to use prisma-nestjs-graphql to auto generate the graphql type and use it inside my resolver:
but I faced this error:
do you have any idea how to solve this issue?
The text was updated successfully, but these errors were encountered: