You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the following example typescript tells me, that ctx.user is potentially null as I defined the types for my context. However, my shield already filters that case out. But typescript doesn't recognize that. Is there some way to fix that without adding in every resolver a separate check and without using a ! After every ctx.user!.id?
Thank you for opening an issue. We will get back to you as soon as we can. Have you seen our Open Collective page? Please consider contributing financially to our project. This will help us involve more contributors and get to issues like yours faster.
Question about GraphQL Shield
In the following example typescript tells me, that ctx.user is potentially null as I defined the types for my context. However, my shield already filters that case out. But typescript doesn't recognize that. Is there some way to fix that without adding in every resolver a separate check and without using a ! After every ctx.user!.id?
Context:
Shields:
Mutation:
The text was updated successfully, but these errors were encountered: