Skip to content

Commit 34536b3

Browse files
committed
feat: allow graphQL headers
1 parent a45f0f5 commit 34536b3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

+5-3
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)