Hello. Unfortunately I am struggling a bit to get ...
# orm-help
a
Hello. Unfortunately I am struggling a bit to get calculated fields resolved when using prisma bindings or prisma clients and fragments (works with info object). Imagine I want to calculate a hmac from the email of a User type. I add a custom resolver called hmac in the User resolver and add hmac to the User type in the schema.graphql. Now I can query the hmac from the frontend using the info object and it will be returned without a problem. If however I am trying to resolve / receive this calculated value from a fragment I will receive an error like "Cannot query field 'hmac' on type 'User'." Code: const user: any = await prisma .user({ id: ctx.req.userId, }) .$fragment(
Copy code
fragment UserWithPosts on User {
          id
          email
          hmac
        }
); What am I doing wrong? How to receive custom resolver values using fragments / the prisma client or binding?