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
There appears to be a problem with the return TS types when using aggregate functions and referenced tables. Instead of getting the expected return type, I'm getting ParserError<'error'>
Example with my function (I believe this is correct and it does run successfully):
Interestingly using count(*) or count('*') generates the correct return type so it would appear the query builder just isn't handling the brackets correctly for aggregate functions and is expecting something between them as it would for referenced tables. These of course generate an error as they're incorrect syntax for the count function.
A very quick check on a simpler query seems to yield the same error even without referencing related tables.
The text was updated successfully, but these errors were encountered:
Bug report
Describe the bug
There appears to be a problem with the return TS types when using aggregate functions and referenced tables. Instead of getting the expected return type, I'm getting ParserError<'error'>
Example with my function (I believe this is correct and it does run successfully):
The data return type here is
ParserError<"Expected identifier at `)), documents(count())`">[]
To Reproduce
Expected behavior
Expected data return type to reflect the query.
i.e.
System information
Additional context
Interestingly using
count(*)
orcount('*')
generates the correct return type so it would appear the query builder just isn't handling the brackets correctly for aggregate functions and is expecting something between them as it would for referenced tables. These of course generate an error as they're incorrect syntax for the count function.A very quick check on a simpler query seems to yield the same error even without referencing related tables.
The text was updated successfully, but these errors were encountered: