You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be really nice if we could specify a filter when getting doc data so that only certain fields of the document are returned. It could be something very similar to GraphQL and it would work for real time updates as well.
var docRef = db.collection("cities").doc("SF");
var getOptions = {
filter: '{
name
stats {
area
population
}
}',
};
docRef.get(getOptions).then(function(doc) {
// city would only contain '{name, stats:{area, population}}'
var city = doc.data();
}).catch(function(error) {
console.log("Error getting cached document:", error);
});
The text was updated successfully, but these errors were encountered:
It would be really nice if we could specify a filter when getting doc data so that only certain fields of the document are returned. It could be something very similar to GraphQL and it would work for real time updates as well.
The text was updated successfully, but these errors were encountered: