File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,11 @@ export function humanizeBytes(space) {
67
67
}
68
68
69
69
let dgraphServerUrl = getDefaultUrl ( ) ;
70
- const clientStubOptions = { headers : { } } ;
70
+ const clientStubOptions = {
71
+ headers : {
72
+ "Content-Type" : "application/dql" ,
73
+ } ,
74
+ } ;
71
75
72
76
const createDgraphClient = memoizeOne ( async url => {
73
77
const stub = new dgraph . DgraphClientStub (
@@ -100,11 +104,11 @@ export async function setCurrentServerQueryTimeout(timeout) {
100
104
101
105
export function setCurrentServerSlashApiKey ( slashApiKey ) {
102
106
clientStubOptions . headers [ "X-Auth-Token" ] = slashApiKey ;
107
+ clientStubOptions . headers [ "Authorization" ] = authToken ;
103
108
}
104
109
105
110
export function setCurrentServerAuthToken ( authToken ) {
106
111
clientStubOptions . headers [ "X-Dgraph-AuthToken" ] = authToken ;
107
- clientStubOptions . headers [ "Authorization" ] = authToken ;
108
112
}
109
113
110
114
export const getDgraphClient = async ( ) =>
You can’t perform that action at this time.
0 commit comments