Directly querying user defined function returning optional fails typecheck
Open
bug
ORM
- Dominant language
- Python
- Stars
- 415
- Forks
- 50
- PR merge metrics
- No merged PRs in 30d
Description
Given a schema:
```edgeql
function MaybeInt() -> optional int64 using (1);
```
Trying to query a call to the function:
```py
result = self.client.query(default.MaybeInt())
```
Fails typechecking with the error:
```
error: Argument 1 to "query" of "ReadOnlyExecutor" has incompatible type "type[int64] | None"; expected "QueryableObject[int] | type[QueryableType[int]]" [arg-type]
```
Note, the query correctly returns `[1]`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.