mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
parse the query variables correctly (#5273)
This commit is contained in:
parent
23b4ee60a6
commit
60bf0f9f24
@ -509,12 +509,9 @@ export const GraphQLEditor: FC<Props> = ({
|
||||
} catch (err) {
|
||||
body = { query: '' };
|
||||
}
|
||||
let maybeVariables;
|
||||
if (typeof body.variables === 'string') {
|
||||
maybeVariables = jsonParseOr(body.variables, '');
|
||||
}
|
||||
|
||||
const query = body.query || '';
|
||||
const variables = jsonPrettify(JSON.stringify(maybeVariables));
|
||||
const variables = jsonPrettify(JSON.stringify(body.variables));
|
||||
const variableTypes = buildVariableTypes(schema);
|
||||
|
||||
// Create portal for GraphQL Explorer
|
||||
|
Loading…
Reference in New Issue
Block a user