Skip to content
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

DRAFT: add rawData field in Entity type #35

Open
wants to merge 1 commit into
base: alpha
Choose a base branch
from
Open
Show file tree
Hide file tree
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
Expand Up @@ -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`,
Expand All @@ -138,6 +139,7 @@ export default class DgraphDataProcessor implements DataProcessor {
),
},
},
rawData: {},
},
]
: []
Expand Down Expand Up @@ -235,6 +237,7 @@ addruleMetadata(input: $input, upsert: true) {
severity,
})
),
rawData: {}
},
]
}
Expand Down Expand Up @@ -266,6 +269,7 @@ mutation($input: [Add${this.providerName}${this.entityName}FindingsInput!]!) {
}
`,
data: entitiesData,
rawData: {}
},
...providerData,
]
Expand Down
1 change: 1 addition & 0 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export interface Entity {
name: string
mutation: EntityMutations | string
data: any[] | any
rawData: any[] | any;
}

export interface ProviderData {
Expand Down