From 279c8c14cce859f5503cde11661ee063adc7ca6d Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Sat, 6 Feb 2021 19:36:19 -0500 Subject: [PATCH] Disabling GQL schema polling if there was an error --- pages/graphql.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pages/graphql.vue b/pages/graphql.vue index 00d17c019..3bc80175b 100644 --- a/pages/graphql.vue +++ b/pages/graphql.vue @@ -810,6 +810,8 @@ export default { this.$refs.queryEditor.setValidationSchema(schema) this.$nuxt.$loading.finish() + + if (this.isPollingSchema) this.timeoutSubscription = setTimeout(this.pollSchema, 7000) } catch (error) { this.$nuxt.$loading.finish() @@ -821,11 +823,12 @@ export default { } ) console.log("Error", error) + + this.isPollingSchema = false } this.$nuxt.$loading.finish() - if (this.isPollingSchema) this.timeoutSubscription = setTimeout(this.pollSchema, 7000) }, async getSchema() { const startTime = Date.now()