firebase / firebase/firebase-tools
Emulator in datastore mode doesn't return "endCursor" while Datastore emulator returns for the same query
- Dominant language
- TypeScript
- Stars
- 4.5k
- Forks
- 1.3k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 84
Description
### [REQUIRED] Environment info
**firebase-tools: 7.16.1**
**Platform: macOS**
### [REQUIRED] Test case
```
import requests
emulator_url = 'http://127.0.0.1:50579/v1/projects/test-app:runQuery'
payload = b'{"partitionId": {"projectId": "test-app", "namespaceId": ""}, "query": {"kind": [{"name": "Profile"}], "limit": 1}, "readOptions": {"readConsistency": "EVENTUAL"}}'
headers = {'Content-Length': '169', 'Content-Type': 'application/json'}
# POST request to the emulator
resp = requests.post(emulator_url, headers=headers, data=payload)
# check response's data
data = resp.json()
print(data)
# prints {'batch': {'entityResultType': 'FULL', 'moreResults': 'MORE_RESULTS_AFTER_LIMIT', 'readTime': '2024-06-21T20:20:20.928406Z'}} no "endCursor" within the data.
```
### [REQUIRED] Steps to reproduce
Explained above
### [REQUIRED] Expected behavior
You will see something like
{'entityResultType': 'FULL', 'moreResults': 'MORE_RESULTS_AFTER_LIMIT', 'readTime': '2024-06-20T21:40:28.228019Z'}
### [REQUIRED] Actual behavior
Datastore emulator returns
{'endCursor': 'CgA=', 'entityResultType': 'FULL', 'moreResults': 'MORE_RESULTS_AFTER_LIMIT'} which is close to the production env
Contributor guide
Assessment
This issue has not been assessed yet.