Listen to document changes in an arbitary collectionFirestore query subcollectionsCloud Firestore: listen for new documents in a collection and load themListen for changes in a list childfirestore cloud functions for getting aggregated values in collectionCloud function to find and delete deleted user id in every sub-collectionFirebase: Cloud Functions, How to Cache a Firestore Document SnapshotCost optimization patterns for Firebase Cloud Firestore: fetching documents over collectionsHow do you figure out how many documents are created per hour in a Firestore collection?What is the best way to atomically create documents in different collections in Cloud Firestore?Firebase Cloud Function to copy user email to database collection

Are there any instances of members of different Hogwarts houses coupling up and marrying each other?

Have there been any countries that voted themselves out of existence?

Guitar beginner - What does this card show?

Creating a Master Image to roll out to 30 new Machines Licensing Issues

What is the use of FullForm in Mathematica?

Why are some Mac apps not available on AppStore?

How flexible are number-of-pages submission guidelines for conferences?

Can I say "I will encrypt something" if I hash something?

How can I protect myself in case of a human attack like the murders of the hikers Jespersen and Ueland in Morocco?

SQL Server table with 4,000,000 rows is 40GB

How would two worlds first establish an exchange rate between their currencies

Which ping implementation is cygwin using?

Can a magnet rip protons from a nucleus?

Awesomism and its awesome gods

Is it appropriate for a professor to require students to sign a non-disclosure agreement before being taught?

Job offer without any details but asking me to withdraw other applications - is it normal?

Might have gotten a coworker sick, should I address this?

Will replacing a fake visa with a different fake visa cause me problems when applying for a legal study permit?

Why was "leaping into the river" a valid trial outcome to prove one's innocence?

How do I politely hint customers to leave my store, without pretending to need leave store myself?

Is there any detail about ambulances in Star Wars?

What is negative current?

A medieval fantasy adventurer lights a torch in a 100% pure oxygen room. What happens?

2.5 year old daughter refuses to take medicine



Listen to document changes in an arbitary collection


Firestore query subcollectionsCloud Firestore: listen for new documents in a collection and load themListen for changes in a list childfirestore cloud functions for getting aggregated values in collectionCloud function to find and delete deleted user id in every sub-collectionFirebase: Cloud Functions, How to Cache a Firestore Document SnapshotCost optimization patterns for Firebase Cloud Firestore: fetching documents over collectionsHow do you figure out how many documents are created per hour in a Firestore collection?What is the best way to atomically create documents in different collections in Cloud Firestore?Firebase Cloud Function to copy user email to database collection






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I have 3 collections, namely x.cards, y.cards and z.cards. I'd like to sent out a notification to corresponding users whenever a new card is created in any of the 3 collections. What's the best practice to listen to all 3 collections instead of listening to each collection seperately? I wanted to invoke Cloud Functions from the app.










share|improve this question
























  • If I understand correctly you want to have 3 Collections in Google Firestore and 1 Cloud Function that will be triggered when a document is created in any of them?

    – Andrei Cusnir
    Mar 28 at 11:25











  • @Andrei Yes. That's exactly what I want.

    – Shabir Hamid
    Mar 29 at 22:27

















0















I have 3 collections, namely x.cards, y.cards and z.cards. I'd like to sent out a notification to corresponding users whenever a new card is created in any of the 3 collections. What's the best practice to listen to all 3 collections instead of listening to each collection seperately? I wanted to invoke Cloud Functions from the app.










share|improve this question
























  • If I understand correctly you want to have 3 Collections in Google Firestore and 1 Cloud Function that will be triggered when a document is created in any of them?

    – Andrei Cusnir
    Mar 28 at 11:25











  • @Andrei Yes. That's exactly what I want.

    – Shabir Hamid
    Mar 29 at 22:27













0












0








0








I have 3 collections, namely x.cards, y.cards and z.cards. I'd like to sent out a notification to corresponding users whenever a new card is created in any of the 3 collections. What's the best practice to listen to all 3 collections instead of listening to each collection seperately? I wanted to invoke Cloud Functions from the app.










share|improve this question














I have 3 collections, namely x.cards, y.cards and z.cards. I'd like to sent out a notification to corresponding users whenever a new card is created in any of the 3 collections. What's the best practice to listen to all 3 collections instead of listening to each collection seperately? I wanted to invoke Cloud Functions from the app.







firebase google-cloud-functions






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 28 at 7:46









Shabir HamidShabir Hamid

405 bronze badges




405 bronze badges















  • If I understand correctly you want to have 3 Collections in Google Firestore and 1 Cloud Function that will be triggered when a document is created in any of them?

    – Andrei Cusnir
    Mar 28 at 11:25











  • @Andrei Yes. That's exactly what I want.

    – Shabir Hamid
    Mar 29 at 22:27

















  • If I understand correctly you want to have 3 Collections in Google Firestore and 1 Cloud Function that will be triggered when a document is created in any of them?

    – Andrei Cusnir
    Mar 28 at 11:25











  • @Andrei Yes. That's exactly what I want.

    – Shabir Hamid
    Mar 29 at 22:27
















If I understand correctly you want to have 3 Collections in Google Firestore and 1 Cloud Function that will be triggered when a document is created in any of them?

– Andrei Cusnir
Mar 28 at 11:25





If I understand correctly you want to have 3 Collections in Google Firestore and 1 Cloud Function that will be triggered when a document is created in any of them?

– Andrei Cusnir
Mar 28 at 11:25













@Andrei Yes. That's exactly what I want.

– Shabir Hamid
Mar 29 at 22:27





@Andrei Yes. That's exactly what I want.

– Shabir Hamid
Mar 29 at 22:27












1 Answer
1






active

oldest

votes


















1
















There is currently no way to listen across multiple collections in Firestore.



Allowing queries across collections is being considered, but as usual there are no timelines of when (or even if) that will be available.



Also see:



  • Firestore query subcollections





share|improve this answer
























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );














    draft saved

    draft discarded
















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55392446%2flisten-to-document-changes-in-an-arbitary-collection%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1
















    There is currently no way to listen across multiple collections in Firestore.



    Allowing queries across collections is being considered, but as usual there are no timelines of when (or even if) that will be available.



    Also see:



    • Firestore query subcollections





    share|improve this answer





























      1
















      There is currently no way to listen across multiple collections in Firestore.



      Allowing queries across collections is being considered, but as usual there are no timelines of when (or even if) that will be available.



      Also see:



      • Firestore query subcollections





      share|improve this answer



























        1














        1










        1









        There is currently no way to listen across multiple collections in Firestore.



        Allowing queries across collections is being considered, but as usual there are no timelines of when (or even if) that will be available.



        Also see:



        • Firestore query subcollections





        share|improve this answer













        There is currently no way to listen across multiple collections in Firestore.



        Allowing queries across collections is being considered, but as usual there are no timelines of when (or even if) that will be available.



        Also see:



        • Firestore query subcollections






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 28 at 13:53









        Frank van PuffelenFrank van Puffelen

        274k36 gold badges446 silver badges466 bronze badges




        274k36 gold badges446 silver badges466 bronze badges





















            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.




















            draft saved

            draft discarded















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55392446%2flisten-to-document-changes-in-an-arbitary-collection%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

            Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript