0.2.7 • Published 7 years ago
dgraph-client v0.2.7
dgraph-client
A super simple, yet awesome client for dgraph using gRPC protocol.
Benefits:
- Fast (gRPC)
- no handling with NQuads, just set objects
Example
import DgraphClient from 'dgraph-client';
// create a new client
let client = new DgraphClient('localhost:8080');
// set objects
let me = {name: 'Paul', size: 1.85, time: Date.now()};
await client.set(me);
// query objects
let me = await client.query(`query { me(id:${me._uid_}) { name, size } }`);
// reponse is {me: {name: 'Paul', size: 1.85} }
// set also works with geojson
let me = {name: 'Paul', location: {type: 'Point', coordinates: [13.25, 52.14]}};
await client.set(me);
// and with nested objects
let me = {name: 'Paul', friends: [{name: 'Max'}, {_uid_: "0xd8450668580bf30f"}]};
await client.set(me);
0.2.7
7 years ago
0.2.6
7 years ago
0.2.5
7 years ago
0.2.4
7 years ago
0.2.3
7 years ago
0.2.2
7 years ago
0.2.1
7 years ago
0.2.0
7 years ago
0.1.15
8 years ago
0.1.14
8 years ago
0.1.13
8 years ago
0.1.12
8 years ago
0.1.11
8 years ago
0.1.10
8 years ago
0.1.9
8 years ago
0.1.8
8 years ago
0.1.7
8 years ago
0.1.6
8 years ago
0.1.5
8 years ago
0.1.4
8 years ago
0.1.3
8 years ago
0.1.2
8 years ago