Open Crash-- opened 5 years ago
I agree, I think hydrating in the query
call is a good thing.
Would you be interested in taking a look @Crash-- ? I think first having an option { hydrate: true }
to query
would be easy and useful.
Ping @Crash-- ;) we recently got a situation of missing relationships because of client.query
made in node. Adding client.hydrateDocuments
works, but it's easy to miss / forget
ATM, when we use client.query(), we have to manually hydrate the documents https://github.com/cozy/cozy-drive/pull/1778/files/304a853bbf577d24649cdeda192c3b93ca660abe#diff-8bcb276dfd46a83c6e2e13ff28b8ad23R87
But with an ObservableQuery, we hydrate the docs automatically.
Is there any reason to not hydrate the documents when a perform a query() ?