This repository has been archived by the owner on Jul 31, 2022. It is now read-only.
Validation and auto-completion for hand-typed info
objects in resolvers
#33
Labels
enhancement
New feature or request
As discussed in this forum post
I'm wondering if there is any way to validate handwritten queries passed instead of
info
in Prisma resolvers against the Prisma DB schema? In the following example, I have aUser
model that has a reference to aUserCredentials
model. In the login resolver, I will find theUserCredential
by the passed email, and find the relevantUser
's ID from a handwritten query:I would like to check queries like that against the schema - how would I do that? 😃
And even better - how could you get auto completion in VSCode for these strings?
PS: The idea came from the HowToGraphQL tutorial project (https://github.com/howtographql/graphql-js/blob/master/src/resolvers/Mutation.js#L34)
The text was updated successfully, but these errors were encountered: