Open karlhorky opened 11 months ago
Currently failing from the @ts-safeql/eslint-plugin@3.0.0-next.1
package problems:
Maybe the subselect isn't supported yet
cc @Eprince-hub
Try 3.0.0.next-3
However, the subselect would probably not work.
Right ok, now with @ts-safeql/eslint-plugin@3.0.0-next.3
we're back to the Food[]
vs JsonAgg
error message:
Query has incorrect type annotation.
Expected: { animalId: number; animalFirstName: string; animalType: string; animalAccessory: null | string; animalFoods: null | Food[] }[]
Actual: { animalId: number; animalFirstName: string; animalType: string; animalAccessory: string | null; animalFoods: JsonAgg | null }[]
Commits:
cc @Eprince-hub
I'll leave this open until the final @ts-safeql/eslint-plugin@3.0.0
version is released, to see if there are any further improvements which could enable us to remove the JsonAgg
type.
Upgraded to @ts-safeql/eslint-plugin@3.0.0-next.4
and there appear to be improvements: the getAnimalWithFoodsById
query doesn't require JsonAgg
anymore.
But there are other issues with null
fields / properties:
Tried @ts-safeql/eslint-plugin@3.0.1
just now, and we're still at the null
values in the SafeQL fields when using json_agg()
with a LEFT JOIN
:
The SafeQL 3.0.0 beta includes support for some
json_
functions in queries: