-
I'm using Is there any example how |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Edit: A new method Unfortunately there isn't a good way to do this right now... I have tried to make plugins compatible as much as possible, but this is a feature that slipped through the cracks, and doesn't have a good way to work together. For now the best work around is to use t.prismaField with the I am open to ideas on how this could work better. Unfortunately it isn't possible to just change the type for context automatically in any field builder method when the auth option is defined, and creating an auth plugin version of each method is probably too much overhead I'm not sure if it's possible, but it might be possible to create something like |
Beta Was this translation helpful? Give feedback.
Edit: A new method
t.withAuth
has been added to help with this issue.Unfortunately there isn't a good way to do this right now... I have tried to make plugins compatible as much as possible, but this is a feature that slipped through the cracks, and doesn't have a good way to work together. For now the best work around is to use t.prismaField with the
auth
option for what ever scopes you want to apply, and then use a type-cast on the context object when accessing it inside your resolver.I am open to ideas on how this could work better. Unfortunately it isn't possible to just change the type for context automatically in any field builder method when the auth option is defined, and creati…