@Ctx() decorator default type #1193
Answered
by
MichalLytek
matejanajdanov
asked this question in
Q&A
-
Is there a way we can set a default type to the context so I don't have to explicitly type it every time I need to use it in resolvers? example:
so
Is this really necessary and is there a way we can type it when we are declaring the context? Thank you in advance!! 🙏 🙏 🙏 |
Beta Was this translation helpful? Give feedback.
Answered by
MichalLytek
Feb 7, 2022
Replies: 1 comment
-
Yes, it's necessary. The same you can't set default type for args in TS config. It has to be explicit. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
matejanajdanov
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, it's necessary. The same you can't set default type for args in TS config. It has to be explicit.