Skip to content
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

Ignore ReadOptions on getAll #134

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

op
Copy link

@op op commented Mar 1, 2019

This change ignores the optional ReadOptions in firestore.getAll. It also raises an exception if no argument were passed at all.

If you use the firebase-admin package and call getAll with only one argument; ReadOptions -- it will actually do the round-trip to the backend. If you have no arguments at all, it raises an exception and no promise is created. This behaviour is also mimicked.

The first argument is required and must be of type DocumentReference followed by any additional DocumentReference documents. If used, the optional ReadOptions must be the last argument.

References:
https://cloud.google.com/nodejs/docs/reference/firestore/latest/Firestore#getAll

op added 2 commits March 1, 2019 15:52
This mimics the argument validator found in the Firestore client.
@dmurvihill
Copy link

Conversation continuing here (see #160)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants