GQL Query Editor shows toast on prettifying invalid queries
This commit is contained in:
@@ -171,8 +171,9 @@ export default {
|
|||||||
try {
|
try {
|
||||||
this.value = gql.print(gql.parse(this.editor.getValue()))
|
this.value = gql.print(gql.parse(this.editor.getValue()))
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// Catching the exception to avoid the event to be passed to the browser
|
this.$toast.error(`${this.$t("gql_prettify_invalid_query")}`, {
|
||||||
// Prevents the print dialog from appearing
|
icon: "error",
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user