Skip to content

Commit

Permalink
feat: allow GraphIQL headers (#1836)
Browse files Browse the repository at this point in the history
  • Loading branch information
mtrezza committed Oct 8, 2021
2 parents 3e5c66d + ddbe0b9 commit 3afcf73
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/dashboard/Data/ApiConsole/GraphQLConsole.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,18 @@ export default class GraphQLConsole extends Component {
</div>
);
} else {
const headers = {
const parseHeaders = {
'X-Parse-Application-Id': applicationId,
'X-Parse-Master-Key': masterKey
}
if (clientKey) {
headers['X-Parse-Client-Key'] = clientKey
parseHeaders['X-Parse-Client-Key'] = clientKey
}
content = (
<GraphiQL
fetcher={async graphQLParams => {
headers={JSON.stringify(parseHeaders)}
headerEditorEnabled={true}
fetcher={async (graphQLParams, {headers}) => {
const data = await fetch(
graphQLServerURL,
{
Expand Down

0 comments on commit 3afcf73

Please sign in to comment.