The Create query creates a document just fine in the specified collection;
however in the exact same step the CreateDatabase query yields a Validation Error.
If the database has been sufficiently authenticated for the Create query, why wouldn’t
it also hold sufficient for the CreateDatabase query running in the exact same step?
I included the CreateDatabase query in a step that successfully executed;
then I commented out the working query (Create), leaving only the CreateDatabase query to run on its own.
I’ve attached a screenshot; Please let me know your thoughts.
Never mind this one. This was definitely “User Error” on my part.
I’m having to learn Pipedream, Nodejs, & FQL on the fly, so I was making some faulty assumptions with this query.
Why I was insisting on using the “data” parm, and not the “name” parm
and why I didn’t see and catch this until just now will remain a mystery.
It did work when I made this very simple substitution…EUREKA!
My apologies, but I’ve been so intensely preoccupied in building up this API to work,
when I just needed to lighten up and take a step back, and just look with simplicity.
Been working and staring at my screen for way too long, under way too much pressure,
but I think I’ve finally touched back down to earth now.
But amazingly, my Back-End-Stack is starting to gel!
When I commented out the “Create” query, I also copied and pasted
a portion of it to preserve some formatting for the “CreateDatabase” query
and in doing so, the “data” parm was left intact, and didn’t appear out of place
as many Nodejs objects readily use this parm so very often.
So my faulty assumption was that the “data” parm was also included
in the “CreateDatabase” query. So then I was just disregarding it.
And because the error that was thrown was a "Validation Error,"
I immediately thought "authentication."
I think had I seen an “Invalid Query” type message, it would have drawn
my attention to the query , and not authentication, as the error focus.