Merge pull request #745 from levrik/fix-gql-get-schema
Fix GQL introspection query not sent through extension
This commit is contained in:
@@ -505,7 +505,7 @@ export default {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
let headers = {}
|
let headers = {}
|
||||||
this.headers.forEach(header => {
|
this.headers.forEach((header) => {
|
||||||
headers[header.key] = header.value
|
headers[header.key] = header.value
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -557,7 +557,7 @@ export default {
|
|||||||
})
|
})
|
||||||
|
|
||||||
let headers = {}
|
let headers = {}
|
||||||
this.headers.forEach(header => {
|
this.headers.forEach((header) => {
|
||||||
headers[header.key] = header.value
|
headers[header.key] = header.value
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -571,19 +571,8 @@ export default {
|
|||||||
data: query,
|
data: query,
|
||||||
}
|
}
|
||||||
|
|
||||||
const reqConfig = this.$store.state.postwoman.settings.PROXY_ENABLED
|
const data = await sendNetworkRequest(reqOptions, this.$store)
|
||||||
? {
|
|
||||||
method: "post",
|
|
||||||
url:
|
|
||||||
this.$store.state.postwoman.settings.PROXY_URL ||
|
|
||||||
`https://postwoman.apollosoftware.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)
|
const schema = gql.buildClientSchema(data.data.data)
|
||||||
this.schema = gql.printSchema(schema, {
|
this.schema = gql.printSchema(schema, {
|
||||||
commentDescriptions: true,
|
commentDescriptions: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user