rxdb icon indicating copy to clipboard operation
rxdb copied to clipboard

add test using composite pull filter on firestore

Open agarcher opened this issue 2 months ago • 3 comments

This PR contains:

  • IMPROVED TESTS

Describe the problem you have without this PR

When using the firestore replication, it is possible to use a composite filter if you use only one filter, but doing so causes typescript errors. The problem is that the pull options filter constrains to field filters only and according to firestore a composite filter is a different thing.

What I don't understand is that the code in the test does work if you throw an as any on there to tell typescript it's safe, but then we lose type safety. It would be great if the replication could relax the typing to allow a single composite key, but when I attempt to do that I wind up with type errors in the plugin source code where it performs the query. Some attempts to resolve the type issues led me to dead ends.

agarcher avatar Oct 23 '25 16:10 agarcher

Hi @agarcher PR is welcomed. We can use any internally as long as it is tested. Its only important that the outside facing types are correct.

pubkey avatar Oct 24 '25 14:10 pubkey

Thanks for the response. I will look at fixing with an any workaround then.

agarcher avatar Oct 24 '25 14:10 agarcher

@agarcher any update on this?

pubkey avatar Dec 01 '25 08:12 pubkey