edgedb / edgedb-js

The official TypeScript/JS client library and query builder for EdgeDB
https://edgedb.com
Apache License 2.0
514 stars 65 forks source link

Add a query method for `AT_LEAST_ONE` #1073

Closed scotttrinh closed 3 months ago

scotttrinh commented 3 months ago

Along with having a better return type, this is part of a fix to allow the queries generator to use this query method when the parsed type of a query is AT_LEAST_ONE.

We currently map AT_LEAST_ONE to query which returns T[] instead of [T, ...T[]] which is the type that the queries generator gets for a literal set of primitives, for instance. See #1072