Skip to content
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

Bug: SDL and resolver generation not consistent for findFirst queries #166

Closed
pakatagoh opened this issue Jan 10, 2021 · 5 comments
Closed

Comments

@pakatagoh
Copy link
Contributor

The image below shows the query generated by pal g. The generated query for an Organisation model has findFirstOrganisations return type is an array.
image

It's not consistent with the return type of the findFirstOrganisation resolver.

Should the return type be Organisation instead of [Organisation!] ?

See the return type for findFirst here: https://www.prisma.io/docs/concepts/components/prisma-client/crud#return-type-1

Currently using @paljs/cli and @paljs/plugins v2.11.0, prisma/client and @prisma/cli v2.14.0

@pakatagoh
Copy link
Contributor Author

Potential fix in #167

@AhmedElywa
Copy link
Collaborator

Fixed by @pakatagoh

@pakatagoh
Copy link
Contributor Author

thanks! @AhmedElywa

Do you know when you'll publish a new release with the changes?

@AhmedElywa
Copy link
Collaborator

Today, sorry for late.

@AhmedElywa
Copy link
Collaborator

V2.11.1 have your fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants