Hi,
I've just updated to aws-amplify 5.3.11 (from 3.3.8, yes I know!) And my queries to Datastore now only return a single item if I use the predicate.
This used to work, it returned Invoice[]
const invoices = await DataStore.query(Invoice, (i) =>
i
.startDate("ge", format(startDate, "yyyy-MM-dd"))
.endDate("le", format(endDate, "yyyy-MM-dd"))
.owner("eq", attributes.sub)
);
Same thing, now returns EagerInvoice
If I do, the below I get EagerInvoice[] which is more like it but I don't want to have to then filter them when the query function provides the predicate option:
const invoices = await DataStore.query(Invoice)
Any ideas what I'm missing?