# @samwinslow/edgedb

> The official Node.js client library for EdgeDB

Latest version **0.22.8** (published 2022-09-27) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @samwinslow/edgedb
pnpm add @samwinslow/edgedb
yarn add @samwinslow/edgedb
bun add @samwinslow/edgedb
```

Provides the command `edgeql-js`.

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.22.8 |
| Published | 2022-09-27 |
| First published | 2022-08-12 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >= 10.0.0 |
| Dependencies | 458 |
| Unpacked size | 2.3 MB |
| Known vulnerabilities | 0 (+18 in 6 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | EdgeDB |
| Maintainers | samwinslow |

## Links

- npm: https://www.npmjs.com/package/@samwinslow/edgedb
- Repository: https://github.com/samwinslow/edgedb-js
- Homepage: https://edgedb.com/docs
- Issues: https://github.com/samwinslow/edgedb-js/issues
- npm.io page: https://npm.io/package/@samwinslow/edgedb

## Dependencies (458)

- [co](https://npm.io/package/co.md) ^4.6.0
- [ip](https://npm.io/package/ip.md) ^1.1.5
- [ms](https://npm.io/package/ms.md) ^2.1.3
- [rc](https://npm.io/package/rc.md) ^1.2.8
- [ws](https://npm.io/package/ws.md) ^7.5.5
- [got](https://npm.io/package/got.md) ^9.6.0
- [has](https://npm.io/package/has.md) ^1.0.3
- [ini](https://npm.io/package/ini.md) ^2.0.0
- [psl](https://npm.io/package/psl.md) ^1.8.0
- [ret](https://npm.io/package/ret.md) ^0.1.15
- [tar](https://npm.io/package/tar.md) ^6.1.11
- [use](https://npm.io/package/use.md) ^3.1.1
- [abab](https://npm.io/package/abab.md) ^2.0.5
- [atob](https://npm.io/package/atob.md) ^2.1.2
- [base](https://npm.io/package/base.md) ^0.11.2
- [bser](https://npm.io/package/bser.md) ^2.1.1
- [depd](https://npm.io/package/depd.md) ^1.1.2
- [diff](https://npm.io/package/diff.md) ^4.0.2
- [exit](https://npm.io/package/exit.md) ^0.1.2
- [glob](https://npm.io/package/glob.md) ^7.2.0
- [jsbi](https://npm.io/package/jsbi.md) ^4.3.0
- [keyv](https://npm.io/package/keyv.md) ^3.1.0
- [levn](https://npm.io/package/levn.md) ^0.3.0
- [nopt](https://npm.io/package/nopt.md) ^5.0.0
- [once](https://npm.io/package/once.md) ^1.4.0
- [pump](https://npm.io/package/pump.md) ^3.0.0
- [pupa](https://npm.io/package/pupa.md) ^2.1.1
- [rsvp](https://npm.io/package/rsvp.md) ^4.8.5
- [sane](https://npm.io/package/sane.md) ^4.1.0
- [ssri](https://npm.io/package/ssri.md) ^8.0.1
- [tmpl](https://npm.io/package/tmpl.md) ^1.0.5
- [tr46](https://npm.io/package/tr46.md) ^2.1.0
- [urix](https://npm.io/package/urix.md) ^0.1.0
- [uuid](https://npm.io/package/uuid.md) ^8.3.2
- [y18n](https://npm.io/package/y18n.md) ^4.0.3
- [acorn](https://npm.io/package/acorn.md) ^8.5.0
- [boxen](https://npm.io/package/boxen.md) ^5.1.2
- [chalk](https://npm.io/package/chalk.md) ^4.1.2
- [cliui](https://npm.io/package/cliui.md) ^6.0.0
- [cssom](https://npm.io/package/cssom.md) ^0.4.4
- [debug](https://npm.io/package/debug.md) ^4.3.2
- [execa](https://npm.io/package/execa.md) ^1.0.0
- [gauge](https://npm.io/package/gauge.md) ^2.7.4
- [is-ci](https://npm.io/package/is-ci.md) ^2.0.0
- [isexe](https://npm.io/package/isexe.md) ^2.0.0
- [jsdom](https://npm.io/package/jsdom.md) ^16.7.0
- [jsesc](https://npm.io/package/jsesc.md) ^2.5.2
- [json5](https://npm.io/package/json5.md) ^2.2.0
- [kleur](https://npm.io/package/kleur.md) ^3.0.3
- [leven](https://npm.io/package/leven.md) ^3.1.0
- [p-map](https://npm.io/package/p-map.md) ^4.0.0
- [p-try](https://npm.io/package/p-try.md) ^2.2.0
- [retry](https://npm.io/package/retry.md) ^0.12.0
- [saxes](https://npm.io/package/saxes.md) ^5.0.1
- [slash](https://npm.io/package/slash.md) ^3.0.0
- [socks](https://npm.io/package/socks.md) ^2.6.1
- [touch](https://npm.io/package/touch.md) ^3.1.0
- [tslib](https://npm.io/package/tslib.md) ^1.14.1
- [which](https://npm.io/package/which.md) ^2.0.2
- [yargs](https://npm.io/package/yargs.md) ^15.4.1
- [abbrev](https://npm.io/package/abbrev.md) ^1.1.1
- [aproba](https://npm.io/package/aproba.md) ^1.2.0
- [braces](https://npm.io/package/braces.md) ^3.0.2
- [chownr](https://npm.io/package/chownr.md) ^2.0.0
- [expect](https://npm.io/package/expect.md) ^26.6.2
- [for-in](https://npm.io/package/for-in.md) ^1.0.2
- [growly](https://npm.io/package/growly.md) ^1.3.0
- [is-npm](https://npm.io/package/is-npm.md) ^5.0.0
- [is-obj](https://npm.io/package/is-obj.md) ^2.0.0
- [is-wsl](https://npm.io/package/is-wsl.md) ^2.2.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [mkdirp](https://npm.io/package/mkdirp.md) ^1.0.4
- [npmlog](https://npm.io/package/npmlog.md) ^4.1.2
- [nwsapi](https://npm.io/package/nwsapi.md) ^2.2.0
- [parse5](https://npm.io/package/parse5.md) ^6.0.1
- [rimraf](https://npm.io/package/rimraf.md) ^3.0.2
- [semver](https://npm.io/package/semver.md) ^6.3.0
- [throat](https://npm.io/package/throat.md) ^5.0.0
- [walker](https://npm.io/package/walker.md) ^1.0.8
- [wrappy](https://npm.io/package/wrappy.md) ^1.0.2
- [cacache](https://npm.io/package/cacache.md) ^15.3.0
- [ci-info](https://npm.io/package/ci-info.md) ^2.0.0
- [deep-is](https://npm.io/package/deep-is.md) ^0.1.4
- [esbuild](https://npm.io/package/esbuild.md) ^0.14.49
- [esprima](https://npm.io/package/esprima.md) ^4.0.1
- [esutils](https://npm.io/package/esutils.md) ^2.0.3
- [exec-sh](https://npm.io/package/exec-sh.md) ^0.3.6
- [extglob](https://npm.io/package/extglob.md) ^2.0.4
- [find-up](https://npm.io/package/find-up.md) ^4.1.0
- [gensync](https://npm.io/package/gensync.md) ^1.0.0-beta.2
- [globals](https://npm.io/package/globals.md) ^11.12.0
- [is-glob](https://npm.io/package/is-glob.md) ^4.0.3
- [isarray](https://npm.io/package/isarray.md) ^1.0.0
- [js-yaml](https://npm.io/package/js-yaml.md) ^3.14.1
- [kind-of](https://npm.io/package/kind-of.md) ^3.2.2
- [mime-db](https://npm.io/package/mime-db.md) ^1.51.0
- [onetime](https://npm.io/package/onetime.md) ^5.1.2
- [p-limit](https://npm.io/package/p-limit.md) ^2.3.0
- [pirates](https://npm.io/package/pirates.md) ^4.0.1
- [pkg-dir](https://npm.io/package/pkg-dir.md) ^4.2.0
- [prompts](https://npm.io/package/prompts.md) ^2.4.2
- [resolve](https://npm.io/package/resolve.md) ^1.20.0
- [tsutils](https://npm.io/package/tsutils.md) ^2.29.0
- [yallist](https://npm.io/package/yallist.md) ^4.0.0
- [anymatch](https://npm.io/package/anymatch.md) ^3.1.2
- [argparse](https://npm.io/package/argparse.md) ^1.0.10
- [arr-diff](https://npm.io/package/arr-diff.md) ^4.0.0
- [asynckit](https://npm.io/package/asynckit.md) ^0.4.0
- [chokidar](https://npm.io/package/chokidar.md) ^3.5.2
- [cssstyle](https://npm.io/package/cssstyle.md) ^2.3.0
- [dot-prop](https://npm.io/package/dot-prop.md) ^5.3.0
- [emittery](https://npm.io/package/emittery.md) ^0.7.2
- [encoding](https://npm.io/package/encoding.md) ^0.1.13
- [err-code](https://npm.io/package/err-code.md) ^2.0.3
- [error-ex](https://npm.io/package/error-ex.md) ^1.3.2
- [escalade](https://npm.io/package/escalade.md) ^3.1.1
- [has-flag](https://npm.io/package/has-flag.md) ^4.0.0
- [has-yarn](https://npm.io/package/has-yarn.md) ^2.1.0
- [inflight](https://npm.io/package/inflight.md) ^1.0.6
- [inherits](https://npm.io/package/inherits.md) ^2.0.4
- [isobject](https://npm.io/package/isobject.md) ^3.0.1
- [jest-cli](https://npm.io/package/jest-cli.md) ^26.6.3
- [make-dir](https://npm.io/package/make-dir.md) ^3.1.0
- [mimic-fn](https://npm.io/package/mimic-fn.md) ^2.1.0
- [minimist](https://npm.io/package/minimist.md) ^1.2.5
- [minipass](https://npm.io/package/minipass.md) ^3.1.5
- [minizlib](https://npm.io/package/minizlib.md) ^2.1.2
- [nice-try](https://npm.io/package/nice-try.md) ^1.0.5
- [node-gyp](https://npm.io/package/node-gyp.md) ^8.4.0
- [p-locate](https://npm.io/package/p-locate.md) ^4.1.0
- [path-key](https://npm.io/package/path-key.md) ^2.0.1
- [punycode](https://npm.io/package/punycode.md) ^2.1.1
- [react-is](https://npm.io/package/react-is.md) ^16.13.1
- [read-pkg](https://npm.io/package/read-pkg.md) ^5.2.0
- [readdirp](https://npm.io/package/readdirp.md) ^3.6.0
- [to-regex](https://npm.io/package/to-regex.md) ^3.0.2
- [xmlchars](https://npm.io/package/xmlchars.md) ^2.2.0
- [arr-union](https://npm.io/package/arr-union.md) ^3.1.0
- [bs-logger](https://npm.io/package/bs-logger.md) ^0.2.6
- [callsites](https://npm.io/package/callsites.md) ^3.1.0
- [camelcase](https://npm.io/package/camelcase.md) ^5.3.1
- [cli-boxes](https://npm.io/package/cli-boxes.md) ^2.2.1
- [commander](https://npm.io/package/commander.md) ^2.20.3
- [data-urls](https://npm.io/package/data-urls.md) ^2.0.0
- [deepmerge](https://npm.io/package/deepmerge.md) ^4.2.2
- [delegates](https://npm.io/package/delegates.md) ^1.0.0
- [duplexer3](https://npm.io/package/duplexer3.md) ^0.1.4
- [env-paths](https://npm.io/package/env-paths.md) ^2.2.1
- [escodegen](https://npm.io/package/escodegen.md) ^2.0.0
- [fast-diff](https://npm.io/package/fast-diff.md) ^1.2.0
- [form-data](https://npm.io/package/form-data.md) ^3.0.1
- [get-value](https://npm.io/package/get-value.md) ^2.0.6
- [has-value](https://npm.io/package/has-value.md) ^1.0.0
- [is-buffer](https://npm.io/package/is-buffer.md) ^1.1.6
- [is-docker](https://npm.io/package/is-docker.md) ^2.2.1
- [is-lambda](https://npm.io/package/is-lambda.md) ^1.0.1
- [is-number](https://npm.io/package/is-number.md) ^3.0.0
- [is-stream](https://npm.io/package/is-stream.md) ^1.1.0
- [jest-diff](https://npm.io/package/jest-diff.md) ^26.6.2
- [jest-each](https://npm.io/package/jest-each.md) ^26.6.2
- [jest-mock](https://npm.io/package/jest-mock.md) ^26.6.2
- [jest-util](https://npm.io/package/jest-util.md) ^26.6.2
- [js-tokens](https://npm.io/package/js-tokens.md) ^4.0.0
- [lru-cache](https://npm.io/package/lru-cache.md) ^6.0.0
- [makeerror](https://npm.io/package/makeerror.md) ^1.0.12
- [map-cache](https://npm.io/package/map-cache.md) ^0.2.2
- [map-visit](https://npm.io/package/map-visit.md) ^1.0.0
- [minimatch](https://npm.io/package/minimatch.md) ^3.0.4
- [nanomatch](https://npm.io/package/nanomatch.md) ^1.2.13
- [p-finally](https://npm.io/package/p-finally.md) ^1.0.0
- [picomatch](https://npm.io/package/picomatch.md) ^2.3.0
- [regex-not](https://npm.io/package/regex-not.md) ^1.0.2
- [set-value](https://npm.io/package/set-value.md) ^2.0.1
- [strip-bom](https://npm.io/package/strip-bom.md) ^4.0.0
- [strip-eof](https://npm.io/package/strip-eof.md) ^1.0.0
- [type-fest](https://npm.io/package/type-fest.md) ^0.6.0
- [undefsafe](https://npm.io/package/undefsafe.md) ^2.0.5
- [word-wrap](https://npm.io/package/word-wrap.md) ^1.2.3
- [wrap-ansi](https://npm.io/package/wrap-ansi.md) ^6.2.0
- [acorn-walk](https://npm.io/package/acorn-walk.md) ^7.2.0
- [agent-base](https://npm.io/package/agent-base.md) ^6.0.2
- [ansi-align](https://npm.io/package/ansi-align.md) ^3.0.1
- [ansi-regex](https://npm.io/package/ansi-regex.md) ^5.0.1
- [babel-jest](https://npm.io/package/babel-jest.md) ^26.6.3
- [cache-base](https://npm.io/package/cache-base.md) ^1.0.1
- [char-regex](https://npm.io/package/char-regex.md) ^1.0.2
- [color-name](https://npm.io/package/color-name.md) ^1.1.3
- [concat-map](https://npm.io/package/concat-map.md) ^0.0.1
- [decamelize](https://npm.io/package/decamelize.md) ^1.2.0
- [decimal.js](https://npm.io/package/decimal.js.md) ^10.3.1
- [estraverse](https://npm.io/package/estraverse.md) ^5.3.0
- [fill-range](https://npm.io/package/fill-range.md) ^7.0.1
- [get-stream](https://npm.io/package/get-stream.md) ^4.1.0
- [has-values](https://npm.io/package/has-values.md) ^1.0.0
- [iconv-lite](https://npm.io/package/iconv-lite.md) ^0.6.3
- [is-extglob](https://npm.io/package/is-extglob.md) ^2.1.1
- [is-windows](https://npm.io/package/is-windows.md) ^1.0.2
- [make-error](https://npm.io/package/make-error.md) ^1.3.6
- [micromatch](https://npm.io/package/micromatch.md) ^4.0.4
- [mime-types](https://npm.io/package/mime-types.md) ^2.1.34
- [mixin-deep](https://npm.io/package/mixin-deep.md) ^1.3.2
- [negotiator](https://npm.io/package/negotiator.md) ^0.6.2
- [node-int64](https://npm.io/package/node-int64.md) ^0.4.0
- [optionator](https://npm.io/package/optionator.md) ^0.8.3
- [parse-json](https://npm.io/package/parse-json.md) ^5.2.0
- [pascalcase](https://npm.io/package/pascalcase.md) ^0.1.1
- [path-parse](https://npm.io/package/path-parse.md) ^1.0.7
- [picocolors](https://npm.io/package/picocolors.md) ^1.0.0
- [prelude-ls](https://npm.io/package/prelude-ls.md) ^1.1.2
- [safe-regex](https://npm.io/package/safe-regex.md) ^1.1.0
- [shellwords](https://npm.io/package/shellwords.md) ^0.1.1
- [sisteransi](https://npm.io/package/sisteransi.md) ^1.0.5
- [snapdragon](https://npm.io/package/snapdragon.md) ^0.8.2
- [source-map](https://npm.io/package/source-map.md) ^0.6.1
- [sprintf-js](https://npm.io/package/sprintf-js.md) ^1.0.3
- [strip-ansi](https://npm.io/package/strip-ansi.md) ^6.0.1
- [type-check](https://npm.io/package/type-check.md) ^0.3.2
- [whatwg-url](https://npm.io/package/whatwg-url.md) ^8.7.0
- [wide-align](https://npm.io/package/wide-align.md) ^1.1.5
- [ansi-styles](https://npm.io/package/ansi-styles.md) ^4.3.0
- [arr-flatten](https://npm.io/package/arr-flatten.md) ^1.1.0
- [buffer-from](https://npm.io/package/buffer-from.md) ^1.1.2
- [class-utils](https://npm.io/package/class-utils.md) ^0.3.6
- [clean-stack](https://npm.io/package/clean-stack.md) ^2.2.0
- [configstore](https://npm.io/package/configstore.md) ^5.0.1
- [cross-spawn](https://npm.io/package/cross-spawn.md) ^6.0.5
- [deep-extend](https://npm.io/package/deep-extend.md) ^0.6.0
- [emoji-regex](https://npm.io/package/emoji-regex.md) ^8.0.0
- [escape-goat](https://npm.io/package/escape-goat.md) ^2.1.1
- [fb-watchman](https://npm.io/package/fb-watchman.md) ^2.0.1
- [fs-minipass](https://npm.io/package/fs-minipass.md) ^2.1.0
- [fs.realpath](https://npm.io/package/fs.realpath.md) ^1.0.0
- [glob-parent](https://npm.io/package/glob-parent.md) ^5.1.2
- [global-dirs](https://npm.io/package/global-dirs.md) ^3.0.0
- [graceful-fs](https://npm.io/package/graceful-fs.md) ^4.2.8
- [has-unicode](https://npm.io/package/has-unicode.md) ^2.0.1
- [humanize-ms](https://npm.io/package/humanize-ms.md) ^1.2.1
- [import-lazy](https://npm.io/package/import-lazy.md) ^2.1.0
- [imurmurhash](https://npm.io/package/imurmurhash.md) ^0.1.4
- [infer-owner](https://npm.io/package/infer-owner.md) ^1.0.4
- [is-arrayish](https://npm.io/package/is-arrayish.md) ^0.2.1
- [jest-config](https://npm.io/package/jest-config.md) ^26.6.3
- [jest-runner](https://npm.io/package/jest-runner.md) ^26.6.3
- [jest-worker](https://npm.io/package/jest-worker.md) ^26.6.2
- [json-buffer](https://npm.io/package/json-buffer.md) ^3.0.0
- [locate-path](https://npm.io/package/locate-path.md) ^5.0.0
- [object-copy](https://npm.io/package/object-copy.md) ^0.1.0
- [object.pick](https://npm.io/package/object.pick.md) ^1.3.0
- [path-exists](https://npm.io/package/path-exists.md) ^4.0.0
- [pstree.remy](https://npm.io/package/pstree.remy.md) ^1.1.8
- [read-pkg-up](https://npm.io/package/read-pkg-up.md) ^7.0.1
- [resolve-cwd](https://npm.io/package/resolve-cwd.md) ^3.0.0
- [resolve-url](https://npm.io/package/resolve-url.md) ^0.2.1
- [safe-buffer](https://npm.io/package/safe-buffer.md) ^5.1.2
- [semver-diff](https://npm.io/package/semver-diff.md) ^3.1.1
- [signal-exit](https://npm.io/package/signal-exit.md) ^3.0.5
- [stack-utils](https://npm.io/package/stack-utils.md) ^2.0.5
- [symbol-tree](https://npm.io/package/symbol-tree.md) ^3.2.4
- [type-detect](https://npm.io/package/type-detect.md) ^4.0.8
- [union-value](https://npm.io/package/union-value.md) ^1.0.1
- [unique-slug](https://npm.io/package/unique-slug.md) ^2.0.2
- [unset-value](https://npm.io/package/unset-value.md) ^1.0.0
- [w3c-hr-time](https://npm.io/package/w3c-hr-time.md) ^1.0.2
- [widest-line](https://npm.io/package/widest-line.md) ^3.1.0
- [xdg-basedir](https://npm.io/package/xdg-basedir.md) ^4.0.0
- [ansi-escapes](https://npm.io/package/ansi-escapes.md) ^4.3.2
- [array-unique](https://npm.io/package/array-unique.md) ^0.3.2
- [browserslist](https://npm.io/package/browserslist.md) ^4.18.1
- [caniuse-lite](https://npm.io/package/caniuse-lite.md) ^1.0.30001280
- [capture-exit](https://npm.io/package/capture-exit.md) ^2.0.0
- [core-util-is](https://npm.io/package/core-util-is.md) ^1.0.3
- [domexception](https://npm.io/package/domexception.md) ^2.0.1
- [get-tsconfig](https://npm.io/package/get-tsconfig.md) ^4.2.0
- [html-escaper](https://npm.io/package/html-escaper.md) ^2.0.2
- [import-local](https://npm.io/package/import-local.md) ^3.0.3
- [jest-resolve](https://npm.io/package/jest-resolve.md) ^26.6.2
- [jest-runtime](https://npm.io/package/jest-runtime.md) ^26.6.3
- [jest-watcher](https://npm.io/package/jest-watcher.md) ^26.6.2
- [merge-stream](https://npm.io/package/merge-stream.md) ^2.0.0
- [npm-run-path](https://npm.io/package/npm-run-path.md) ^2.0.2
- [object-visit](https://npm.io/package/object-visit.md) ^1.0.1
- [p-cancelable](https://npm.io/package/p-cancelable.md) ^1.1.0
- [package-json](https://npm.io/package/package-json.md) ^6.5.0
- [prepend-http](https://npm.io/package/prepend-http.md) ^2.0.0
- [registry-url](https://npm.io/package/registry-url.md) ^5.1.0
- [resolve-from](https://npm.io/package/resolve-from.md) ^5.0.0
- [responselike](https://npm.io/package/responselike.md) ^1.0.2
- [safer-buffer](https://npm.io/package/safer-buffer.md) ^2.1.2
- [set-blocking](https://npm.io/package/set-blocking.md) ^2.0.0
- [smart-buffer](https://npm.io/package/smart-buffer.md) ^4.2.0
- [spdx-correct](https://npm.io/package/spdx-correct.md) ^3.1.1
- [split-string](https://npm.io/package/split-string.md) ^3.1.0
- [string-width](https://npm.io/package/string-width.md) ^4.2.3
- [test-exclude](https://npm.io/package/test-exclude.md) ^6.0.0
- [tough-cookie](https://npm.io/package/tough-cookie.md) ^4.0.0
- [universalify](https://npm.io/package/universalify.md) ^0.1.2
- [which-module](https://npm.io/package/which-module.md) ^2.0.0
- [yargs-parser](https://npm.io/package/yargs-parser.md) ^18.1.3
- [acorn-globals](https://npm.io/package/acorn-globals.md) ^6.0.0
- [code-point-at](https://npm.io/package/code-point-at.md) ^1.1.0
- [color-convert](https://npm.io/package/color-convert.md) ^1.9.3
- [end-of-stream](https://npm.io/package/end-of-stream.md) ^1.4.4
- [function-bind](https://npm.io/package/function-bind.md) ^1.1.1
- [human-signals](https://npm.io/package/human-signals.md) ^1.1.1
- [indent-string](https://npm.io/package/indent-string.md) ^4.0.0
- [is-descriptor](https://npm.io/package/is-descriptor.md) ^1.0.2
- [is-extendable](https://npm.io/package/is-extendable.md) ^0.1.1
- [is-typedarray](https://npm.io/package/is-typedarray.md) ^1.0.0
- [jest-docblock](https://npm.io/package/jest-docblock.md) ^26.0.0
- [jest-get-type](https://npm.io/package/jest-get-type.md) ^26.3.0
- [jest-jasmine2](https://npm.io/package/jest-jasmine2.md) ^26.6.3
- [jest-snapshot](https://npm.io/package/jest-snapshot.md) ^26.6.2
- [jest-validate](https://npm.io/package/jest-validate.md) ^26.6.2
- [node-notifier](https://npm.io/package/node-notifier.md) ^8.0.2
- [node-releases](https://npm.io/package/node-releases.md) ^2.0.1
- [normalize-url](https://npm.io/package/normalize-url.md) ^4.5.1
- [number-is-nan](https://npm.io/package/number-is-nan.md) ^1.0.1
- [object-assign](https://npm.io/package/object-assign.md) ^4.1.1
- [p-each-series](https://npm.io/package/p-each-series.md) ^2.2.0
- [pretty-format](https://npm.io/package/pretty-format.md) ^26.6.2
- [promise-retry](https://npm.io/package/promise-retry.md) ^2.0.1
- [repeat-string](https://npm.io/package/repeat-string.md) ^1.6.1
- [shebang-regex](https://npm.io/package/shebang-regex.md) ^1.0.0
- [static-extend](https://npm.io/package/static-extend.md) ^0.1.2
- [string-length](https://npm.io/package/string-length.md) ^4.0.2
- [terminal-link](https://npm.io/package/terminal-link.md) ^2.1.1
- [unique-string](https://npm.io/package/unique-string.md) ^2.0.0
- [url-parse-lax](https://npm.io/package/url-parse-lax.md) ^3.0.0
- [agentkeepalive](https://npm.io/package/agentkeepalive.md) ^4.1.4
- [assign-symbols](https://npm.io/package/assign-symbols.md) ^1.0.0
- [balanced-match](https://npm.io/package/balanced-match.md) ^1.0.2
- [clone-response](https://npm.io/package/clone-response.md) ^1.0.2
- [delayed-stream](https://npm.io/package/delayed-stream.md) ^1.0.0
- [detect-newline](https://npm.io/package/detect-newline.md) ^3.1.0
- [diff-sequences](https://npm.io/package/diff-sequences.md) ^24.9.0
- [extend-shallow](https://npm.io/package/extend-shallow.md) ^2.0.1
- [fragment-cache](https://npm.io/package/fragment-cache.md) ^0.2.1
- [is-binary-path](https://npm.io/package/is-binary-path.md) ^2.1.0
- [is-core-module](https://npm.io/package/is-core-module.md) ^2.8.0
- [is-path-inside](https://npm.io/package/is-path-inside.md) ^3.0.3
- [is-yarn-global](https://npm.io/package/is-yarn-global.md) ^0.3.0
- [jest-haste-map](https://npm.io/package/jest-haste-map.md) ^26.6.2
- [latest-version](https://npm.io/package/latest-version.md) ^5.1.0
- [lowercase-keys](https://npm.io/package/lowercase-keys.md) ^1.0.1
- [mimic-response](https://npm.io/package/mimic-response.md) ^1.0.1
- [minipass-fetch](https://npm.io/package/minipass-fetch.md) ^1.4.1
- [minipass-flush](https://npm.io/package/minipass-flush.md) ^1.0.5
- [minipass-sized](https://npm.io/package/minipass-sized.md) ^1.0.3
- [normalize-path](https://npm.io/package/normalize-path.md) ^3.0.0
- [repeat-element](https://npm.io/package/repeat-element.md) ^1.1.4
- [source-map-url](https://npm.io/package/source-map-url.md) ^0.4.1
- [string_decoder](https://npm.io/package/string_decoder.md) ^1.1.1
- [supports-color](https://npm.io/package/supports-color.md) ^5.5.0
- [to-object-path](https://npm.io/package/to-object-path.md) ^0.3.0
- [to-regex-range](https://npm.io/package/to-regex-range.md) ^5.0.1
- [util-deprecate](https://npm.io/package/util-deprecate.md) ^1.0.2
- [v8-to-istanbul](https://npm.io/package/v8-to-istanbul.md) ^7.1.2
- [aggregate-error](https://npm.io/package/aggregate-error.md) ^3.1.0
- [brace-expansion](https://npm.io/package/brace-expansion.md) ^1.1.11
- [builtin-modules](https://npm.io/package/builtin-modules.md) ^1.1.1
- [combined-stream](https://npm.io/package/combined-stream.md) ^1.0.8
- [copy-descriptor](https://npm.io/package/copy-descriptor.md) ^0.1.1
- [define-property](https://npm.io/package/define-property.md) ^0.2.5
- [expand-brackets](https://npm.io/package/expand-brackets.md) ^2.1.4
- [get-caller-file](https://npm.io/package/get-caller-file.md) ^2.0.5
- [hosted-git-info](https://npm.io/package/hosted-git-info.md) ^2.8.9
- [is-generator-fn](https://npm.io/package/is-generator-fn.md) ^2.1.0
- [is-plain-object](https://npm.io/package/is-plain-object.md) ^2.0.4
- [jest-regex-util](https://npm.io/package/jest-regex-util.md) ^26.0.0
- [jest-serializer](https://npm.io/package/jest-serializer.md) ^26.6.2
- [natural-compare](https://npm.io/package/natural-compare.md) ^1.4.0
- [readable-stream](https://npm.io/package/readable-stream.md) ^2.3.7
- [shebang-command](https://npm.io/package/shebang-command.md) ^1.2.0
- [snapdragon-node](https://npm.io/package/snapdragon-node.md) ^2.1.1
- [snapdragon-util](https://npm.io/package/snapdragon-util.md) ^3.0.1
- [spdx-exceptions](https://npm.io/package/spdx-exceptions.md) ^2.3.0
- [unique-filename](https://npm.io/package/unique-filename.md) ^1.1.1
- [update-notifier](https://npm.io/package/update-notifier.md) ^5.1.0
- [whatwg-encoding](https://npm.io/package/whatwg-encoding.md) ^1.0.5
- [whatwg-mimetype](https://npm.io/package/whatwg-mimetype.md) ^2.3.0
- [are-we-there-yet](https://npm.io/package/are-we-there-yet.md) ^1.1.7
- [cjs-module-lexer](https://npm.io/package/cjs-module-lexer.md) ^0.6.0
- [collection-visit](https://npm.io/package/collection-visit.md) ^1.0.0
- [defer-to-connect](https://npm.io/package/defer-to-connect.md) ^1.1.3
- [fast-levenshtein](https://npm.io/package/fast-levenshtein.md) ^2.0.6
- [get-package-type](https://npm.io/package/get-package-type.md) ^0.1.0
- [http-proxy-agent](https://npm.io/package/http-proxy-agent.md) ^4.0.1
- [istanbul-reports](https://npm.io/package/istanbul-reports.md) ^3.0.5
- [minipass-collect](https://npm.io/package/minipass-collect.md) ^1.0.2
- [path-is-absolute](https://npm.io/package/path-is-absolute.md) ^1.0.1
- [promise-inflight](https://npm.io/package/promise-inflight.md) ^1.0.1
- [spdx-license-ids](https://npm.io/package/spdx-license-ids.md) ^3.0.11
- [babel-preset-jest](https://npm.io/package/babel-preset-jest.md) ^26.6.2
- [binary-extensions](https://npm.io/package/binary-extensions.md) ^2.2.0
- [cacheable-request](https://npm.io/package/cacheable-request.md) ^6.1.0
- [component-emitter](https://npm.io/package/component-emitter.md) ^1.3.0
- [https-proxy-agent](https://npm.io/package/https-proxy-agent.md) ^5.0.0
- [ignore-by-default](https://npm.io/package/ignore-by-default.md) ^1.0.1
- [jest-message-util](https://npm.io/package/jest-message-util.md) ^26.6.2
- [jest-pnp-resolver](https://npm.io/package/jest-pnp-resolver.md) ^1.2.2
- [lines-and-columns](https://npm.io/package/lines-and-columns.md) ^1.1.6
- [make-fetch-happen](https://npm.io/package/make-fetch-happen.md) ^9.1.0
- [minipass-pipeline](https://npm.io/package/minipass-pipeline.md) ^1.2.4
- [require-directory](https://npm.io/package/require-directory.md) ^2.1.1
- [socks-proxy-agent](https://npm.io/package/socks-proxy-agent.md) ^6.1.0
- [w3c-xmlserializer](https://npm.io/package/w3c-xmlserializer.md) ^2.0.0
- [write-file-atomic](https://npm.io/package/write-file-atomic.md) ^3.0.3
- [convert-source-map](https://npm.io/package/convert-source-map.md) ^1.8.0
- [is-data-descriptor](https://npm.io/package/is-data-descriptor.md) ^1.0.0
- [jest-changed-files](https://npm.io/package/jest-changed-files.md) ^26.6.2
- [jest-leak-detector](https://npm.io/package/jest-leak-detector.md) ^26.6.2
- [jest-matcher-utils](https://npm.io/package/jest-matcher-utils.md) ^26.6.2
- [source-map-resolve](https://npm.io/package/source-map-resolve.md) ^0.5.3
- [source-map-support](https://npm.io/package/source-map-support.md) ^0.5.20
- [to-fast-properties](https://npm.io/package/to-fast-properties.md) ^2.0.0
- [to-readable-stream](https://npm.io/package/to-readable-stream.md) ^1.0.0
- [webidl-conversions](https://npm.io/package/webidl-conversions.md) ^6.1.0
- [xml-name-validator](https://npm.io/package/xml-name-validator.md) ^3.0.0
- [collect-v8-coverage](https://npm.io/package/collect-v8-coverage.md) ^1.0.1
- [decompress-response](https://npm.io/package/decompress-response.md) ^3.3.0
- [istanbul-lib-report](https://npm.io/package/istanbul-lib-report.md) ^3.0.0
- [node-modules-regexp](https://npm.io/package/node-modules-regexp.md) ^1.0.0
- [registry-auth-token](https://npm.io/package/registry-auth-token.md) ^4.2.1
- [strip-final-newline](https://npm.io/package/strip-final-newline.md) ^2.0.0
- [strip-json-comments](https://npm.io/package/strip-json-comments.md) ^2.0.1
- [supports-hyperlinks](https://npm.io/package/supports-hyperlinks.md) ^2.2.0
- [crypto-random-string](https://npm.io/package/crypto-random-string.md) ^2.0.0
- [decode-uri-component](https://npm.io/package/decode-uri-component.md) ^0.2.0
- [electron-to-chromium](https://npm.io/package/electron-to-chromium.md) ^1.3.899
- [escape-string-regexp](https://npm.io/package/escape-string-regexp.md) ^1.0.5
- [http-cache-semantics](https://npm.io/package/http-cache-semantics.md) ^4.1.0
- [process-nextick-args](https://npm.io/package/process-nextick-args.md) ^2.0.1
- [typedarray-to-buffer](https://npm.io/package/typedarray-to-buffer.md) ^3.1.5
- [babel-plugin-istanbul](https://npm.io/package/babel-plugin-istanbul.md) ^6.1.1
- [html-encoding-sniffer](https://npm.io/package/html-encoding-sniffer.md) ^2.0.1
- [is-installed-globally](https://npm.io/package/is-installed-globally.md) ^0.4.0
- [istanbul-lib-coverage](https://npm.io/package/istanbul-lib-coverage.md) ^3.2.0
- [jest-environment-node](https://npm.io/package/jest-environment-node.md) ^26.6.2
- [require-main-filename](https://npm.io/package/require-main-filename.md) ^2.0.0
- [spdx-expression-parse](https://npm.io/package/spdx-expression-parse.md) ^3.0.1
- [browser-process-hrtime](https://npm.io/package/browser-process-hrtime.md) ^1.0.0
- [eslint-plugin-prettier](https://npm.io/package/eslint-plugin-prettier.md) ^2.7.0
- [is-accessor-descriptor](https://npm.io/package/is-accessor-descriptor.md) ^1.0.0
- [jest-environment-jsdom](https://npm.io/package/jest-environment-jsdom.md) ^26.6.2
- [normalize-package-data](https://npm.io/package/normalize-package-data.md) ^2.5.0
- [babel-plugin-jest-hoist](https://npm.io/package/babel-plugin-jest-hoist.md) ^26.6.2
- [console-control-strings](https://npm.io/package/console-control-strings.md) ^1.1.0
- [is-fullwidth-code-point](https://npm.io/package/is-fullwidth-code-point.md) ^1.0.0
- [istanbul-lib-instrument](https://npm.io/package/istanbul-lib-instrument.md) ^5.1.0
- [posix-character-classes](https://npm.io/package/posix-character-classes.md) ^0.1.1
- [istanbul-lib-source-maps](https://npm.io/package/istanbul-lib-source-maps.md) ^4.0.1
- [jest-resolve-dependencies](https://npm.io/package/jest-resolve-dependencies.md) ^26.6.3
- [remove-trailing-separator](https://npm.io/package/remove-trailing-separator.md) ^1.1.0
- [fast-json-stable-stringify](https://npm.io/package/fast-json-stable-stringify.md) ^2.1.0
- [validate-npm-package-license](https://npm.io/package/validate-npm-package-license.md) ^3.0.4
- [json-parse-even-better-errors](https://npm.io/package/json-parse-even-better-errors.md) ^2.3.1
- [babel-preset-current-node-syntax](https://npm.io/package/babel-preset-current-node-syntax.md) ^1.0.1
- [is-potential-custom-element-name](https://npm.io/package/is-potential-custom-element-name.md) ^1.0.1

## Recent versions

- 0.22.8 (latest) — 2022-09-27
- 0.21.21 — 2022-08-12
- 0.21.20 — 2022-08-12
- 0.21.2 — 2022-08-12

## README

<div align="center">
  <h1>The official Node.js client library for EdgeDB</h1>

  <a href="https://github.com/edgedb/edgedb-js/actions" rel="nofollow">
    <img src="https://github.com/edgedb/edgedb-js/actions/workflows/tests.yml/badge.svg?event=push&branch=master" alt="Build status">
  </a>
  <a href="https://www.npmjs.com/package/edgedb" rel="nofollow">
    <img src="https://img.shields.io/npm/v/edgedb" alt="NPM version">
  </a>
  <a href="https://github.com/edgedb/edgedb" rel="nofollow">
    <img src="https://img.shields.io/github/stars/edgedb/edgedb" alt="Stars">
  </a>
  <a href="https://github.com/edgedb/edgedb/blob/master/LICENSE">
    <img src="https://img.shields.io/badge/license-Apache%202.0-blue" />
  </a>
  <br />
  <br />
  <a href="https://www.edgedb.com/docs/guides/quickstart">Quickstart</a>
  <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
  <a href="https://www.edgedb.com">Website</a>
  <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
  <a href="https://www.edgedb.com/docs/clients/js/index">Docs</a>
  <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
  <a href="https://discord.gg/umUueND6ag">Discord</a>
  <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
  <a href="https://twitter.com/edgedatabase">Twitter</a>
  <br />

</div>

<br />
<br />

This is the official [EdgeDB](https://github.com/edgedb/edgedb) client library
for JavaScript and TypeScript.

If you're just getting started with EdgeDB, we recommend going through the
[EdgeDB Quickstart](https://www.edgedb.com/docs/quickstart) first. This walks
you through the process of installing EdgeDB, creating a simple schema, and
writing some simple queries.

### Migrating to EdgeDB 2.0

We recently released `v0.21.0` of the `edgedb` module on NPM and deno.land/x,
which supports the latest EdgeDB 2.0 features and protocol. It is
backwards-compatible with v1 instances as well, so we recommend all users
upgrade.

```bash
npm install edgedb@latest
```

#### Breaking changes

- All `uuid` properties are now decoded to include hyphens. Previously hyphens were elided for performance reasons; this issue has since been resolved.

  ```ts
  client.querySingle(`select uuid_generate_v1mc();`);
  // "ce13b17a-7fcd-42b3-b5e3-eb28d1b953f6"
  ```

- All `json` properties and parameters are now parsed/stringified internally by the client. Previously:

  ```ts
  const result = await client.querySingle(
    `select to_json('{"hello": "world"}');`
  );
  result; // '{"hello": "world"}'
  typeof result; // string
  ```

  Now:

  ```ts
  const result = await client.querySingle(
    `select to_json('{"hello": "world"}');`
  );
  result; // {hello: "world"}
  typeof result; // object
  result.hello; // "world"
  ```

#### New features

- Added the `.withGlobals` method to the `Client` for setting [global variables](https://www.edgedb.com/docs/datamodel/globals).

  ```ts
  import {createClient} from "edgedb";
  const client = createClient().withGlobals({
    current_user: getUserIdFromCookie(),
  });

  client.query(`select User { email } filter .id = global current_user;`);
  ```

- Support for globals in the query builder.

  ```ts
  const query = e.select(e.User, user => ({
    email: true,
    filter: e.op(user.id, "=", e.global.current_user),
  }));

  await query.run(client);
  ```

- Support for the [group statement](https://www.edgedb.com/docs/clients/js/group).

  ```ts
  e.group(e.Movie, movie => ({
    title: true,
    actors: {name: true},
    num_actors: e.count(movie.characters),
    by: {release_year: movie.release_year},
  }));
  /* [
    {
      key: {release_year: 2008},
      grouping: ["release_year"],
      elements: [{
        title: "Iron Man",
        actors: [...],
        num_actors: 5
      }, {
        title: "The Incredible Hulk",
        actors: [...],
        num_actors: 3
      }]
    },
    // ...
  ] */
  ```

- Support for [range types](https://www.edgedb.com/docs/datamodel/primitives#ranges) and [`DateDuration`](https://www.edgedb.com/docs/stdlib/datetime#type::cal::date_duration) values.

### Requirements

- Node.js 12+
- For TypeScript users:
  - TypeScript 4.4+ is required
  - `yarn add @types/node --dev`

### Installation

```bash
npm install edgedb      # npm users
yarn add edgedb         # yarn users
```

## Basic usage

> The examples below demonstrate only the most fundamental use cases for this
> library. **[Go to the complete documentation site. >](https://www.edgedb.com/docs/clients/js/index)**

### Create a client

A _client_ is an instance of the `Client` class, which maintains a pool of
connections to your database and provides methods for executing queries.

_For TypeScript (and Node.js+ESM)_

```ts
import * as edgedb from "edgedb";

