How to use the dgraph-js-http.DgraphClient function in dgraph-js-http

To help you get started, we’ve selected a few dgraph-js-http examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dgraph-io / ratel / client / src / lib / helpers.js View on Github external
const createDgraphClient = memoizeOne(async url => {
    const stub = new dgraph.DgraphClientStub(url);
    try {
        await stub.detectApiVersion();
    } catch (err) {
        // Ignore error, it's probably a bad URL
    }

    return {
        client: new dgraph.DgraphClient(stub),
        stub,
    };
});
github dgraph-io / ratel / client / src / lib / helpers.js View on Github external
const createDgraphClient = memoizeOne(async url => {
    const stub = new dgraph.DgraphClientStub(url);
    try {
        await stub.detectApiVersion();
    } catch (err) {
        // Ignore error, it's probably a bad URL
    }

    return {
        client: new dgraph.DgraphClient(stub),
        stub,
    };
});

dgraph-js-http

A javascript HTTP client for Dgraph

Apache-2.0
Latest version published 1 year ago

Package Health Score

58 / 100
Full package analysis

Similar packages