I am new to Prisma so please bear with me... I wan...
# prisma-whats-new
m
I am new to Prisma so please bear with me... I want to make a way to query a product and have a list specific to the current user... And never another option... Like an inventory list... I would not want to allow sharing of this and would want it to always be recalculated... Is there a way to make a custom type resolver to allow this functionality?
v
your custom resolver can have any logic you'd like, as long as you return it the type it expects, in your case a list of inventory items
m
Yeah but what if I want this type to always return this users inventory. It's there a way to intermingle graphql-js object types with Prisma bindings? Maybe this is the question I am looking for.
n
https://www.prismagraphql.com/docs/quickstart/ did you follow this? You can easily implement the behavior you want in a new resolver
m
I think I understand now... I can add any type to the resolvers as long as it is not in the Query or Mutation that should resolve any way I define. But, this probably goes without saying, if I marked it as an entry point in the Query, or Mutation I will obviously need to duplicate some code. The only thing I did not get is that you can describe resolvers for types by listing them at the top of the resolvers.