@@ -22,19 +22,19 @@ var DgraphClientStub = (function () {
2222 } ;
2323 }
2424 DgraphClientStub . prototype . alter = function ( op , options ) {
25- return this . promisified . alter ( op , undefined , options ) ;
25+ return this . promisified . alter ( op , new grpc . Metadata ( ) , ensureCallOptions ( options ) ) ;
2626 } ;
2727 DgraphClientStub . prototype . query = function ( req , options ) {
28- return this . promisified . query ( req , undefined , options ) ;
28+ return this . promisified . query ( req , new grpc . Metadata ( ) , ensureCallOptions ( options ) ) ;
2929 } ;
3030 DgraphClientStub . prototype . mutate = function ( mu , options ) {
31- return this . promisified . mutate ( mu , undefined , options ) ;
31+ return this . promisified . mutate ( mu , new grpc . Metadata ( ) , ensureCallOptions ( options ) ) ;
3232 } ;
3333 DgraphClientStub . prototype . commitOrAbort = function ( ctx , options ) {
34- return this . promisified . commitOrAbort ( ctx , undefined , options ) ;
34+ return this . promisified . commitOrAbort ( ctx , new grpc . Metadata ( ) , ensureCallOptions ( options ) ) ;
3535 } ;
3636 DgraphClientStub . prototype . checkVersion = function ( check , options ) {
37- return this . promisified . checkVersion ( check , undefined , options ) ;
37+ return this . promisified . checkVersion ( check , new grpc . Metadata ( ) , ensureCallOptions ( options ) ) ;
3838 } ;
3939 DgraphClientStub . prototype . waitForReady = function ( deadline ) {
4040 return this . promisified . waitForReady ( deadline ) ;
@@ -48,3 +48,12 @@ var DgraphClientStub = (function () {
4848 return DgraphClientStub ;
4949} ( ) ) ;
5050exports . DgraphClientStub = DgraphClientStub ;
51+ function ensureCallOptions ( options ) {
52+ if ( options != null ) {
53+ return options ;
54+ }
55+ return {
56+ propagate_flags : grpc . propagate . DEFAULTS ,
57+ credentials : null ,
58+ } ;
59+ }
0 commit comments