I finally got the firebase connector working. Well, working in theory. On REST API I can map schema from response. On this I have to know how to map i- which I don’t
and because everything in appgyver wants an object I used MAP(someStuff.aList, {item:item}) to create an object with one property, which I assigned to an variable list of objects with one property, and then I can do stuff like put it into repeats and all the other jazz that appgyver looks for.
Just a quick question. Did you set up Data resources after completing the Connector setup?
It seems like you have an already created document in Firestore and it was not created by a schema set in the Appgyver Data tab.
I must have missed something - I didn’t know I was able to define the schema through appgyver. I am going to give this a try. Everything I have seen so far has had me building the resource first, and then matching appgyver to it. Going to give this a try
First You set up Connector and then create Data resources under the Data resources tab with the “Firebase Connector / Cloud Firestore” option in the "Add data resource dropdown in the top right corner.
After this You can simply use the “Get record collection”, “Get record”, “Create record” and “Update record” flow functions.
When specifying the data resource you specify a collection in Firebase and also the full data scheme You want to use later.
Note that Firestore doesn’t have all the types AG supports, so stick with text, number, datetime/text, list of texts or list of numbers or list of nulls, null, true/false is also supported. Other types may cause You problems.
Also another thing to note.
Firestore will only create those properties which have any kind of data assigned to it in the Create record flow function. This is why even if initially You don’t have data for all the properties, assign some dummy data (or even “null” value to it). This way “Update record” will work perfectly. If there is a missing property and you try to use the “Update record” flow function it will throw an error, as there is no property to update.