Lack of firestore features

Hello guys,

I've been using Retool lately to create an admin panel and I think there are some important features missing in firestore integration.

There are no:

  • firebase.firestore.FieldValue.arrayUnion
  • firebase.firestore.FieldValue.arrayRemove

I know I can just fetch the latest item and add the items to it, but there is a huge concurrency problem: what if, while I am changing it another user changes it? What is the final version?

A user already asked about that feature in Sep '20 (How do I add or remove a value in an array in a firestore document?)
That was your reply:

Hey @cdedreuille! We don’t have native support for this quite yet, so your best bet is to pass a fully updated array in your query. So basically take the current value of the array, push new values to it via JS, and then pass that updated array to overwrite the existing one. Does that make sense? (We’re working on building a raw query editor so you’ll be able to access the SDK directly!)

Now, after one year, still nothing.

  • Missing * not-in

  • Realtime Updates

One of the greatest features of Firestore is the real-time updates and if it could be used in Retool that would be great.

3 Likes

Hey @gzaccaroni! I'm sorry that you've run into issues here :confused:

We do support most basic (and some advanced) operations for querying Firestore, so I'm not sure it's fair to say that it's not "real" – but we certainly could do a better job of supporting more specific array operations. We've just been focused on more of the core experience lately (see our weekly changelog) and Firebase has taken a bit of a back seat. It's definitely something we're hoping to improve in the future!

If you'd like access to the beta for the raw query editor, just shoot me an email (justin at retool) and we can get you set up.

1 Like

You’re right, the problem is that it is frustrating to not be able to do something. I’ve updated the topic title.

Thank you for the invitation!

@gzaccaroni Thanks for the post, exactly the features we also need. Together with:

What we're also missing are document updates over the dot notation (Official Firebase Docs). This is quite dangerous right now on retool when you experience the missing support for the first time. The operation will just not fail and create an additional property on the document and mess up the data structure.

Using these features are best-practices of working with Firestore. Right now it can be solved by creating an http endpoint, implemented the operations there and call it over retool.
Because retool is all about helping us provide secure admin backends quickly it'd be awesome when you support these operations as well!

@justin When the beta program is still open and we can use the dot annotation updates with it, I'd love to have access as well.

Thanks anyways for creating retool! :hugs: