.throwOnError() only adjusts types correctly if await is used and is still incorrect if you use then
#601
Labels
bug
Something isn't working
then
#601
Bug report
Describe the bug
awaiting a query with
.throwOnError()
correctly eliminatesnull
from the typing. However, if you don't await it and use.then(...)
instead, thennull
is not eliminated from the typing.To Reproduce
Expected behavior
Type of
data
should be{ id: string }
Actual behavior
Type of
data
is{ id: string } | null
The text was updated successfully, but these errors were encountered: