Create multiple documents in the same operation

Hi people!! me again… maybe with another simple question… I want to know how can I create multiple (five thousand or ten thousand) documents in the same operation, when the shape of the objects are like that:

[
    { 
       propertie_one: "Propertie one",
       propertie_two: "Propertie two",
       propertie_three: "Propertie three"
    },
    {
       propertie_four: "Propertie four",
       propertie_five: "Propertie five",
    },
    {
       propertie_six: "Propertie six",
       propertie_seven: "Propertie seven",
     }
 ]

There is an example of creating multiple documents in a single query here: Index tutorials | Fauna Documentation

That particular example uses predefined document IDs, which you might want to remove for your use case.

Be aware that there are limits to query sizes that might impact how many documents you can create at once: Documents | Fauna Documentation

Thanks for your help @ewan…!!!

1 Like