mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 09:22:43 +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,
|
||||
};
|
||||
const user = {};
|
||||
const reqHeaders = getHeadersAsJSON(headers);
|
||||
user.role = 'admin';
|
||||
user.headers = getHeadersAsJSON(headers);
|
||||
user.headers = reqHeaders;
|
||||
editedQuery.user = user;
|
||||
return fetch(`${url}/explain`, {
|
||||
method: 'post',
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
headers: reqHeaders,
|
||||
body: JSON.stringify(editedQuery),
|
||||
credentials: 'include',
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user