We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7a27e6 commit f6a0f9cCopy full SHA for f6a0f9c
src/components/operations/operation-details/react/runtime/OperationConsoleGql.tsx
@@ -280,6 +280,16 @@ export const OperationConsoleGql = ({
280
const sendRequest = async () => {
281
setSendingRequest(true);
282
283
+ try {
284
+ JSON.parse(queryVariables);
285
+ }
286
+ catch (error) {
287
+ setSelectedTab(ConsoleTab.response);
288
+ setRequestError('Invalid "Query variables" JSON format.');
289
+ setSendingRequest(false);
290
+ return;
291
292
+
293
const payload = JSON.stringify({
294
query: document,
295
variables: queryVariables.length > 0 ? JSON.parse(queryVariables) : null
0 commit comments