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

chore | adding the support for querying multi interaction filters #203

Merged
merged 8 commits into from
Nov 29, 2023

Conversation

aman-bansal
Copy link
Member

No description provided.

@aman-bansal aman-bansal requested a review from a team as a code owner November 27, 2023 07:42
Copy link

codecov bot commented Nov 27, 2023

Codecov Report

Attention: 74 lines in your changes are missing coverage. Please review.

Comparison is base (4055aaf) 21.84% compared to head (b64cb30) 21.39%.

Files Patch % Lines
...ace/graphql/entity/request/EdgeRequestBuilder.java 0.00% 40 Missing ⚠️
...GatewayServiceEntityInteractionRequestBuilder.java 0.00% 28 Missing ⚠️
...ql/entity/dao/GatewayServiceEntityEdgeFetcher.java 0.00% 6 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #203      +/-   ##
============================================
- Coverage     21.84%   21.39%   -0.46%     
  Complexity       75       75              
============================================
  Files            70       70              
  Lines          1831     1856      +25     
  Branches         55       55              
============================================
- Hits            400      397       -3     
- Misses         1422     1450      +28     
  Partials          9        9              
Flag Coverage Δ
unit 21.39% <1.33%> (-0.46%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Nov 27, 2023

Test Results

25 tests  ±0   25 ✔️ ±0   26s ⏱️ -1s
11 suites ±0     0 💤 ±0 
11 files   ±0     0 ±0 

Results for commit b64cb30. ± Comparison against base commit 4055aaf.

♻️ This comment has been updated with latest results.

@aman-bansal aman-bansal reopened this Nov 27, 2023
private Single<Map<String, EdgeSetRequest>> getEdgeSetRequest(
GraphQlRequestContext context,
EdgeType edgeType,
Map<String, Set<SelectedField>> edgeFields) {
Copy link
Contributor

Choose a reason for hiding this comment

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

in general, be careful with the naming especial with fields since they can represent any part of the query. These, if I'm following correctly represent a map of entity types to a set of edge set fields (e.g. outgoingEdges( neighborScope: "SERVICE") would be one entry under the service key) rather than the fields that define an actual edge.

I missed this earlier but since we group at the level of edge scope + edge type (e.g. outgoing services), that means if I had two edge sets of the same type with different filters, the filters would be ANDed. Is that desirable? If yes, can leave. If no, you'd want to avoid the grouping by type and create a new EdgeSetRequest for every edge set field and hold them as a collection rather than mapped by entity type.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't see any use case for having different filters for the same set of edges. We had the same issue when we built the use case of a third-party application flow and decided to make the filters as AND across all edges defined. I think we can leave like this.

Copy link
Member Author

Choose a reason for hiding this comment

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

renamed other arguments to be more meaningful

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see any use case for having different filters for the same set of edges.

Disagree - there's plenty of compelling use cases here. I want to get a set of by slow downstream services and a set of my high error rate downstream services, for example. It's not just about AND/OR - it's what the caller wants to separate e.g. downstream external APIs vs downstream internal APIs.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we might eventually want to change this, but can defer until we have a need.

Copy link
Contributor

@suresh-prakash suresh-prakash left a comment

Choose a reason for hiding this comment

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

Looks good to me. We can wait for Aaron's review too.

@aman-bansal aman-bansal merged commit dae8a7a into main Nov 29, 2023
6 of 8 checks passed
@aman-bansal aman-bansal deleted the aman/multi_filter branch November 29, 2023 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants