Skip to content

DRAFT: add rawData field in Entity type #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: alpha
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/rules-engine/data-processors/dgraph-data-processor.ts
Original file line number Diff line number Diff line change
@@ -119,6 +119,7 @@ export default class DgraphDataProcessor implements DataProcessor {
data: {
id: `${this.providerName}-provider`,
},
rawData: {},
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like these are load data for rule check, so I set the rawData to en empty object

},
{
name: `${this.providerName}Findings`,
@@ -138,6 +139,7 @@ export default class DgraphDataProcessor implements DataProcessor {
),
},
},
rawData: {},
},
]
: []
@@ -235,6 +237,7 @@ addruleMetadata(input: $input, upsert: true) {
severity,
})
),
rawData: {}
},
]
}
@@ -266,6 +269,7 @@ mutation($input: [Add${this.providerName}${this.entityName}FindingsInput!]!) {
}
`,
data: entitiesData,
rawData: {}
},
...providerData,
]
1 change: 1 addition & 0 deletions src/types/index.ts
Original file line number Diff line number Diff line change
@@ -61,6 +61,7 @@ export interface Entity {
name: string
mutation: EntityMutations | string
data: any[] | any
rawData: any[] | any;
}

export interface ProviderData {