The distributed serverless database combining the flexibility of NoSQL with the relational querying capabilities of SQL systems.
Emit new event each time you add or remove a document from a specific collection, with the details of the document.
Write custom Node.js code and use any of the 400k+ npm packages available. Refer to the Pipedream Node docs to learn more.
Performs an arbitrary authorized GraphQL query. See docs here
Reads all documents from a given Fauna collection. See docs here
module.exports = defineComponent({
props: {
faunadb: {
type: "app",
app: "faunadb",
}
},
async run({steps, $}) {
const faunadb = require('faunadb')
const q = faunadb.query
const client = new faunadb.Client({ secret: this.faunadb.$auth.secret })
// Lists collections in the database tied to your secret key
const collectionsPaginator = await client.paginate(q.Collections())
this.collections = []
await collectionsPaginator.each(page => {
for (const collection of page) {
this.collections.push(collection.id)
}
})
},
})
// To use previous step data, pass the `steps` object to the run() function
export default defineComponent({
async run({ steps, $ }) {
// Return data to use it in future steps
return steps.trigger.event
},
})