Related modules

    Additionally there are modules providing some level of compatibility with Node.js as well as a number of bundled NPM modules (like lodash and joi). For more information on these modules see the JavaScript modules appendix.

    require('@arangodb')

    This module provides access to various ArangoDB internals as well as three of the most important exports necessary to work with the database in Foxx: , aql and errors.

    require('@arangodb/locals')

    This module provides a context object which is identical to the of whichever module requires it.

    There is no advantage to using this module over the variable directly unless you’re using a tool like Webpack to translate your code and can’t use the module object Foxx provides directly.

    This module provides a function for making HTTP requests to external services. Note that while this allows communicating with third-party services it may affect database performance by blocking Foxx requests as ArangoDB waits for the remote service to respond. If you routinely make requests to slow external services and are not directly interested in the response it is probably a better idea to delegate the actual request/response cycle to a gateway service running outside ArangoDB.

    You can find a full description of this module in the .

    require('@arangodb/general-graph')

    For more information see the chapter on the general graph module.