arangodb / arangojs

The official ArangoDB JavaScript driver.
https://arangodb.github.io/arangojs
Apache License 2.0
600 stars 106 forks source link

Documentation: How can we perform async requests with this library? #772

Closed sarahhenkens closed 2 years ago

sarahhenkens commented 2 years ago

ArangoDB supports async queries with the x-arango-async header which returns a job id in the response headers. The documentation is lacking any mention about async operation. Is this supported?

pluma4345 commented 2 years ago

The driver does not currently implement the async API as it isn't entirely clear what the TS/JS API should look like (having different return types based on option attributes is a bit icky). You can still use the driver to perform async requests but you'll have to use the Routes API (db.route) to perform arbitrary HTTP requests agains the ArangoDB HTTP API.

pluma4345 commented 2 years ago

I'm closing this as a duplicate of #640. Feel free to reopen if you think this is a mistake.