File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 22Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
33exports . clientStubFromSlashGraphQLEndpoint = void 0 ;
44var grpc = require ( "@grpc/grpc-js" ) ;
5- var clientStub_1 = require ( "./clientStub" ) ;
65var Url = require ( "url-parse" ) ;
6+ var clientStub_1 = require ( "./clientStub" ) ;
77var PORT = "443" ;
88function clientStubFromSlashGraphQLEndpoint ( graphqlEndpoint , apiKey ) {
99 var url = new Url ( graphqlEndpoint ) ;
1010 var urlParts = url . host . split ( "." ) ;
1111 var firstHalf = urlParts [ 0 ] ;
1212 var secondHalf = urlParts . splice ( 1 ) . join ( "." ) + ":" + PORT ;
1313 var backenedURL = firstHalf + ".grpc." + secondHalf ;
14- console . log ( backenedURL ) ;
1514 var metaCreds = grpc . credentials . createFromMetadataGenerator ( function ( _ , callback ) {
1615 var metadata = new grpc . Metadata ( ) ;
1716 metadata . add ( "authorization" , apiKey ) ;
18- callback ( null , metadata ) ;
17+ callback ( undefined , metadata ) ;
1918 } ) ;
2019 var credentials = grpc . credentials . combineChannelCredentials ( grpc . credentials . createSsl ( ) , metaCreds ) ;
2120 return new clientStub_1 . DgraphClientStub ( backenedURL , credentials ) ;
Original file line number Diff line number Diff line change 11{
22 "name" : " dgraph-js" ,
3- "version" : " 20.03.0 " ,
3+ "version" : " 20.03.1 " ,
44 "description" : " Official javascript client for Dgraph" ,
55 "license" : " Apache-2.0" ,
66 "repository" : {
You can’t perform that action at this time.
0 commit comments