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
GraphQL introspection requests now support and respect Proxying
Andrew Bastin41ff83821b54
diff --git a/pages/graphql.vue b/pages/graphql.vueindex aad171cf9..98f4ea753 100644--- a/pages/graphql.vue+++ b/pages/graphql.vue@@ -175,11 +175,36 @@ export default {this.$nuxt.$loading.start();try {- const res = await axios.post(this.url, {++ const query = JSON.stringify({query: gql.getIntrospectionQuery()});- const schema = gql.buildClientSchema(res.data.data);+ const reqOptions = {+ method: "post",+ url: this.url,+ headers: {+ "content-type": "application/json"+ },+ data: query+ }++ const reqConfig = this.$store.state.postwoman.settings.PROXY_ENABLED+ ? {+ method: "post",+ url: `https://postwoman.apollotv.xyz/`,+ data: reqOptions+ }+ : reqOptions;+++ const res = await axios(reqConfig);++ const data = this.$store.state.postwoman.settings.PROXY_ENABLED+ ? res.data+ : res;++ const schema = gql.buildClientSchema(data.data.data);this.schemaString = gql.printSchema(schema, {commentDescriptions: true});