From 24166013a7c9c5a40e4e4b520fd10874b3e2b086 Mon Sep 17 00:00:00 2001 From: zhangliang Date: Fri, 21 Apr 2023 15:44:43 +0800 Subject: [PATCH] fix: resolution_date is early than created_date --- backend/helpers/pluginhelper/api/graphql_collector.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/backend/helpers/pluginhelper/api/graphql_collector.go b/backend/helpers/pluginhelper/api/graphql_collector.go index 67e3eca8032..2007dbfc6d8 100644 --- a/backend/helpers/pluginhelper/api/graphql_collector.go +++ b/backend/helpers/pluginhelper/api/graphql_collector.go @@ -305,9 +305,6 @@ func (collector *GraphqlCollector) ExtractExistRawData(divider *BatchSaveDivider defer cursor.Close() row := &RawData{} - // get the type of query and variables - query, variables, _ := collector.args.BuildQuery(nil) - // prgress collector.args.Ctx.SetProgress(0, -1) ctx := collector.args.Ctx.GetContext() @@ -318,6 +315,8 @@ func (collector *GraphqlCollector) ExtractExistRawData(divider *BatchSaveDivider return errors.Convert(ctx.Err()) default: } + // get the type of query and variables. For each iteration, the query should be a different object + query, variables, _ := collector.args.BuildQuery(nil) err = db.Fetch(cursor, row) if err != nil { return errors.Default.Wrap(err, "error fetching row")