I am wondering why isn't there a findOneByFields method, similar to the existing findByFields one.
Currently I'm using this hack:
async findOneByFields(values) {
return this.findByFields(values).then((documents) => documents?.[0])
}
Is there a reason why it's not provided?
Is my wrapping function useless because of how the batching/caching work?
I am wondering why isn't there a
findOneByFieldsmethod, similar to the existingfindByFieldsone.Currently I'm using this hack:
Is there a reason why it's not provided?
Is my wrapping function useless because of how the batching/caching work?