As far as I know Arango does not include Auditing out of the box. Below are my notes on how to handle service dependencies in Foxx. The official documentation can be found here . The doc seems confusing to me, so I put some notes once I figured it out :)
Let's say we have service1 which contains function1. We want to call function1 from service2.
1.- In the top level main.js file of service1 export function1
module.exports.function1 = function1;
2.- In the manifest of service1 add a provides section:
"provides" :{
"@generic/generic" : "0.0.1"
},
– In the above, “@generic” is a namespace and “generic” is the name that will be used to reference this particual dependency. Note that the namespace does not have to be unique to this one service and can be used in other services (e.g.”@generic/helper”)
3.- Modify the manifest of service2, which will be consuming the dependency, so that it is aware of the dependency.
"generic": {
"name": "@generic/generic",
"version": "^0.0.1",
"description": "Generic collection get",
"required": false,
"multiple":false
}
– In the above, the top level label (“generic”) is an alias for the dependency, it really can be anything as long as it is unique among all the dependencies listed in the manifest. “name” refers to the dependency defined on the manifest of service1. The other options are self explanatory.
4.- In the Arango web Gui, go to settings of service2 and click the dependencies buttons to add the mount point for the dependency( top right corner). If the button is not enabled, make sure that the changes to service2 manifest have been saved and the service has been updated in Arango)
/generic
5.- Finally, in the code for service2, reference the dependency using the dependencies of the context object
var generic = module.context.dependencies.generic;
const collection = generic.function1(param1,...);