feat: add validation rules for csv import(in progress)

Signed-off-by: Pranav C <pranavxc@gmail.com>
This commit is contained in:
Pranav C
2021-11-16 20:51:15 +05:30
parent 71630f41ce
commit e8cc5192cb
5 changed files with 119 additions and 57 deletions

View File

@@ -252,6 +252,20 @@ export default class GqlApi {
})
return { list: list.data.data.m2mNotChildren, count: count.data.data.m2mNotChildrenCount.count }
}
async insertBulk(data, {
params = {}
} = {}) {
const data1 = await this.post(`/nc/${this.$ctx.projectId}/v1/graphql`, {
query: `mutation bulkInsert($data:[${this.tableCamelized}Input]){
${this.gqlMutationCreateName}Bulk(data: $data)
}`,
variables: {
data
}
}, params)
return data1.data.data[`${this.gqlMutationCreateName}Bulk`]
}
}
/**
* @copyright Copyright (c) 2021, Xgene Cloud Ltd