mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 17:31:56 +03:00
send headers as part of request headers too for explain query (#816)
This commit is contained in:
parent
4f9af70acf
commit
bcb3dadf27
@ -233,15 +233,13 @@ const analyzeFetcher = (url, headers) => {
|
|||||||
query,
|
query,
|
||||||
};
|
};
|
||||||
const user = {};
|
const user = {};
|
||||||
|
const reqHeaders = getHeadersAsJSON(headers);
|
||||||
user.role = 'admin';
|
user.role = 'admin';
|
||||||
user.headers = getHeadersAsJSON(headers);
|
user.headers = reqHeaders;
|
||||||
editedQuery.user = user;
|
editedQuery.user = user;
|
||||||
return fetch(`${url}/explain`, {
|
return fetch(`${url}/explain`, {
|
||||||
method: 'post',
|
method: 'post',
|
||||||
headers: {
|
headers: reqHeaders,
|
||||||
Accept: 'application/json',
|
|
||||||
'Content-Type': 'application/json',
|
|
||||||
},
|
|
||||||
body: JSON.stringify(editedQuery),
|
body: JSON.stringify(editedQuery),
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user