Skip to content

Commit f5357d2

Browse files
authored
Merge pull request #49 from cloudgraphdev/feature/CG-1631
fix: Fixed some duplication issues without destroying data first
2 parents da61bcc + 7d798b4 commit f5357d2

5 files changed

Lines changed: 7 additions & 11 deletions

File tree

src/services/billing/mutation.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export default `mutation($input: [AddawsBillingInput!]!) {
2-
addawsBilling(input: $input) {
2+
addawsBilling(input: $input, upsert: true) {
33
numUids
44
}
5-
}`
5+
}`

src/services/billing/schema.graphql

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
type awsBilling {
2-
id: String! @id @search(by: [hash])
3-
accountId: String! @id @search(by: [hash])
1+
type awsBilling implements awsOptionalService @key(fields: "id") {
42
totalCostMonthToDate: awsTotalBillingInfo
53
totalCostLast30Days: awsTotalBillingInfo
64
monthToDateDailyAverage: [awsServiceBillingInfo]

src/services/flowLogs/mutation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export default `mutation($input: [AddawsFlowLogInput!]!) {
2-
addawsFlowLog(input: $input) {
2+
addawsFlowLog(input: $input, upsert: true) {
33
numUids
44
}
55
}`

src/services/flowLogs/schema.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
type awsFlowLog implements awsOptionalService @key(fields: "id") {
1+
type awsFlowLog implements awsBaseService @key(fields: "arn") {
22
creationTime: String @search(by: [hash, regexp])
33
deliverLogsErrorMessage: String @search(by: [hash, regexp, fulltext])
44
deliverLogsPermissionArn: String @search(by: [hash, regexp])

src/types/generated.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -552,9 +552,7 @@ export type AwsBaseService = {
552552
region?: Maybe<Scalars['String']>;
553553
};
554554

555-
export type AwsBilling = {
556-
accountId: Scalars['String'];
557-
id: Scalars['String'];
555+
export type AwsBilling = AwsOptionalService & {
558556
last30Days?: Maybe<Array<Maybe<AwsServiceBillingInfo>>>;
559557
last30DaysDailyAverage?: Maybe<Array<Maybe<AwsServiceBillingInfo>>>;
560558
monthToDate?: Maybe<Array<Maybe<AwsServiceBillingInfo>>>;
@@ -2872,7 +2870,7 @@ export type AwsFederatedAuthentication = {
28722870
selfServiceSamlProviderArn?: Maybe<Scalars['String']>;
28732871
};
28742872

2875-
export type AwsFlowLog = AwsOptionalService & {
2873+
export type AwsFlowLog = AwsBaseService & {
28762874
creationTime?: Maybe<Scalars['String']>;
28772875
deliverLogsErrorMessage?: Maybe<Scalars['String']>;
28782876
deliverLogsPermissionArn?: Maybe<Scalars['String']>;

0 commit comments

Comments
 (0)