-
Notifications
You must be signed in to change notification settings - Fork 891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make COUNT queries available to the Firestore Console #6643
Conversation
🦋 Changeset detectedLatest commit: 58a29f7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Size Report 1Affected Products
Test Logs |
Size Analysis Report 1Affected Products
Test Logs |
@egilmorez PTAL as a required reviewer. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering why TW review is required when there are no public doc changes, but here you go :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGMT
Pardon me but what is this function? It seem like it is a very significant feature yet I have not seen any documents about it |
We will be talking about this feature more in the coming weeks. Stay tuned! |
@Thaina Please see https://cloud.google.com/blog/products/databases/aggregating-data-with-firestore for full details about this new feature :) |
Thank you very much
Sadly still not available in unity sdk |
There are two notable changes in this PR:
XhrIo.setWithCredentials(true)
when invoking theRunAggregationQuery
RPC.getCountFromServer()
in theINTERNAL
object.The
XhrIo.setWithCredentials(true)
change is required so that the Firestore Console's authentication cookie will be included in the HTTP request headers. Without it, the requests fail with HTTP 401 errors. This problem is unique to the Firestore Console because they use 1st-party authentication. This change should have no effect on any other users. Moreover, the "Listen" and "Write" streams have been invokingXhrIo.setWithCredentials(true)
indirectly since the dawn of time by specifyingsupportsCrossDomainXhr: true
in theWebChannelOptions
:firebase-js-sdk/packages/firestore/src/platform/browser/webchannel_connection.ts
Line 179 in 34ad43c
XhrIo.setWithCredentials(true)
here: https://github.com/google/closure-library/blob/e439bfd5ff09e0efd85693fc5adf23462d5a39d4/closure/goog/labs/net/webchannel/webchannelbase.js#L2601The change to the firestore-compat library is done because the Firestore Console is stuck using the compat SDK for now, and we don't want to add a new public API surface to the firestore-compat library.
Googlers see b/250662155 for more info.