THIS REPOSITORY HAS BEEN ARCHIVED. Please visit: @vaticle/typedb-driver/nodejs
To learn about the mechanism that a TypeDB Client uses to set up communication with databases running on the TypeDB Server, refer to TypeDB > Client API > Overview.
To learn about the methods available for executing queries and retrieving their answers using Client Node.js, refer to TypeDB > Client API > Node.js > API Reference.
To learn about the methods available on the concepts retrieved as the answers to TypeQL queries, refer to TypeDB > Concept API > Overview.
Node.js version 14 or above is recommended.
npm install typedb-clientFurther documentation: https://docs.vaticle.com/docs/client-api/nodejs
typedb-client is a TypeScript project and provides its own type definitions out of the box - for example:
import { EntityType } from 'typedb-client';Note: You don't need to compile TypeDB Client from source if you just want to use it in your code. See the "Import TypeDB Client for Node.js" section above.
We recommend using
yarn, see https://yarnpkg.com/ for information aboutyarn.
- Make sure you have the following installed: Node.js (version 14 or above);
npmpackage manager;yarnpackage manager. - Clone the project and run
yarnat the root directory (containingpackage.json) - Run
yarn run build - The JavaScript files, and their matching TypeScript type definitions are compiled to the
distdirectory.
Note: TypeDB Client can be run without TypeScript, however its type assertions may make development smoother.