Skip to content

Commit

Permalink
context builder
Browse files Browse the repository at this point in the history
  • Loading branch information
anujgoyal1 committed Mar 27, 2024
1 parent f0bbaa4 commit e191c2f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ public Single<AttributeModel> getForeignIdAttribute(
@Override
public Single<AttributeModel> getAttributeById(
GraphQlRequestContext context, String attributeId) {
return GrpcRxExecutionContext.forContext(this.grpcContextBuilder.build(context))
.wrapSingle(() -> this.cachingAttributeClient.get(attributeId))
.toMaybe()
return grpcContextBuilder
.build(context)
.call(() -> cachingAttributeClient.get(attributeId))
.mapOptional(this.translator::translate)
.switchIfEmpty(Single.error(this.buildErrorForMissingAttributeId(attributeId)));

Check warning on line 96 in hypertrace-core-graphql-attribute-store/src/main/java/org/hypertrace/core/graphql/attributes/CachingAttributeStore.java

View check run for this annotation

Codecov / codecov/patch

hypertrace-core-graphql-attribute-store/src/main/java/org/hypertrace/core/graphql/attributes/CachingAttributeStore.java#L92-L96

Added lines #L92 - L96 were not covered by tests
}
Expand Down

0 comments on commit e191c2f

Please sign in to comment.