Skip to content

Commit 3afcf73

Browse files
authored
feat: allow GraphIQL headers (#1836)
2 parents 3e5c66d + ddbe0b9 commit 3afcf73

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/dashboard/Data/ApiConsole/GraphQLConsole.react.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,18 @@ export default class GraphQLConsole extends Component {
2929
</div>
3030
);
3131
} else {
32-
const headers = {
32+
const parseHeaders = {
3333
'X-Parse-Application-Id': applicationId,
3434
'X-Parse-Master-Key': masterKey
3535
}
3636
if (clientKey) {
37-
headers['X-Parse-Client-Key'] = clientKey
37+
parseHeaders['X-Parse-Client-Key'] = clientKey
3838
}
3939
content = (
4040
<GraphiQL
41-
fetcher={async graphQLParams => {
41+
headers={JSON.stringify(parseHeaders)}
42+
headerEditorEnabled={true}
43+
fetcher={async (graphQLParams, {headers}) => {
4244
const data = await fetch(
4345
graphQLServerURL,
4446
{

0 commit comments

Comments
 (0)