From afdf4a268aa6a55af9130a9b2a3d98950af181d4 Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Sun, 1 Mar 2020 18:47:00 -0500 Subject: [PATCH] Updated messages for when getSchema fails --- lang/en-US.js | 2 ++ pages/graphql.vue | 11 +++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lang/en-US.js b/lang/en-US.js index 8a4c24434..df77d3ddc 100644 --- a/lang/en-US.js +++ b/lang/en-US.js @@ -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", diff --git a/pages/graphql.vue b/pages/graphql.vue index 241ef9e88..ba443b0d4 100644 --- a/pages/graphql.vue +++ b/pages/graphql.vue @@ -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) } },