GQL Query Editor shows toast on prettifying invalid queries
This commit is contained in:
parent
cb0de46e7d
commit
64091c1f29
1 changed files with 3 additions and 2 deletions
|
|
@ -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",
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue