-
Notifications
You must be signed in to change notification settings - Fork 85
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-3537: Add interface to read resolved entity type schemas #5594
Merged
TimDiekmann
merged 6 commits into
main
from
t/h-3537-allow-querying-of-resolved-entity-types
Nov 7, 2024
Merged
H-3537: Add interface to read resolved entity type schemas #5594
TimDiekmann
merged 6 commits into
main
from
t/h-3537-allow-querying-of-resolved-entity-types
Nov 7, 2024
+801
−249
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
area/apps > hash*
Affects HASH (a `hash-*` app)
area/apps > hash-api
Affects the HASH API (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
Nov 6, 2024
TimDiekmann
force-pushed
the
t/h-3537-allow-querying-of-resolved-entity-types
branch
from
November 6, 2024 12:15
2c0a119
to
9e9fb8b
Compare
TimDiekmann
changed the base branch from
main
to
t/h-3543-allow-querying-for-closed-entity-types-alongside-the
November 6, 2024 12:15
TimDiekmann
force-pushed
the
t/h-3537-allow-querying-of-resolved-entity-types
branch
from
November 6, 2024 12:15
9e9fb8b
to
658f3cd
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5594 +/- ##
==========================================
- Coverage 20.08% 20.08% -0.01%
==========================================
Files 514 514
Lines 17372 17375 +3
Branches 2545 2546 +1
==========================================
Hits 3490 3490
- Misses 13844 13847 +3
Partials 38 38
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
CiaranMn
previously approved these changes
Nov 7, 2024
Base automatically changed from
t/h-3543-allow-querying-for-closed-entity-types-alongside-the
to
main
November 7, 2024 10:01
TimDiekmann
force-pushed
the
t/h-3537-allow-querying-of-resolved-entity-types
branch
from
November 7, 2024 10:08
73b913f
to
d36564a
Compare
Benchmark results
|
Function | Value | Mean | Flame graphs |
---|---|---|---|
entity_by_id | 25 entities | Flame Graph | |
entity_by_id | 5 entities | Flame Graph | |
entity_by_id | 1 entities | Flame Graph | |
entity_by_id | 10 entities | Flame Graph | |
entity_by_id | 50 entities | Flame Graph |
representative_read_entity
Function | Value | Mean | Flame graphs |
---|---|---|---|
entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1
|
Flame Graph | |
entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1
|
Flame Graph | |
entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1
|
Flame Graph | |
entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2
|
Flame Graph | |
entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/block/v/1
|
Flame Graph | |
entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1
|
Flame Graph | |
entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1
|
Flame Graph | |
entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1
|
Flame Graph | |
entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1
|
Flame Graph |
scaling_read_entity_complete_zero_depth
Function | Value | Mean | Flame graphs |
---|---|---|---|
entity_by_id | 25 entities | Flame Graph | |
entity_by_id | 5 entities | Flame Graph | |
entity_by_id | 1 entities | Flame Graph | |
entity_by_id | 10 entities | Flame Graph | |
entity_by_id | 50 entities | Flame Graph |
scaling_read_entity_linkless
Function | Value | Mean | Flame graphs |
---|---|---|---|
entity_by_id | 1 entities | Flame Graph | |
entity_by_id | 10000 entities | Flame Graph | |
entity_by_id | 100 entities | Flame Graph | |
entity_by_id | 1000 entities | Flame Graph | |
entity_by_id | 10 entities | Flame Graph |
representative_read_multiple_entities
Function | Value | Mean | Flame graphs |
---|---|---|---|
link_by_source_by_property | depths: DT=255, PT=255, ET=255, E=255 | Flame Graph | |
link_by_source_by_property | depths: DT=0, PT=0, ET=2, E=2 | Flame Graph | |
link_by_source_by_property | depths: DT=2, PT=2, ET=2, E=2 | Flame Graph | |
link_by_source_by_property | depths: DT=0, PT=0, ET=0, E=0 | Flame Graph | |
link_by_source_by_property | depths: DT=0, PT=2, ET=2, E=2 | Flame Graph | |
link_by_source_by_property | depths: DT=0, PT=0, ET=0, E=2 | Flame Graph | |
entity_by_property | depths: DT=255, PT=255, ET=255, E=255 | Flame Graph | |
entity_by_property | depths: DT=0, PT=0, ET=2, E=2 | Flame Graph | |
entity_by_property | depths: DT=2, PT=2, ET=2, E=2 | Flame Graph | |
entity_by_property | depths: DT=0, PT=0, ET=0, E=0 | Flame Graph | |
entity_by_property | depths: DT=0, PT=2, ET=2, E=2 | Flame Graph | |
entity_by_property | depths: DT=0, PT=0, ET=0, E=2 | Flame Graph |
representative_read_entity_type
Function | Value | Mean | Flame graphs |
---|---|---|---|
get_entity_type_by_id | Account ID: d4e16033-c281-4cde-aa35-9085bf2e7579
|
Flame Graph |
CiaranMn
approved these changes
Nov 7, 2024
TimDiekmann
deleted the
t/h-3537-allow-querying-of-resolved-entity-types
branch
November 7, 2024 11:22
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/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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🌟 What is the purpose of this PR?
When querying entities or entity types it's often desired to have all information combined, which includes the direct link/link destination metadata, all linked property types and the closed data types.
In theory, this is possible with the subgraph, but:
🔍 What does this change?
includeClosed: bool
toincludeEntityTypes: "closed" | "resolved"
Pre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
📜 Does this require a change to the docs?
The changes in this PR:
🕸️ Does this require a change to the Turbo Graph?
The changes in this PR:
To read property types currently internally the subgraph is used. This can be optimized in performance (which still needs to be solved regarding permissions) and is limited to "only" 255 deep property types.
🐾 Next steps
🛡 What tests cover this?