i need to extend a type (typedef - graphql file) to remove fields like password from client
r
Ryan
08/12/2020, 10:23 AM
Hey @stephan 👋
Could you elaborate on your use case and provide any code snippets if possible.
s
stephan
08/12/2020, 10:26 AM
Hi Ryan,
i have an entity called - USER
I have a user.graphql file which has two methods - get user, get users
the i have a declaration of a new type user {}
in order to emit the password field
the drawback is that each time i add a field in the user.prisma file
i need to add it here as well
i would like to be able to extend the user.prisma file, but emitting the password field
r
Ryan
08/12/2020, 10:39 AM
Yes that would need to be added to the
user.graphql
file everytime, but to prevent that, you can use Nexus , which is a code-first approach to creating a GraphQL schema.