Skip to content

Commit

Permalink
feat: allow graphQL headers
Browse files Browse the repository at this point in the history
  • Loading branch information
dblythy committed Oct 6, 2021
1 parent a45f0f5 commit 34536b3
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 34536b3

Please sign in to comment.