From 64091c1f29585a7e5bcc899b1d658cb916b208f6 Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Thu, 5 Mar 2020 14:36:30 -0500 Subject: [PATCH] GQL Query Editor shows toast on prettifying invalid queries --- components/graphql/queryeditor.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/graphql/queryeditor.vue b/components/graphql/queryeditor.vue index e351bf5b3..8503c1804 100644 --- a/components/graphql/queryeditor.vue +++ b/components/graphql/queryeditor.vue @@ -171,8 +171,9 @@ export default { try { this.value = gql.print(gql.parse(this.editor.getValue())) } catch (e) { - // Catching the exception to avoid the event to be passed to the browser - // Prevents the print dialog from appearing + this.$toast.error(`${this.$t("gql_prettify_invalid_query")}`, { + icon: "error", + }) } },