firebase / firebase/firebase-js-sdk

Provide a consistent way of accessing the Firestore query on firestore.Query

Open
#3,002 4 comments 2 reactions 0 assignees View on GitHub
api: firestore needs-attention question
Dominant language
TypeScript
Stars
5.1k
Forks
1k
Avg merge
2d 21h
Merged PRs (30d)
37

Description

### [REQUIRED] Describe your environment

* Operating System version: MacOS Catalina 10.15.1
* Browser version: Chrome, Firefox, Safari, Edge
* Firebase SDK version: 7.14.2
* Firebase Product: Firestore

### [REQUIRED] Describe the problem

We need access to the string representation of the database query stored in `firebase.firestore.Query`. We're using it to create a key for caching queries.

```typescript
function getCacheKey(query: firebase.firestore.Query) {
return query.wp.toString(); // returns something like Query(....
}
```

The problem is that this variable `wp` has been obfuscated by the build process. If you change the version of the Firebase SDK, this variable name will change.

Can you provide a consistent way of accessing this property? Either through a method or through a instance variable that won't be obfuscated.

Thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.