Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
2 changes: 1 addition & 1 deletion .snyk
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ ignore:
SNYK-JAVA-IONETTY-1042268:
- '*':
reason: No replacement available
expires: 2021-12-31T00:00:00.000Z
expires: 2022-03-31T00:00:00.000Z
patch: {}

2 changes: 1 addition & 1 deletion hypertrace-core-graphql
Submodule hypertrace-core-graphql updated 53 files
+1 −1 .snyk
+17 −0 .../main/java/org/hypertrace/core/graphql/common/deserialization/AttributeExpressionDeserializationConfig.java
+3 −0 ...on-schema/src/main/java/org/hypertrace/core/graphql/common/deserialization/CommonDeserializationModule.java
+4 −0 ...a/src/main/java/org/hypertrace/core/graphql/common/deserialization/FilterArgumentDeserializationConfig.java
+4 −0 ...ma/src/main/java/org/hypertrace/core/graphql/common/deserialization/OrderArgumentDeserializationConfig.java
+5 −4 ...e-core-graphql-common-schema/src/main/java/org/hypertrace/core/graphql/common/request/AttributeRequest.java
+5 −2 ...graphql-common-schema/src/main/java/org/hypertrace/core/graphql/common/request/AttributeRequestBuilder.java
+28 −18 ...-common-schema/src/main/java/org/hypertrace/core/graphql/common/request/DefaultAttributeRequestBuilder.java
+13 −4 ...hql-common-schema/src/main/java/org/hypertrace/core/graphql/common/request/DefaultFilterRequestBuilder.java
+16 −7 ...-common-schema/src/main/java/org/hypertrace/core/graphql/common/request/DefaultResultSetRequestBuilder.java
+2 −1 ...graphql-common-schema/src/main/java/org/hypertrace/core/graphql/common/request/ResultSetRequestBuilder.java
+15 −2 ...ql-common-schema/src/main/java/org/hypertrace/core/graphql/common/schema/attributes/AttributeQueryable.java
+56 −0 ...chema/src/main/java/org/hypertrace/core/graphql/common/schema/attributes/arguments/AttributeExpression.java
+9 −0 ...schema/src/main/java/org/hypertrace/core/graphql/common/schema/results/arguments/filter/FilterArgument.java
+22 −2 ...n-schema/src/main/java/org/hypertrace/core/graphql/common/schema/results/arguments/order/OrderArgument.java
+1 −4 ...ql-common-schema/src/main/java/org/hypertrace/core/graphql/common/utils/attributes/AttributeAssociator.java
+5 −6 ...on-schema/src/main/java/org/hypertrace/core/graphql/common/utils/attributes/DefaultAttributeAssociator.java
+5 −2 ...rc/test/java/org/hypertrace/core/graphql/common/deserialization/OrderArgumentDeserializationConfigTest.java
+16 −6 ...mon-schema/src/test/java/org/hypertrace/core/graphql/common/request/DefaultAttributeRequestBuilderTest.java
+43 −2 ...common-schema/src/test/java/org/hypertrace/core/graphql/common/request/DefaultFilterRequestBuilderTest.java
+21 −0 ...way-service-utils/src/main/java/org/hypertrace/core/graphql/utils/gateway/AttributeExpressionConverter.java
+12 −6 ...ql-gateway-service-utils/src/main/java/org/hypertrace/core/graphql/utils/gateway/AttributeMapConverter.java
+0 −26 ...vice-utils/src/main/java/org/hypertrace/core/graphql/utils/gateway/ColumnIdentifierExpressionConverter.java
+5 −4 ...-graphql-gateway-service-utils/src/main/java/org/hypertrace/core/graphql/utils/gateway/FilterConverter.java
+7 −3 ...aphql-gateway-service-utils/src/main/java/org/hypertrace/core/graphql/utils/gateway/GatewayUtilsModule.java
+6 −4 ...y-service-utils/src/main/java/org/hypertrace/core/graphql/utils/gateway/OrderByExpressionListConverter.java
+5 −7 ...-service-utils/src/main/java/org/hypertrace/core/graphql/utils/gateway/SelectionExpressionSetConverter.java
+1 −1 ...-gateway-service-utils/src/main/java/org/hypertrace/core/graphql/utils/gateway/UnwrappedValueConverter.java
+59 −0 ...service-utils/src/test/java/org/hypertrace/core/graphql/utils/gateway/AttributeExpressionConverterTest.java
+0 −35 ...-utils/src/test/java/org/hypertrace/core/graphql/utils/gateway/ColumnIdentifierExpressionConverterTest.java
+8 −5 ...chema/src/main/java/org/hypertrace/core/graphql/log/event/dao/GatewayServiceLogEventsResponseConverter.java
+4 −1 ...ore-graphql-log-event-schema/src/main/java/org/hypertrace/core/graphql/log/event/dao/LogEventDaoModule.java
+5 −1 ...event-schema/src/main/java/org/hypertrace/core/graphql/log/event/request/DefaultLogEventRequestBuilder.java
+4 −9 ...race-core-graphql-log-event-schema/src/test/java/org/hypertrace/core/graphql/log/event/dao/BaseDaoTest.java
+27 −22 ...hema/src/test/java/org/hypertrace/core/graphql/log/event/dao/GatewayServiceLogEventsRequestBuilderTest.java
+40 −26 ...a/src/test/java/org/hypertrace/core/graphql/log/event/dao/GatewayServiceLogEventsResponseConverterTest.java
+10 −10 hypertrace-core-graphql-platform/build.gradle.kts
+10 −6 ...ore-graphql-span-schema/src/main/java/org/hypertrace/core/graphql/span/dao/GatewayServiceSpanConverter.java
+6 −1 hypertrace-core-graphql-span-schema/src/main/java/org/hypertrace/core/graphql/span/dao/SpanDaoModule.java
+2 −1 hypertrace-core-graphql-span-schema/src/main/java/org/hypertrace/core/graphql/span/dao/SpanLogEventDao.java
+5 −3 ...core-graphql-span-schema/src/main/java/org/hypertrace/core/graphql/span/dao/SpanLogEventRequestBuilder.java
+23 −12 ...e-graphql-span-schema/src/main/java/org/hypertrace/core/graphql/span/dao/SpanLogEventResponseConverter.java
+37 −27 hypertrace-core-graphql-span-schema/src/main/java/org/hypertrace/core/graphql/span/export/ExportSpan.java
+14 −11 ...ace-core-graphql-span-schema/src/main/java/org/hypertrace/core/graphql/span/export/ExportSpanConstants.java
+5 −4 ...e-graphql-span-schema/src/main/java/org/hypertrace/core/graphql/span/request/DefaultSpanRequestBuilder.java
+6 −5 ...hql-span-schema/src/main/java/org/hypertrace/core/graphql/span/request/LogEventAttributeRequestBuilder.java
+3 −2 ...ace-core-graphql-span-schema/src/main/java/org/hypertrace/core/graphql/span/request/SpanRequestBuilder.java
+56 −55 hypertrace-core-graphql-span-schema/src/test/java/org/hypertrace/core/graphql/span/dao/DaoTestUtil.java
+14 −14 ...-graphql-span-schema/src/test/java/org/hypertrace/core/graphql/span/dao/SpanLogEventRequestBuilderTest.java
+20 −7 ...aphql-span-schema/src/test/java/org/hypertrace/core/graphql/span/dao/SpanLogEventResponseConverterTest.java
+38 −12 hypertrace-core-graphql-span-schema/src/test/java/org/hypertrace/core/graphql/span/export/ExportSpanTest.java
+10 −6 ...-graphql-trace-schema/src/main/java/org/hypertrace/core/graphql/trace/dao/GatewayServiceTraceConverter.java
+4 −1 hypertrace-core-graphql-trace-schema/src/main/java/org/hypertrace/core/graphql/trace/dao/TraceDaoModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import java.util.Set;
import org.hypertrace.core.graphql.common.request.AttributeAssociation;
import org.hypertrace.core.graphql.common.request.AttributeRequest;
import org.hypertrace.core.graphql.common.schema.attributes.arguments.AttributeExpression;
import org.hypertrace.core.graphql.common.schema.results.arguments.filter.FilterArgument;
import org.hypertrace.core.graphql.common.utils.BiConverter;
import org.hypertrace.core.graphql.common.utils.Converter;
Expand Down Expand Up @@ -81,19 +82,21 @@ protected void configure() {
Collection<MetricRequest>,
Entity,
BaselineEntity,
Map<String, MetricContainer>>>() {}));
Map<AttributeExpression, MetricContainer>>>() {}));

