Skip to content

Commit 11520d9

Browse files
douglasmuraokadavimacedo
authored andcommitted
feat: Add client key into GraphQL console by default (#1142)
* feat: Add client key into GraphQL console by default * fix: Only set X-Parse-Client-Key when clientKey is defined
1 parent 05d2e12 commit 11520d9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import styles from 'dashboard/Data/ApiConsole/ApiConsole.scss';
1616

1717
export default class GraphQLConsole extends Component {
1818
render() {
19-
const { applicationId, graphQLServerURL, masterKey } = this.context.currentApp;
19+
const { applicationId, clientKey, graphQLServerURL, masterKey } = this.context.currentApp;
2020
let content;
2121
if (!graphQLServerURL) {
2222
content = (
@@ -34,6 +34,9 @@ export default class GraphQLConsole extends Component {
3434
'X-Parse-Application-Id': applicationId,
3535
'X-Parse-Master-Key': masterKey
3636
}
37+
if (clientKey) {
38+
headers['X-Parse-Client-Key'] = clientKey
39+
}
3740
content = (
3841
<Provider store={store}>
3942
<Playground endpoint={graphQLServerURL} headers={headers} />

0 commit comments

Comments
 (0)