Would anyone be able to provide the same for Node? (let me know if I should post this separately)
I’ve got this mostly working:
export const SLASH_ADDR = '<NAME>.grpc.us-west-2.aws.cloud.dgraph.io:443';
export const SLASH_SSL = grpc.credentials.createSsl();
export const SLASH_TOKEN = grpc.credentials.createFromMetadataGenerator(
(_url, cb) => {
const meta = new grpc.Metadata();
meta.add('authorization', '<API-KEY>');
cb(null, meta);
}
);
export const SLASH_CREDENTIALS = grpc.credentials.combineChannelCredentials(
SLASH_SSL,
SLASH_TOKEN
);
const stub = new dgraph.DgraphClientStub(SLASH_ADDR, SLASH_CREDENTIALS);
// ...
But I receive an error on every call Error: 14 UNAVAILABLE: failed to connect to all addresses
which I believe is related to the cert.