requireBinding(
Key.get(
new TypeLiteral<
BiConverter<
Collection<AttributeRequest>, Map<String, Value>, Map<String, Object>>>() {}));
Collection<AttributeRequest>,
Map<String, Value>,
Map<AttributeExpression, Object>>>() {}));
requireBinding(
Key.get(
new TypeLiteral<
BiConverter<
Collection<MetricAggregationRequest>,
Map<String, AggregatedMetricValue>,
Map<String, BaselinedMetricAggregationContainer>>>() {}));
Map<AttributeExpression, BaselinedMetricAggregationContainer>>>() {}));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ private Single<ImmutableSetMultimap<String, InteractionResponse>> mapInteraction
private Single<Entry<String, InteractionResponse>> buildInteractionEntry(
AttributeRequest neighborIdAttribute, InteractionResponse response) {
return this.valueConverter
.convert(response.getInteraction().getAttributeMap().get(neighborIdAttribute.alias()))
.convert(response.getInteraction().getAttributeMap().get(neighborIdAttribute.asMapKey()))
.map(String::valueOf)
.map(id -> Map.entry(id, response));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.function.Function;
import java.util.stream.Collectors;
import javax.annotation.Nullable;
import javax.inject.Inject;
import lombok.experimental.Accessors;
import org.hypertrace.core.graphql.common.request.AttributeRequest;
import org.hypertrace.core.graphql.common.schema.attributes.arguments.AttributeExpression;
import org.hypertrace.core.graphql.common.utils.BiConverter;
import org.hypertrace.core.graphql.common.utils.TriConverter;
import org.hypertrace.gateway.service.v1.baseline.BaselineEntitiesResponse;
Expand All @@ -31,26 +33,28 @@
import org.hypertrace.graphql.metric.schema.MetricContainer;

class GatewayServiceEntityConverter {
private final BiConverter<Collection<AttributeRequest>, Map<String, Value>, Map<String, Object>>
private final BiConverter<
Collection<AttributeRequest>, Map<String, Value>, Map<AttributeExpression, Object>>
attributeMapConverter;

private final TriConverter<
Collection<MetricRequest>,
org.hypertrace.gateway.service.v1.entity.Entity,
BaselineEntity,
Map<String, MetricContainer>>
Map<AttributeExpression, MetricContainer>>
metricContainerConverter;
private final GatewayServiceEntityEdgeLookupConverter edgeLookupConverter;

@Inject
GatewayServiceEntityConverter(
BiConverter<Collection<AttributeRequest>, Map<String, Value>, Map<String, Object>>
BiConverter<
Collection<AttributeRequest>, Map<String, Value>, Map<AttributeExpression, Object>>
attributeMapConverter,
TriConverter<
Collection<MetricRequest>,
org.hypertrace.gateway.service.v1.entity.Entity,
BaselineEntity,
Map<String, MetricContainer>>
Map<AttributeExpression, MetricContainer>>
metricContainerConverter,
GatewayServiceEntityEdgeLookupConverter edgeLookupConverter) {
this.attributeMapConverter = attributeMapConverter;
Expand Down Expand Up @@ -103,7 +107,7 @@ private BaselineEntity getBaselineEntity(
private Map<String, BaselineEntity> getBaselineEntityMap(
BaselineEntitiesResponse baselineResponse) {
return baselineResponse.getBaselineEntityList().stream()
.collect(Collectors.toMap(BaselineEntity::getId, entity -> entity));
.collect(Collectors.toMap(BaselineEntity::getId, Function.identity()));
}

private Single<Entity> convertEntity(
Expand All @@ -121,7 +125,12 @@ private Single<Entity> convertEntity(
(attrMap, containerMap) ->
new ConvertedEntity(
attrMap
.get(entityRequest.resultSetRequest().idAttribute().attribute().key())
.get(
entityRequest
.resultSetRequest()
.idAttribute()
.attributeExpression()
.value())
.toString(),
entityRequest.entityType(),
attrMap,
Expand All @@ -136,20 +145,19 @@ private Single<Entity> convertEntity(
private static class ConvertedEntity implements Entity {
String id;
String type;
Map<String, Object> attributeValues;
Map<String, MetricContainer> metricContainers;
Map<AttributeExpression, Object> attributeValues;
Map<AttributeExpression, MetricContainer> metricContainers;
Map<String, EdgeResultSet> incomingEdges;
Map<String, EdgeResultSet> outgoingEdges;
LabelResultSet labels;

@Override
public Object attribute(String key) {
return this.attributeValues.get(key);
public Object attribute(AttributeExpression attributeExpression) {
return this.attributeValues.get(attributeExpression);
}

@Override
public MetricContainer metric(String key) {
return this.metricContainers.get(key);
public MetricContainer metric(AttributeExpression attributeExpression) {
return this.metricContainers.get(attributeExpression);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import static java.util.concurrent.TimeUnit.MILLISECONDS;

import com.google.protobuf.util.JsonFormat;
import io.grpc.CallCredentials;
import io.reactivex.rxjava3.core.Scheduler;
import io.reactivex.rxjava3.core.Single;
Expand All @@ -11,6 +12,7 @@
import javax.inject.Inject;
import javax.inject.Singleton;
import lombok.extern.slf4j.Slf4j;
import org.hypertrace.core.graphql.common.request.AttributeRequest;
import org.hypertrace.core.graphql.context.GraphQlRequestContext;
import org.hypertrace.core.graphql.rx.BoundedIoScheduler;
import org.hypertrace.core.graphql.spi.config.GraphQlServiceConfig;
Expand All @@ -23,6 +25,7 @@
import org.hypertrace.gateway.service.v1.entity.EntitiesResponse;
import org.hypertrace.gateway.service.v1.entity.Entity;
import org.hypertrace.graphql.entity.health.BaselineDao;
import org.hypertrace.graphql.entity.request.EntityLabelRequest;
import org.hypertrace.graphql.entity.request.EntityRequest;
import org.hypertrace.graphql.entity.schema.EntityResultSet;
import org.hypertrace.graphql.label.joiner.LabelJoiner;
Expand Down Expand Up @@ -73,13 +76,15 @@ public Single<EntityResultSet> getEntities(EntityRequest request) {
GraphQlRequestContext context = request.resultSetRequest().context();
return this.requestBuilder
.buildRequest(request)
.doOnSuccess(built -> log.warn(JsonFormat.printer().print(built)))
Copy link
Contributor

Choose a reason for hiding this comment

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

should we go with debug - log.debug?

Copy link
Contributor Author

@aaron-steinfeld aaron-steinfeld Jan 7, 2022

Choose a reason for hiding this comment

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

thanks - will strip this, it was only for debugging. Thought I had removed it, but I forgot to check in the removal.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

.subscribeOn(this.boundedIoScheduler)
.flatMap(serverRequest -> this.fetchAndMapEntities(context, request, serverRequest));
}

private Single<EntityResultSet> fetchAndMapEntities(
GraphQlRequestContext context, EntityRequest request, EntitiesRequest serverRequest) {
return this.makeEntityRequest(context, serverRequest)
.doOnSuccess(built -> log.warn(JsonFormat.printer().print(built)))
Copy link
Contributor

Choose a reason for hiding this comment

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

here also should we move to log.debug?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed entirely

.flatMap(serverResponse -> this.getEntityResultSet(request, serverRequest, serverResponse));
}

Expand Down Expand Up @@ -117,21 +122,22 @@ private Single<Map<Entity, LabelResultSet>> buildLabelResultSetMap(
.flatMap(
joiner ->
joiner.joinLabels(
entitiesResponse.getEntityList(), getEntityLabelsGetter(request)));
}

private LabelJoiner.LabelIdGetter<Entity> getEntityLabelsGetter(EntityRequest request) {
return entity -> Single.just(getLabelAttributeValue(request, entity));
entitiesResponse.getEntityList(),
entity -> Single.just(getLabelAttributeValue(request, entity))));
}

private List<String> getLabelAttributeValue(EntityRequest request, Entity entity) {
Value labelAttributeValue =
entity.getAttributeOrDefault(
request.labelRequest().get().labelIdArrayAttributeRequest().attribute().id(), null);
if (labelAttributeValue == null) {
log.warn("Unable to fetch labels attribute for entity with id {}", entity.getId());
return Collections.emptyList();
}
return labelAttributeValue.getStringArrayList();
return request
.labelRequest()
.map(EntityLabelRequest::labelIdArrayAttributeRequest)
.map(AttributeRequest::asMapKey)
.filter(entity::containsAttribute)
.map(entity::getAttributeOrThrow)
.<List<String>>map(Value::getStringArrayList)
.orElseGet(
() -> {
log.warn("Unable to fetch labels attribute for entity with id {}", entity.getId());
return Collections.emptyList();
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import javax.inject.Inject;
import lombok.experimental.Accessors;
import org.hypertrace.core.graphql.common.request.AttributeRequest;
import org.hypertrace.core.graphql.common.schema.attributes.arguments.AttributeExpression;
import org.hypertrace.core.graphql.common.utils.BiConverter;
import org.hypertrace.core.graphql.common.utils.CollectorUtils;
import org.hypertrace.gateway.service.v1.common.AggregatedMetricValue;
Expand All @@ -34,23 +35,25 @@ class GatewayServiceEntityEdgeFetcher {

private final EntityNeighborMapFetcher neighborMapFetcher;

private final BiConverter<Collection<AttributeRequest>, Map<String, Value>, Map<String, Object>>
private final BiConverter<
Collection<AttributeRequest>, Map<String, Value>, Map<AttributeExpression, Object>>
attributeMapConverter;
private final BiConverter<
Collection<MetricAggregationRequest>,
Map<String, AggregatedMetricValue>,
Map<String, BaselinedMetricAggregationContainer>>
Map<AttributeExpression, BaselinedMetricAggregationContainer>>
baselineMetricAggregationContainerMapConverter;

@Inject
GatewayServiceEntityEdgeFetcher(
EntityNeighborMapFetcher neighborMapFetcher,
BiConverter<Collection<AttributeRequest>, Map<String, Value>, Map<String, Object>>
BiConverter<
Collection<AttributeRequest>, Map<String, Value>, Map<AttributeExpression, Object>>
attributeMapConverter,
BiConverter<
Collection<MetricAggregationRequest>,
Map<String, AggregatedMetricValue>,
Map<String, BaselinedMetricAggregationContainer>>
Map<AttributeExpression, BaselinedMetricAggregationContainer>>
baselineMetricAggregationContainerMapConverter) {
this.neighborMapFetcher = neighborMapFetcher;
this.attributeMapConverter = attributeMapConverter;
Expand Down Expand Up @@ -127,17 +130,17 @@ private Maybe<Edge> buildEdge(
@Accessors(fluent = true)
private static class ConvertedEdge implements Edge {
Entity neighbor;
Map<String, Object> attributeValues;
Map<String, BaselinedMetricAggregationContainer> metricContainers;
Map<AttributeExpression, Object> attributeValues;
Map<AttributeExpression, BaselinedMetricAggregationContainer> metricContainers;

@Override
public Object attribute(String key) {
return this.attributeValues.get(key);
public Object attribute(AttributeExpression attributeExpression) {
return this.attributeValues.get(attributeExpression);
}

@Override
public BaselinedMetricAggregationContainer metric(String key) {
return this.metricContainers.get(key);
public BaselinedMetricAggregationContainer metric(AttributeExpression attributeExpressiony) {
return this.metricContainers.get(attributeExpressiony);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ private Single<Map<String, Collection<InteractionResponse>>> groupInteractionsBy
private Single<Entry<String, InteractionResponse>> builtInteractionTypeEntry(
InteractionResponse response, AttributeRequest neighborType) {

return this.getEntityType(response.getInteraction().getAttributeMap().get(neighborType.alias()))
return this.getEntityType(
response.getInteraction().getAttributeMap().get(neighborType.asMapKey()))
.map(entityType -> Map.entry(entityType, response));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import org.hypertrace.core.graphql.common.request.AttributeAssociation;
import org.hypertrace.core.graphql.common.request.AttributeRequest;
import org.hypertrace.core.graphql.common.schema.attributes.AttributeScope;
import org.hypertrace.core.graphql.common.schema.attributes.arguments.AttributeExpression;
import org.hypertrace.core.graphql.common.schema.results.arguments.filter.FilterArgument;
import org.hypertrace.core.graphql.common.schema.results.arguments.filter.FilterOperatorType;
import org.hypertrace.core.graphql.common.schema.results.arguments.filter.FilterType;
Expand Down Expand Up @@ -71,17 +72,19 @@ private Single<Filter> buildEntityTypeFilter(EdgeSetGroupRequest request) {
.map(
entityTypes ->
AttributeAssociation.<FilterArgument>of(
request.neighborTypeAttribute().attribute(),
request.neighborTypeAttribute().attributeExpression().attribute(),
new EntityNeighborTypeFilter(
request.neighborTypeAttribute().attribute().key(), entityTypes)))
request.neighborTypeAttribute().attributeExpression().value(),
entityTypes)))
.flatMap(filterAssociation -> this.filterConverter.convert(Set.of(filterAssociation)));
}

@Value
@Accessors(fluent = true)
private static class EntityNeighborTypeFilter implements FilterArgument {
FilterType type = FilterType.ATTRIBUTE;
String key;
String key = null;
AttributeExpression keyExpression;
FilterOperatorType operator = FilterOperatorType.IN;
Collection<String> value;
AttributeScope idType = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import org.hypertrace.core.graphql.common.request.ResultSetRequestBuilder;
import org.hypertrace.core.graphql.common.schema.arguments.TimeRangeArgument;
import org.hypertrace.core.graphql.common.schema.attributes.AttributeScope;
import org.hypertrace.core.graphql.common.schema.attributes.arguments.AttributeExpression;
import org.hypertrace.core.graphql.common.schema.results.arguments.filter.FilterArgument;
import org.hypertrace.core.graphql.common.schema.results.arguments.filter.FilterOperatorType;
import org.hypertrace.core.graphql.common.schema.results.arguments.filter.FilterType;
Expand Down Expand Up @@ -344,6 +345,7 @@ private static class InstantTimeRange implements TimeRangeArgument {
private static class EntityIdFilter implements FilterArgument {
FilterType type = FilterType.ID;
String key = null;
AttributeExpression keyExpression = null;
FilterOperatorType operator = FilterOperatorType.IN;
Collection<String> value;
AttributeScope idType = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import lombok.experimental.Accessors;
import org.hypertrace.core.graphql.common.request.AttributeRequest;
import org.hypertrace.core.graphql.common.request.AttributeRequestBuilder;
import org.hypertrace.core.graphql.common.schema.attributes.arguments.AttributeExpression;
import org.hypertrace.core.graphql.common.schema.results.ResultSet;
import org.hypertrace.core.graphql.context.GraphQlRequestContext;
import org.hypertrace.core.graphql.utils.schema.GraphQlSelectionFinder;
Expand Down Expand Up @@ -66,7 +67,8 @@ private boolean isLabelFieldRequested(
private Single<Optional<EntityLabelRequest>> buildRequest(
GraphQlRequestContext context, String scope) {
return this.attributeRequestBuilder
.buildForKey(context, scope, LABELS_ATTRIBUTE_KEY)
.buildForAttributeExpression(
context, scope, AttributeExpression.forAttributeKey(LABELS_ATTRIBUTE_KEY))
.map(DefaultLabelRequest::new)
.map(Optional::of);
}
Expand Down
Loading