xCreateDgraphClient has some smart defaults and takes optional config, returns a dgraphClient and dgraphClientStub.
// No config requiredconst { dgraphClient, dgraphClientStub } = xCreateDgraphClient()
// The host and port are set to either the settings you passed in config, or the process or 9080, localhostconst _port = port || process.env.DGRAPH_PORT || 9080;
const _host = host || process.env.DGRAPH_HOST || 'localhost';
xCreateDgraphClient has some smart defaults and takes optional config, returns a dgraphClient and dgraphClientStub.
// No config required const { dgraphClient, dgraphClientStub } = xCreateDgraphClient() // The host and port are set to either the settings you passed in config, or the process or 9080, localhost const _port = port || process.env.DGRAPH_PORT || 9080; const _host = host || process.env.DGRAPH_HOST || 'localhost';