@abtnode/client
TypeScript icon, indicating that this package has built-in type declarations

1.16.25 • Public • Published

ABT Node Client

Client library to connect webapp to Abt Node Daemon

Table of Contents

Development

upgrade code: you need two shells

  1. start demo server
cd ../gql
node demo.js
  1. upgrade code
npm run upgrade

Install

npm i @abtnode/client -S
# OR
yarn add @abtnode/client

Usage

const AbtNodeClient = require('@abtnode/client');

const client = new AbtNodeClient('http://localhost:3030/api/gql');
console.log({
  queries: client.getQueries(),
  subscriptions: client.getSubscriptions(),
  mutations: client.getMutations(),
});

client.listBlocklets().then(console.log);

Debugging

  • If you are in Node.js: DEBUG=@abtnode/client node script.js
  • If you are in Browser: localStorage.setItem('DEBUG', '@abtnode/client')

Documentation

Query arguments and response structure can be found: QUERIES.md

Readme

Keywords

Package Sidebar

Install

npm i @abtnode/client

Weekly Downloads

843

Version

1.16.25

License

Apache-2.0

Unpacked Size

3.97 MB

Total Files

40

Last publish

Collaborators

  • wangshijun
  • polunzh
  • mave99a