Closed PyaePhyoKyaw61194 closed 2 years ago
I just added the query object in request without any property. In this case, typescript can detect the undefined error( name not existed in query) perfectly.
This might be the case that I need to type the defaults of context elements to unknown
so that typescript can show error correctly. I'll need to investigate more.
Trying to copy the logic of ResolverArgs return type changing dynamically( ctx,req,res or ctx,req) with respect to UncontrolledResolver true or false. But , still failed.
Yep it would still be the same result since ResolverArgs
need to type more strictly.
This should be solved. I'll close the issue.
Typescript cannot detect the name property that is not existed.