Merge pull request #633 from AndrewBastin/feat/non-gql-url-detect

Updated messages for when GraphQL Get Schema fails
This commit is contained in:
Liyas Thomas
2020-03-02 05:35:53 +05:30
committed by GitHub
2 changed files with 9 additions and 4 deletions

View File

@@ -235,6 +235,8 @@ export default {
copied_to_clipboard: "Copied to clipboard",
finished_in: "Finished in {duration}ms",
check_console_details: "Check console for details.",
check_graphql_valid: "Check the URL to see if it is a valid GraphQL endpoint",
graphql_introspect_failed: "Failed fetching schema details.",
download_started: "Download started",
url_invalid_format: "URL is not formatted properly",
curl_invalid_format: "cURL is not formatted properly",

View File

@@ -593,7 +593,7 @@ export default {
url:
this.$store.state.postwoman.settings.PROXY_URL ||
`https://postwoman.apollosoftware.xyz/`,
data: reqOptions
data: reqOptions,
}
: reqOptions
@@ -661,9 +661,12 @@ export default {
this.$nuxt.$loading.finish()
this.schema = `${error}. ${this.$t("check_console_details")}`
this.$toast.error(`${error} ${this.$t("f12_details")}`, {
icon: "error",
})
this.$toast.error(
`${this.$t("graphql_introspect_failed")} ${this.$t("check_graphql_valid")}`,
{
icon: "error",
}
)
console.log("Error", error)
}
},