Skip to content

Commit 17dddb5

Browse files
authored
feat: request includeInactive for all entity id queries (#719)
* feat: request includeInactive for all entity id queries * feat: includeInactive is configurable defaulting to true
1 parent 90d31a5 commit 17dddb5

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

projects/observability/src/shared/graphql/request/handlers/entities/query/entity/entity-graphql-query-handler.service.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
} from '@hypertrace/graphql-client';
99
import { Observable } from 'rxjs';
1010
import { map, throwIfEmpty } from 'rxjs/operators';
11-
import { Entity, EntityType, ObservabilityEntityType } from '../../../../../model/schema/entity';
11+
import { Entity, EntityType } from '../../../../../model/schema/entity';
1212
import { GraphQlEntityFilter } from '../../../../../model/schema/filter/entity/graphql-entity-filter';
1313
import { EntitiesGraphqlQueryBuilderService } from '../entities-graphql-query-builder.service';
1414
import {
@@ -57,8 +57,8 @@ export class EntityGraphQlQueryHandlerService implements GraphQlQueryHandler<Gra
5757
timeRange: request.timeRange,
5858
properties: request.properties,
5959
filters: [new GraphQlEntityFilter(request.id, request.entityType)],
60-
// If querying for a single API, then always want to includeInactive
61-
includeInactive: request.entityType === ObservabilityEntityType.Api
60+
// If querying for a single API by ID, then usually want to includeInactive
61+
includeInactive: request.includeInactive !== false
6262
};
6363
}
6464
}
@@ -71,4 +71,5 @@ export interface GraphQlEntityRequest {
7171
id: string;
7272
properties: Specification[];
7373
timeRange: GraphQlTimeRange;
74+
includeInactive?: boolean;
7475
}

projects/observability/src/shared/graphql/request/handlers/entities/query/interactions/interactions-graphql-query-handler.service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ export class InteractionsGraphQlQueryHandlerService
6868
id: request.entityId,
6969
entityType: request.entityType,
7070
properties: [],
71-
timeRange: request.timeRange
71+
timeRange: request.timeRange,
72+
includeInactive: false
7273
};
7374
}
7475

0 commit comments

Comments
 (0)