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

H-2205, H-2354: Implement multi-type entities in the graph #4140

Merged
merged 12 commits into from
Mar 12, 2024

Conversation

TimDiekmann
Copy link
Member

🌟 What is the purpose of this PR?

Multi-type entities enables entities to have multiple type without creating a new type.

🔍 What does this change?

  • Change EntityTypeMetadata to store a vector of type ids
  • Adjust Rust code to support taking multiple types for creating/updating/validating an entity
  • Adjust the Node API to rewrite requests/responds to/from the graph to

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • does not modify any publishable blocks or libraries, or modifications do not need publishing

📜 Does this require a change to the docs?

The changes in this PR:

  • are internal and do not require a docs change

🕸️ Does this require a change to the Turbo Graph?

The changes in this PR:

  • do not affect the execution graph

⚠️ Known issues

  • Querying entities with multiple entity types is not possible, yet, because structural queries do not support this.

🐾 Next steps

  • Allow querying entities with multiple entity types: H-2351

🛡 What tests cover this?

  • Every test which uses the Graph to deal with entities will use the newly written code

@github-actions github-actions bot added area/deps Relates to third-party dependencies (area) area/apps > hash* Affects HASH (a `hash-*` app) area/libs Relates to first-party libraries/crates/packages (area) type/eng > backend Owned by the @backend team area/tests New or updated tests area/tests > integration New or updated integration tests area/apps area/apps > hash-graph labels Mar 8, 2024
Copy link

codecov bot commented Mar 8, 2024

Codecov Report

Attention: Patch coverage is 0% with 27 lines in your changes are missing coverage. Please review.

Project coverage is 27.52%. Comparing base (2f210f1) to head (c233069).
Report is 6 commits behind head on main.

Files Patch % Lines
.../@local/hash-subgraph/src/stdlib/subgraph/roots.ts 0.00% 14 Missing ⚠️
...s/hash-api/src/graph/knowledge/primitive/entity.ts 0.00% 9 Missing ⚠️
...-subgraph/tests/compatibility.test/map-vertices.ts 0.00% 2 Missing ⚠️
...hash-ai-worker-ts/src/activities/infer-entities.ts 0.00% 1 Missing ⚠️
...h-api/src/graph/knowledge/primitive/link-entity.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4140      +/-   ##
==========================================
- Coverage   27.56%   27.52%   -0.04%     
==========================================
  Files         278      278              
  Lines       11600    11613      +13     
  Branches     1174     1177       +3     
==========================================
- Hits         3197     3196       -1     
- Misses       8387     8401      +14     
  Partials       16       16              
Flag Coverage Δ
apps.hash-ai-worker-ts 5.23% <0.00%> (-0.01%) ⬇️
apps.hash-api 0.00% <0.00%> (ø)
local.hash-backend-utils 9.01% <ø> (ø)
local.hash-subgraph 19.37% <0.00%> (-0.48%) ⬇️

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.

@github-actions github-actions bot added the area/apps > hash-api Affects the HASH API (app) label Mar 8, 2024
@vercel vercel bot temporarily deployed to Preview – hash March 8, 2024 12:12 Inactive
@TimDiekmann TimDiekmann marked this pull request as ready for review March 8, 2024 16:06
@TimDiekmann TimDiekmann changed the title H-2205: Implement multi-type entities in the graph H-2205, H-2354: Implement multi-type entities in the graph Mar 11, 2024
Copy link
Member

@CiaranMn CiaranMn left a comment

Choose a reason for hiding this comment

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

🥳

@TimDiekmann TimDiekmann added this pull request to the merge queue Mar 12, 2024
Merged via the queue into main with commit fd4d46f Mar 12, 2024
110 of 111 checks passed
@TimDiekmann TimDiekmann deleted the t/h-2205-support-multi-type-entities-in-the-graph branch March 12, 2024 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/apps > hash* Affects HASH (a `hash-*` app) area/apps > hash-api Affects the HASH API (app) area/apps > hash-graph area/apps area/deps Relates to third-party dependencies (area) area/libs Relates to first-party libraries/crates/packages (area) area/tests > integration New or updated integration tests area/tests New or updated tests type/eng > backend Owned by the @backend team
Development

Successfully merging this pull request may close these issues.

2 participants