This is an automated email from the ASF dual-hosted git repository.

likyh pushed a commit to branch release-v0.14
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git

commit d415e7a26f180bb29e7fc35187d7d46d9a25ccf6
Author: linyh <[email protected]>
AuthorDate: Wed Oct 19 19:42:36 2022 +0800

    feat: save query vars into raw_table.input
---
 plugins/helper/graphql_collector.go | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/plugins/helper/graphql_collector.go 
b/plugins/helper/graphql_collector.go
index 261009b6..07999394 100644
--- a/plugins/helper/graphql_collector.go
+++ b/plugins/helper/graphql_collector.go
@@ -259,11 +259,15 @@ func (collector *GraphqlCollector) fetchAsync(divider 
*BatchSaveDivider, reqData
        }
        db := collector.args.Ctx.GetDal()
        queryStr, _ := graphql.ConstructQuery(query, variables)
+       variablesJson, err := json.Marshal(variables)
+       if err != nil {
+               panic(err)
+       }
        row := &RawData{
                Params: collector.params,
                Data:   paramsBytes,
                Url:    queryStr,
-               Input:  reqData.InputJSON,
+               Input:  variablesJson,
        }
        err = db.Create(row, dal.From(collector.table))
        if err != nil {

Reply via email to