Skip to content

Commit

Permalink
Merge pull request hoppscotch#745 from levrik/fix-gql-get-schema
Browse files Browse the repository at this point in the history
Fix GQL introspection query not sent through extension
  • Loading branch information
AndrewBastin authored Apr 7, 2020
2 parents 3fcf90e + 848535a commit 140d585
Showing 1 changed file with 6 additions and 17 deletions.
23 changes: 6 additions & 17 deletions pages/graphql.vue
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,9 @@
<p
v-if="
queryFields.length === 0 &&
mutationFields.length === 0 &&
subscriptionFields.length === 0 &&
gqlTypes.length === 0
mutationFields.length === 0 &&
subscriptionFields.length === 0 &&
gqlTypes.length === 0
"
class="info"
>
Expand Down Expand Up @@ -505,7 +505,7 @@ export default {
try {
let headers = {}
this.headers.forEach(header => {
this.headers.forEach((header) => {
headers[header.key] = header.value
})
Expand Down Expand Up @@ -557,7 +557,7 @@ export default {
})
let headers = {}
this.headers.forEach(header => {
this.headers.forEach((header) => {
headers[header.key] = header.value
})
Expand All @@ -571,19 +571,8 @@ export default {
data: query,
}
const reqConfig = this.$store.state.postwoman.settings.PROXY_ENABLED
? {
method: "post",
url:
this.$store.state.postwoman.settings.PROXY_URL ||
`https://postwoman.apollosoftware.xyz/`,
data: reqOptions,
}
: reqOptions
const res = await axios(reqConfig)
const data = await sendNetworkRequest(reqOptions, this.$store)
const data = this.$store.state.postwoman.settings.PROXY_ENABLED ? res.data : res
const schema = gql.buildClientSchema(data.data.data)
this.schema = gql.printSchema(schema, {
commentDescriptions: true,
Expand Down

0 comments on commit 140d585

Please sign in to comment.