Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

Empty gql variable string is substituted with an empty JSON object

Andrew Bastind2945913ce6f
diff --git a/pages/graphql.vue b/pages/graphql.vue
index 4d07a1022..4a29fd82f 100644
--- a/pages/graphql.vue
+++ b/pages/graphql.vue
@@ -503,7 +503,7 @@ export default {
headers[header.key] = header.value
})
- let variables = JSON.parse(this.variableString)
+ let variables = JSON.parse(this.variableString || "{}")
const gqlQueryString = this.gqlQueryString