const client = edgedb.createClient();
```

_For Node.js (CommonJS)_

```js
const edgedb = require("edgedb");

const client = edgedb.createClient();
```

### Configuring the connection

The call to `edgedb.createClient()` doesn't require arguments, as the library
can determine how to connect to your database using the following mechanisms.

1. _For local development_: initialize a project with the `edgedb project init`
   command. As long as the file is within a project directory, `createClient`
   will be able to auto-discover the connection information of the project's
   associated instance. For more information on projects, follow the
   [Using projects](https://www.edgedb.com/docs/guides/projects) guide.

2. _In production_: configure the connection using **environment variables**.
   (This can also be used during local development if you prefer.) The easiest
   way is to set the `EDGEDB_DSN` variable; a DSN (also known as a "connection
   string") is a string of the form
   `edgedb://USERNAME:PASSWORD@HOSTNAME:PORT/DATABASE`.

For advanced cases, see the
[DSN specification](https://www.edgedb.com/docs/reference/dsn) and
[Reference > Connection Parameters](https://www.edgedb.com/docs/reference/connection).

### Run a query

> The remainder of the documentation assumes you are using ES module (`import`)
> syntax.

```ts
import * as edgedb from "edgedb";

const client = edgedb.createClient();
await client.query("select 2 + 2"); // => [4]
```

Note that the result is an _array_. The `.query()` method always returns an
array, regardless of the result cardinality of your query. If your query
returns _zero or one elements_, use the `.querySingle()` instead.

```ts
// empty set, zero elements
await client.querySingle("select <str>{}"); // => null

// one element
await client.querySingle("select 2 + 2"); // => 4

// one element
await client.querySingle(
  `select Movie { title }
  filter .id = <uuid>'2eb3bc76-a014-45dc-af66-2e6e8cc23e7e';`
); // => { title: "Dune" }
```

## Query builder

Instead of writing queries as strings, you can use this package to generate a
_query builder_. The query builder lets you write queries in a code-first way
and automatically infers the return type of your queries.

To generate the query builder, install the `edgedb` package, initialize a project (if
you haven't already), then run the following command:

```bash
$ npx edgeql-js
```

This will generate an EdgeQL query builder into the `./dbschema/edgeql-js`
directory, as defined relative to your project root.

For details on generating the query builder, refer to the [complete documentation](https://www.edgedb.com/docs/clients/js/generation). Below is a simple
`select` query as an example.

```ts
import {createClient} from "edgedb";
import e from "./dbschema/edgeql-js";

const client = createClient();
const query = e.select(e.Movie, movie => ({
  id: true,
  title: true,
  actors: {name: true},
  num_actors: e.count(movie.actors),
  filter: e.op(movie.title, "=", "Dune"),
}));

const result = await query.run(client);
result.actors[0].name; // => Timothee Chalamet
```

For details on using the query builder, refer to the full [query builder docs](https://www.edgedb.com/docs/clients/js/querybuilder).

## Contribute

Contributing to this library requires a local installation of EdgeDB. Install
EdgeDB from [here](https://www.edgedb.com/download) or
[build it from source](https://www.edgedb.com/docs/reference/dev).

```bash
$ git clone git@github.com:edgedb/edgedb-js.git
$ cd edgedb-js
$ yarn              # install dependencies
$ yarn build        # compile TypeScript
$ yarn tests        # run tests
```

## License

edgedb-js is developed and distributed under the Apache 2.0 license.

---
_Source: https://npm.io/package/@samwinslow/edgedb · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
