From c872150a41ee85f3198b9067c16c890631a56041 Mon Sep 17 00:00:00 2001 From: Roy Duineveld Date: Tue, 23 Nov 2021 09:36:58 +0100 Subject: [PATCH] GraphQL mutation clear with variables --- resources/js/components/GraphqlMutation.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/resources/js/components/GraphqlMutation.vue b/resources/js/components/GraphqlMutation.vue index 9e4f80b35..a45386284 100644 --- a/resources/js/components/GraphqlMutation.vue +++ b/resources/js/components/GraphqlMutation.vue @@ -102,14 +102,15 @@ return } - if (this.clear) { - this.changes = {} - } - if (this.callback) { await this.callback(this.changes, this.data, response) } + if (this.clear) { + this.changes = {} + this.data = {} + } + var self = this self.mutated = true setTimeout(function() {