Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
Added temporary hack to fix GQL trailing space errors
Andrew Bastin9113a826ce2a
diff --git a/pages/graphql.vue b/pages/graphql.vueindex 3dcdb6bf9..24ae5e60d 100644--- a/pages/graphql.vue+++ b/pages/graphql.vue@@ -612,7 +612,8 @@ export default {const res = await sendNetworkRequest(reqOptions, this.$store)- const responseText = new TextDecoder("utf-8").decode(res.data)+ // HACK: Temporary trailing null character issue from the extension fix+ const responseText = new TextDecoder("utf-8").decode(res.data).replace(/\0+$/, "")this.response = JSON.stringify(JSON.parse(responseText), null, 2)@@ -713,7 +714,8 @@ export default {const data = await sendNetworkRequest(reqOptions, this.$store)- const response = new TextDecoder("utf-8").decode(data.data)+ // HACK : Temporary trailing null character issue from the extension fix+ const response = new TextDecoder("utf-8").decode(data.data).replace(/\0+$/, "")const introspectResponse = JSON.parse(response)const schema = gql.buildClientSchema(introspectResponse.data)