Foxx Archives - Page 2 of 4 - ArangoDB

Sign up for ArangoGraph Insights Platform

Before signing up, please accept our terms & conditions and privacy policy.

What to expect after you signup
You can try out ArangoDB Cloud FREE for 14 days. No credit card required and you are not obligated to keep using ArangoDB Cloud.

At the end of your free trial, enter your credit card details to continue using ArangoDB Cloud.

If you decide that ArangoDB Cloud is not (yet) for you, you can simply leave and come back later.

How to model customer surveys in a graph database

12Foxx, General, GraphsTags: ,

Use-Case

The graph database use-case we are stepping through in this post is the following: In our web application we have several places where a user is led through a survey, where she decides on details for one of our products. Some of the options within the survey depend on previous decisions and some are independent.

Examples:

  • Configure a new car
  • Configure a new laptop
  • Book extras with your flight (meal, reserve seat etc.)
  • Configure a new complete kitchen
  • Collect customer feedback via logic-jump surveys

Read more

Foxx: Module resolution will change in 2.8

03Documentation, FoxxTags: , ,

The implementation of the JavaScript require function will be adjusted to improve compatibility with npm modules. The current implementation in 2.7 and earlier versions of ArangoDB strictly adheres to the CommonJS module standard, which deviates from the behaviour implemented in Node and browser bundlers.

Module paths will now be resolved in the following ways: Read more

GA of ArangoDB 2.7 – Big + for Indexes, Throughput, AQL and Foxx

00GeneralTags: ,

Long awaited and now we´ve finished it! New major release of ArangoDB 2.7 is ready for download. First of all a big thanks to our community for your great support! We´ve implemented a lot of your ideas! After your feedback to RC1 and RC2 we are happy to bring a new major release to the world. With ArangoDB 2.7 we increased our performance even further and improved query handling a lot. Read more

Document your Foxx apps with Swagger 2

00FoxxTags:

The generated API documentation in ArangoDB 2.6 has been updated to Swagger 2. To see the API documentation for any of your Foxx apps, open the web admin frontend and select your app from the Applications tab. For information on how to describe your own APIs in the generated documentation, see the ArangoDB documentation.

But wait, there’s more! In addition to being shown in the web admin frontend, ArangoDB 2.6 allows you to mount your app’s documentation inside the app itself. Using the new controller method apiDocumentation you can define a mount point for the app’s own documentation and apply the same access controls you already use for other routes. Depending on your needs, you can even mount the documentation of other apps in your own Foxx app, use different assets or even your own Swagger API description files. In fact, the new API documentation viewer of the web admin frontend itself is using it.

For more information on the apiDocumentation method, see the documentation. If you want to give the feature a try yourself, check out ArangoDB 3.0 or compile the latest development version from the GitHub repository.

Foxx Dependencies for More Composable Foxx Apps

00FoxxTags:

Previously on the ArangoDB blog we saw how we can use the configuration field in manifest.json to make Foxx apps configurable and more re-usable. This is all well and good if we just want to pass in simple values to a Foxx app but sometimes you want to pass in entire Foxx apps. This is where dependencies come in to save the day.

Let’s say you want to use the session storage provided by the ArangoDB sessions app available on the Foxx app store using Foxx exports and imports. Because you hadn’t yet heard of configurations, you simply hard-coded the mount path of your copy of the sessions app in your code: More info

Reusable Foxx Apps with Configurations

02FoxxTags:

While the optional configuration field in Foxx manifests had experimental support all the way back to ArangoDB 2.1, the feature was previously undocumented and not well understood. The upcoming ArangoDB 2.6 release officially introduces Foxx configurations, allowing you to make your existing Foxx apps more re-usable and to make better use of third-party apps.

Let’s say your Foxx app needs an API key to make a request to a third-party service using the request module introduced in ArangoDB 2.5. More info

Testing: Foxx + Mocha = <3

01FoxxTags: ,

Foxx + Mocha

Some of the most frequent questions by new programmers learning Foxx have been about testing. While the HTTP API can easily be tested with any HTTP client and any JavaScript code that can be isolated from the ArangoDB APIs could be tested in similar environments like Node.js or io.js, it was all but impossible to test Foxx apps inside ArangoDB.

The upcoming release of ArangoDB sets out to change this. As of version 2.6, ArangoDB Foxx will come with full support for Mocha tests allowing you to use the same test framework for your frontend code in the browser, your server-side code running on Node.js or io.js, and your backend logic in Foxx. More info