-
Notifications
You must be signed in to change notification settings - Fork 44
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
Exists - Fields of type must have a sub selection #215
Comments
I can confirm this is happening to me as well. this.prisma.exists
.User({
address: "0x001",
})
.then(results => {
console.log("exists results:", results);
}); results in:
|
If I roll back to before 2.1.0 then I get an error that property length is undefined from the call. Seems to have been broken for a while. Hopefully someone can figure out what this is, for now I'll have to create my own exists query. |
@Jscott388 and @shadowcodex : Thanks for the feedback. Are you using JS or TS? But I am unable to do so, can you please provide more information about your setup or provide a reproduction repository or provide a PR in my reproduction attempt that displays the error? That will help me more this forward. Thanks! |
I am also having this issue. The ' Fields of type must have a sub selection' error occurs in version 2.0.1. Once I upgraded to 2.1.5 the error changed to a 'TypeError: Cannot read property length of undefined', which is occurring in the Prisma-Binding module. |
Below is a sample resolver where using the exist method on the prisma-binding API creates an error. |
Is there any progress on this or do I need to write my own exist methods ? |
Is there any solution? |
Hey 👋, does this still occur with the latest version of It would be very helpful if you could provide a reproduction repository or CodeSandbox so we can figure out the solution more quickly 🙂 |
@maticzav I managed to reproduce the problem using https://github.com/graphql-boilerplates/node-graphql-server/tree/master/advanced. If you replace the id field of Post with uuid, any exist check starts returning |
Closing in favour of #275 |
For example, my schema is Media. I use the prisma.exists.Media({ListingID: 234523}).
I can't use Medias, media, media. only Media will work but returns this error. Tried using where with it but doesn't work either.
If there is another method to get this working, then update the docs on the site.
Error: Field 'medias' of type 'Media' must have a sub selection. (line 2, column 3):
medias(where: $_v0_where)
The text was updated successfully, but these errors were encountered: