{"id":13795386,"url":"https://github.com/arangodb/arangojs","last_synced_at":"2026-04-14T08:02:04.713Z","repository":{"id":20817573,"uuid":"24103275","full_name":"arangodb/arangojs","owner":"arangodb","description":"The official ArangoDB JavaScript driver.","archived":false,"fork":false,"pushed_at":"2026-01-16T10:30:27.000Z","size":22949,"stargazers_count":608,"open_issues_count":5,"forks_count":110,"subscribers_count":67,"default_branch":"main","last_synced_at":"2026-01-18T11:22:15.905Z","etag":null,"topics":["arangodb","database","driver","javascript","nodejs","nosql"],"latest_commit_sha":null,"homepage":"https://arangodb.github.io/arangojs","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arangodb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2014-09-16T14:36:56.000Z","updated_at":"2026-01-16T10:27:39.000Z","dependencies_parsed_at":"2024-05-15T22:28:48.738Z","dependency_job_id":"5439d91e-fe83-4c6f-aeac-56f4d86fcafb","html_url":"https://github.com/arangodb/arangojs","commit_stats":{"total_commits":1664,"total_committers":54,"mean_commits":"30.814814814814813","dds":0.2776442307692307,"last_synced_commit":"db0a76e8f47cd908fc3d77f8f23ae4e47a7ba551"},"previous_names":[],"tags_count":139,"template":false,"template_full_name":null,"purl":"pkg:github/arangodb/arangojs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arangodb%2Farangojs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arangodb%2Farangojs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arangodb%2Farangojs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arangodb%2Farangojs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arangodb","download_url":"https://codeload.github.com/arangodb/arangojs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arangodb%2Farangojs/sbom","scorecard":{"id":205090,"data":{"date":"2025-08-11","repo":{"name":"github.com/arangodb/arangojs","commit":"4c3522808abd92c2bf32e9f9e138dcdbe480b60e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.2,"checks":[{"name":"Code-Review","score":0,"reason":"Found 2/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":4,"reason":"5 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml:26","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml:27","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Warn: no topLevel permission defined: .github/workflows/docs.yml:1","Warn: no topLevel permission defined: .github/workflows/tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/arangodb/arangojs/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/arangodb/arangojs/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/arangodb/arangojs/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:69: update your workflow using https://app.stepsecurity.io/secureworkflow/arangodb/arangojs/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/arangodb/arangojs/docs.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/arangodb/arangojs/docs.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docs.yml:82: update your workflow using https://app.stepsecurity.io/secureworkflow/arangodb/arangojs/docs.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/arangodb/arangojs/tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/arangodb/arangojs/tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:80: update your workflow using https://app.stepsecurity.io/secureworkflow/arangodb/arangojs/tests.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/docs.yml:34","Warn: npmCommand not pinned by hash: .github/workflows/docs.yml:35","Warn: npmCommand not pinned by hash: .github/workflows/tests.yml:38","Warn: npmCommand not pinned by hash: .github/workflows/tests.yml:39","Warn: npmCommand not pinned by hash: .github/workflows/tests.yml:71","Warn: npmCommand not pinned by hash: .github/workflows/tests.yml:72","Warn: npmCommand not pinned by hash: .github/workflows/tests.yml:72","Info:   0 out of   9 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   7 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":7,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T23:33:34.528Z","repository_id":20817573,"created_at":"2025-08-16T23:33:34.528Z","updated_at":"2025-08-16T23:33:34.528Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28684018,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T05:48:07.525Z","status":"ssl_error","status_checked_at":"2026-01-23T05:48:07.129Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arangodb","database","driver","javascript","nodejs","nosql"],"created_at":"2024-08-03T23:00:55.466Z","updated_at":"2026-01-23T08:10:56.972Z","avatar_url":"https://github.com/arangodb.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","nosql","Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# ArangoDB JavaScript Driver\n\nThe official ArangoDB JavaScript client for Node.js and the browser.\n\n[![license - APACHE-2.0](https://img.shields.io/npm/l/arangojs.svg)](http://opensource.org/licenses/APACHE-2.0)\n[![Tests](https://github.com/arangodb/arangojs/workflows/Tests/badge.svg)](https://github.com/arangodb/arangojs/actions?query=workflow:Tests)\n\n[![npm package status](https://nodei.co/npm/arangojs.png?downloads=true\u0026stars=true)](https://npmjs.org/package/arangojs)\n\n## Links\n\n- [API Documentation](https://arangodb.github.io/arangojs/latest/modules/index.html)\n\n- [Changelog](https://arangodb.github.io/arangojs/CHANGELOG)\n\n- [Migration Guide](http://arangodb.github.io/arangojs/MIGRATING)\n\n## Install\n\n### With npm or yarn\n\n```sh\nnpm install --save arangojs\n## - or -\nyarn add arangojs\n```\n\n### For browsers\n\nWhen using modern JavaScript tooling with a bundler and compiler (e.g. Babel),\narangojs can be installed using `npm` or `yarn` like any other dependency.\n\nYou can also use [jsDelivr CDN](https://www.jsdelivr.com) during development:\n\n```html\n\u003cscript type=\"importmap\"\u003e\n  {\n    \"imports\": {\n      \"arangojs\": \"https://cdn.jsdelivr.net/npm/arangojs@10.0.0/esm/index.js?+esm\"\n    }\n  }\n\u003c/script\u003e\n\u003cscript type=\"module\"\u003e\n  import { Database } from \"arangojs\";\n  const db = new Database();\n  // ...\n\u003c/script\u003e\n```\n\n## Basic usage example\n\nModern JavaScript/TypeScript with async/await and ES Modules:\n\n```js\nimport { Database, aql } from \"arangojs\";\n\nconst db = new Database();\nconst Pokemons = db.collection(\"my-pokemons\");\n\nasync function main() {\n  try {\n    const pokemons = await db.query(aql`\n      FOR pokemon IN ${Pokemons}\n      FILTER pokemon.type == \"fire\"\n      RETURN pokemon\n    `);\n    console.log(\"My pokemans, let me show you them:\");\n    for await (const pokemon of pokemons) {\n      console.log(pokemon.name);\n    }\n  } catch (err) {\n    console.error(err.message);\n  }\n}\n\nmain();\n```\n\nUsing a different database:\n\n```js\nconst db = new Database({\n  url: \"http://127.0.0.1:8529\",\n  databaseName: \"pancakes\",\n  auth: { username: \"root\", password: \"hunter2\" },\n});\n\n// The credentials can be swapped at any time\ndb.useBasicAuth(\"admin\", \"maplesyrup\");\n```\n\nOld-school JavaScript with promises and CommonJS:\n\n```js\nvar arangojs = require(\"arangojs\");\nvar Database = arangojs.Database;\n\nvar db = new Database();\nvar pokemons = db.collection(\"pokemons\");\n\ndb.query({\n  query: \"FOR p IN @@c FILTER p.type == 'fire' RETURN p\",\n  bindVars: { \"@c\": \"pokemons\" },\n})\n  .then(function (cursor) {\n    console.log(\"My pokemons, let me show you them:\");\n    return cursor.forEach(function (pokemon) {\n      console.log(pokemon.name);\n    });\n  })\n  .catch(function (err) {\n    console.error(err.message);\n  });\n```\n\n**Note**: The examples throughout this documentation use `async`/`await`\nand other modern language features like multi-line strings and template tags.\nWhen developing for an environment without support for these language features,\nsubstitute promises for `await` syntax as in the above example.\n\n## Compatibility\n\nThe arangojs driver is compatible with the latest stable version of ArangoDB\navailable at the time of the driver release and remains compatible with the\ntwo most recent Node.js LTS versions in accordance with the official\n[Node.js long-term support schedule](https://github.com/nodejs/LTS). Versions\nof ArangoDB that have reached their [end of life](https://arangodb.com/subscriptions/end-of-life-notice/)\nby the time of a driver release are explicitly not supported.\n\nFor a list of changes between recent versions of the driver, see the\n[CHANGELOG](https://arangodb.github.io/arangojs/CHANGELOG).\n\n**Note:** arangojs is only intended to be used in Node.js or a browser to access\nArangoDB **from outside the database**. If you are looking for the ArangoDB\nJavaScript API for [Foxx](https://foxx.arangodb.com) or for accessing ArangoDB\nfrom within the `arangosh` interactive shell, please refer to the documentation\nof the [`@arangodb` module](https://www.arangodb.com/docs/stable/foxx-reference-modules.html#the-arangodb-module)\nand [the `db` object](https://www.arangodb.com/docs/stable/appendix-references-dbobject.html) instead.\n\n## Error responses\n\nIf the server returns an ArangoDB error response, arangojs will throw an\n`ArangoError` with an `errorNum` property indicating the ArangoDB error code\nand expose the response body as the `response` property of the error object.\n\nFor all other errors during the request/response cycle, arangojs will throw a\n`NetworkError` or a more specific subclass thereof and expose the originating\nrequest object as the `request` property of the error object.\n\nIf the server responded with a non-2xx status code, this `NetworkError` will\nbe an `HttpError` with a `code` property indicating the HTTP status code of the\nresponse and a `response` property containing the response object itself.\n\nIf the error is caused by an exception, the originating exception will be\navailable as the `cause` property of the error object thrown by arangojs. For\nnetwork errors, this will often be a `TypeError`.\n\n### Node.js network errors\n\nIn Node.js, network errors caused by a `TypeError` will often have a `cause`\nproperty containing a more detailed exception.\n\nSpecifically, these are often either system errors (represented by regular\n`Error` objects with additional properties) or errors from the `undici` module\nNode.js uses internally for its native `fetch` implementation.\n\nNode.js system error objects provide a `code` property containing the specific\nstring error code, a `syscall` property identifying the underlying system call\nthat triggered the error (e.g. `connect`), as well as other helpful properties.\n\nFor more details on Node.js system errors, see the Node.js documentation of the\n[`SystemError` interface](https://nodejs.org/api/errors.html#class-systemerror)\nas well as the section on\n[Node.js error codes](https://nodejs.org/api/errors.html#nodejs-error-codes).\n\nFor more details on the errors thrown by `undici`, see the\n[undici errors documentation](https://undici.nodejs.org/#/docs/api/Errors.md).\n\n## Common issues\n\n### Unexpected server errors\n\nPlease make sure you are using the latest version of this driver and that the\nversion of the arangojs documentation you are reading matches that version.\n\nChanges in the major version number of arangojs (e.g. 9.x.y -\u003e 10.0.0) indicate\nbackwards-incompatible changes in the arangojs API that may require changes in\nyour code when upgrading your version of arangojs.\n\nAdditionally please ensure that your version of Node.js (or browser) and\nArangoDB are supported by the version of arangojs you are trying to use. See\nthe [compatibility section](#compatibility) for additional information.\n\nYou can install an older version of arangojs using `npm` or `yarn`:\n\n```sh\n# for version 9.x.x\nyarn add arangojs@9\n# - or -\nnpm install --save arangojs@9\n```\n\n### No code intelligence when using require instead of import\n\nIf you are using `require` to import the `arangojs` module in JavaScript, the\ndefault export might not be recognized as a function by the code intelligence\nof common editors like Visual Studio Code, breaking auto-complete and other\nuseful features.\n\nAs a workaround, use the `arangojs` function exported by that module instead\nof calling the module itself:\n\n```diff\n  const arangojs = require(\"arangojs\");\n\n- const db = arangojs({\n+ const db = arangojs.arangojs({\n    url: ARANGODB_SERVER,\n  });\n```\n\nAlternatively you can use the `Database` class directly:\n\n```diff\n  const arangojs = require(\"arangojs\");\n+ const Database = arangojs.Database;\n\n- const db = arangojs({\n+ const db = new Database({\n    url: ARANGODB_SERVER,\n  });\n```\n\nOr using object destructuring:\n\n```diff\n- const arangojs = require(\"arangojs\");\n+ const { Database } = require(\"arangojs\");\n\n- const db = arangojs({\n+ const db = new Database({\n    url: ARANGODB_SERVER,\n  });\n```\n\n### Error stack traces contain no useful information\n\nDue to the async, queue-based behavior of arangojs, the stack traces generated\nwhen an error occur rarely provide enough information to determine the location\nin your own code where the request was initiated.\n\nUsing the `precaptureStackTraces` configuration option, arangojs will attempt\nto always generate stack traces proactively when a request is performed,\nallowing arangojs to provide more meaningful stack traces at the cost of an\nimpact to performance even when no error occurs.\n\n```diff\n  import { Database } from \"arangojs\";\n\n  const db = new Database({\n    url: ARANGODB_SERVER,\n+   precaptureStackTraces: true,\n  });\n```\n\nNote that arangojs will attempt to use `Error.captureStackTrace` if available\nand fall back to generating a stack trace by throwing an error. In environments\nthat do not support the `stack` property on error objects, this option will\nstill impact performance but not result in any additional information becoming\navailable.\n\n### Unix domain sockets\n\nIf you want to use Unix domain sockets, you need to install the `undici` module,\nwhich is an optional peer dependency of arangojs.\n\n```sh\nnpm install --save undici\n```\n\nIf the `undici` module is not installed and arangojs attempts to make a request\nover a Unix domain socket, the request will fail with a plain `Error` with a\nmessage indicating that the `undici` module is unavailable.\n\n### Node.js with self-signed HTTPS certificates\n\nIf you need to support self-signed HTTPS certificates in Node.js, you will need\nto install the `undici` module, which is an optional peer dependency of\narangojs.\n\n```sh\nnpm install --save undici\n```\n\nYou can instruct arangojs to use the `undici` module by setting the\n`config.agentOptions` option:\n\n```diff\n  import { Database } from \"arangojs\";\n\n  const db = new Database({\n    url: ARANGODB_SERVER,\n+   agentOptions: {\n+     ca: [\n+       fs.readFileSync(\".ssl/sub.class1.server.ca.pem\"),\n+       fs.readFileSync(\".ssl/ca.pem\"),\n+     ],\n+   },\n  });\n```\n\nTo override the global fetch agent instead, you can use the `undici` module's\n`setGlobalDispatcher` method as follows:\n\n```js\nimport { Agent, setGlobalDispatcher } from \"undici\";\n\nsetGlobalDispatcher(\n  new Agent({\n    ca: [\n      fs.readFileSync(\".ssl/sub.class1.server.ca.pem\"),\n      fs.readFileSync(\".ssl/ca.pem\"),\n    ],\n  })\n);\n```\n\nAlthough this is **strongly discouraged**, it's also possible to disable\nHTTPS certificate validation entirely this way, but note this has\n**extremely dangerous** security implications:\n\n```diff\n  import { Database } from \"arangojs\";\n\n  const db = new Database({\n    url: ARANGODB_SERVER,\n+   agentOptions: {\n+     rejectUnauthorized: false,\n+   },\n  });\n```\n\nThe requirement to use the `undici` module to override these settings is a\n[known limitation](https://github.com/orgs/nodejs/discussions/44038#discussioncomment-5701073)\nof Node.js at the time of this writing.\n\nWhen using arangojs in the browser, self-signed HTTPS certificates need to\nbe trusted by the browser or use a trusted root certificate.\n\n### Streaming transactions leak\n\nWhen using the `transaction.step` method it is important to be aware of the\nlimitations of what a callback passed to this method is allowed to do.\n\n```js\nconst collection = db.collection(collectionName);\nconst trx = db.transaction(transactionId);\n\n// WARNING: This code will not work as intended!\nawait trx.step(async () =\u003e {\n  await collection.save(doc1);\n  await collection.save(doc2); // Not part of the transaction!\n});\n\n// INSTEAD: Always perform a single operation per step:\nawait trx.step(() =\u003e collection.save(doc1));\nawait trx.step(() =\u003e collection.save(doc2));\n```\n\nPlease refer to the [documentation of the `transaction.step` method](https://arangodb.github.io/arangojs/latest/classes/transaction.Transaction.html#step)\nfor additional examples.\n\n### Streaming transactions timeout in cluster\n\nExample messages: `transaction not found`, `transaction already expired`.\n\nTransactions have\n[different guarantees](https://www.arangodb.com/docs/stable/transactions-limitations.html#in-clusters)\nin a cluster.\n\nWhen using arangojs in a cluster with load balancing, you may need to adjust\nthe value of `config.poolSize` to accommodate the number of transactions\nyou need to be able to run in parallel. The default value is likely to be too\nlow for most cluster scenarios involving frequent streaming transactions.\n\n**Note**: When using a high value for `config.poolSize` you may have\nto adjust the maximum number of threads in the ArangoDB configuration using\n[the `server.maximal-threads` option](https://www.arangodb.com/docs/3.7/programs-arangod-server.html#server-threads)\nto support larger numbers of concurrent transactions on the server side.\n\n## License\n\nThe Apache License, Version 2.0. For more information, see the accompanying\nLICENSE file.\n\nIncludes code from [x3-linkedlist](https://github.com/x3cion/x3-linkedlist)\nused under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farangodb%2Farangojs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farangodb%2Farangojs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farangodb%2Farangojs/lists"}