Skip to content

SRE-986: Dissolve the graph type-defs crate into the graph API - #9445

Merged
TimDiekmann merged 4 commits into
t/sre-982-remove-the-graph-api-packages-javascript-surfacefrom
t/sre-986-dissolve-the-graph-type-defs-crate-into-the-graph-api
Aug 31, 2026
Merged

SRE-986: Dissolve the graph type-defs crate into the graph API#9445
TimDiekmann merged 4 commits into
t/sre-982-remove-the-graph-api-packages-javascript-surfacefrom
t/sre-986-dissolve-the-graph-type-defs-crate-into-the-graph-api

Conversation

@TimDiekmann

Copy link
Copy Markdown
Member

🌟 What is the purpose of this PR?

libs/@local/graph/type-defs generated Rust from two TypeScript files by shelling out to yarn tsx and quicktype from build.rs, so building the Graph needed a working yarn install. Of that output only status_payloads.rs was included at all, and of its three structs only ErrorInfo was ever constructed.

Its only consumers are rest/json.rs and rest/entity_type.rs, and rest/status.rs already owns the conversion into responses. The crate moves there and disappears.

Builds on SRE-983. Last crate directory carrying a hand-maintained TypeScript surface, which is what SRE-984 was waiting on.

🔍 What does this change?

  • ErrorInfo is hand-written in rest/status.rs, keeping its field names and its HASH Graph domain default. RequestInfo and ResourceInfo are gone — nothing ever constructed them
  • The StatusPayloadInfo wrapper is gone with them, so the error body changes from {"contents":[{"Error":{…}}]} to {"contents":[{…}]}. That is what json_schemas/status.json already described; the externally tagged enum was the deviation. The schemas narrow to the payload that remains
  • openapi.json itself does not change — it references ./models/status.json, and the generator emits no client model for it
  • The backend integration test builds its GraphStatus from @local/status, which is where the crate's TypeScript re-exported it from anyway

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

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

📜 Does this require a change to the docs?

  • are internal and do not require a docs change

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

  • affected the execution graph, and the turbo.json's have been updated to reflect this

🐾 Next steps

SRE-984. With this merged no crate directory carries a JavaScript surface, so the remaining package.json files are pure generated wiring.

metadata stays on ErrorInfo for now: five call sites put the serde error text, the rejected entity type ID and the colliding base URL there, and none of that appears in message. H-3009 wants to add report information to it. Replacing it is a separate change.

🛡 What tests cover this?

The backend integration tests exercise the admin endpoints whose responses carry this status shape.

❓ How to test this?

  1. cargo clippy --all-features -p hash-graph-api
  2. turbo run codegen:generate-openapi-specs --filter '@rust/hash-graph-api' && git diff --exit-code libs/@local/graph/api/openapi/openapi.json
  3. mise run sync:turborepo && git diff --exit-code '**/package.json'

The napi module kept `lib.rs` and `index.ts` in one `src`, which is the layout
the tool expects but leaves both manifests in one directory. The crate moves to
`rust/`, the package to `typescript/`, and `napi build` is pointed at the crate
with `--manifest-path`.

Unlike the other splits nothing generated crosses the boundary: napi compiles
the crate straight into the package's `dist` beside the declarations it emits,
and `tsc` builds over both.

The package now depends on the crate. Without that the package graph has no
edge between them, and a change to `lib.rs` would not select the package that
compiles it.
Only ErrorInfo was ever constructed, so the payload enum goes with the
crate. The error body loses its "Error" wrapper, which is the shape
json_schemas/status.json always described.
@TimDiekmann TimDiekmann self-assigned this Aug 29, 2026
@vercel

vercel Bot commented Aug 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

4 Skipped Deployments
Project Deployment Actions Updated (UTC)
hash Ignored Ignored Preview Aug 29, 2026 9:44pm
hashdotdesign-tokens Ignored Ignored Preview Aug 29, 2026 9:44pm
petrinaut Skipped Skipped Aug 29, 2026 9:44pm
petrinaut-docs Skipped Skipped Aug 29, 2026 9:44pm

Request Review

@github-actions github-actions Bot added area/deps Relates to third-party dependencies (area) area/apps > hash* Affects HASH (a `hash-*` app) area/infra Relates to version control, CI, CD or IaC (area) 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 type/legal Owned by the @legal team labels Aug 29, 2026
@TimDiekmann
TimDiekmann deployed to pull-request August 29, 2026 20:50 — with GitHub Actions Active
@TimDiekmann
TimDiekmann deployed to pull-request August 29, 2026 20:50 — with GitHub Actions Active
@codecov

codecov Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.00%. Comparing base (9c2a890) to head (6a5c7c0).

Files with missing lines Patch % Lines
libs/@local/graph/api/src/rest/status.rs 0.00% 10 Missing ⚠️
libs/@local/graph/api/src/rest/entity_type.rs 0.00% 5 Missing ⚠️
libs/@local/graph/api/src/rest/json.rs 0.00% 4 Missing ⚠️
Additional details and impacted files
@@                                         Coverage Diff                                          @@
##           t/sre-983-split-the-effect-dns-hickory-rust-crate-and-typescript    #9445      +/-   ##
====================================================================================================
+ Coverage                                                             60.99%   61.00%   +0.01%     
====================================================================================================
  Files                                                                  1447     1447              
  Lines                                                                144468   144446      -22     
  Branches                                                               6687     6687              
====================================================================================================
+ Hits                                                                  88118    88121       +3     
+ Misses                                                                55246    55221      -25     
  Partials                                                               1104     1104              
Flag Coverage Δ
apps.hash-ai-worker-ts 1.99% <ø> (ø)
apps.hash-api 14.68% <ø> (ø)
blockprotocol.type-system 38.15% <ø> (ø)
local.claude-hooks 0.00% <ø> (ø)
local.harpc-client 51.49% <ø> (ø)
local.hash-backend-utils 3.27% <ø> (ø)
local.hash-graph-sdk 10.02% <ø> (ø)
local.hash-isomorphic-utils 12.22% <ø> (ø)
rust.antsi 2.36% <ø> (ø)
rust.error-stack 90.81% <ø> (ø)
rust.harpc-codec 84.70% <ø> (ø)
rust.harpc-net 96.26% <ø> (+0.04%) ⬆️
rust.harpc-tower 67.03% <ø> (ø)
rust.harpc-types 0.00% <ø> (ø)
rust.harpc-wire-protocol 92.23% <ø> (ø)
rust.hash-codec 72.76% <ø> (ø)
rust.hash-config 100.00% <ø> (ø)
rust.hash-graph-api 19.84% <0.00%> (+0.07%) ⬆️
rust.hash-graph-authentication 97.00% <ø> (ø)
rust.hash-graph-authorization 63.14% <ø> (ø)
rust.hash-graph-embeddings 91.88% <ø> (ø)
rust.hash-graph-postgres-store 32.02% <ø> (ø)
rust.hash-graph-store 48.41% <ø> (ø)
rust.hash-graph-temporal-versioning 50.18% <ø> (ø)
rust.hash-graph-types 0.00% <ø> (ø)
rust.hash-graph-validation 84.71% <ø> (ø)
rust.hash-middleware 92.19% <ø> (ø)
rust.hashql-ast 89.63% <ø> (ø)
rust.hashql-compiletest 28.39% <ø> (ø)
rust.hashql-core 78.95% <ø> (ø)
rust.hashql-diagnostics 72.51% <ø> (ø)
rust.hashql-eval 79.82% <ø> (ø)
rust.hashql-hir 89.09% <ø> (ø)
rust.hashql-mir 87.92% <ø> (ø)
rust.hashql-syntax-jexpr 94.04% <ø> (ø)

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

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codspeed-hq

codspeed-hq Bot commented Aug 29, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 98 untouched benchmarks


Comparing t/sre-986-dissolve-the-graph-type-defs-crate-into-the-graph-api (88ba673) with t/sre-983-split-the-effect-dns-hickory-rust-crate-and-typescript (9c2a890)

Open in CodSpeed

@vercel
vercel Bot temporarily deployed to Preview – petrinaut August 29, 2026 21:44 Inactive
@vercel
vercel Bot temporarily deployed to Preview – petrinaut-docs August 29, 2026 21:44 Inactive
@TimDiekmann
TimDiekmann requested a review from a team August 29, 2026 21:44
@TimDiekmann
TimDiekmann marked this pull request as ready for review August 29, 2026 21:44
@TimDiekmann
TimDiekmann requested a review from a team as a code owner August 29, 2026 21:44
@cursor

cursor Bot commented Aug 29, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes the serialized REST error contents shape, which can break clients that expected the former externally tagged Error wrapper.

Overview
Removes the hash-graph-type-defs workspace crate (including its build.rs yarn/quicktype codegen) and drops it from Cargo.toml, lockfile, and @rust/hash-graph-api dependencies.

ErrorInfo and the REST Status alias now live in rest/status.rs, with call sites in entity_type.rs and json.rs importing them there instead of wrapping payloads in StatusPayloadInfo. Unused RequestInfo / ResourceInfo types are deleted.

Breaking HTTP shape: error contents entries are plain ErrorInfo objects (metadata, reason, domain) instead of {"Error":{…}}. OpenAPI/JSON Schema under openapi/models and rest/json_schemas are narrowed to match; the HashQL HTTP test now asserts contents[0].metadata.

TypeScript integration tests use Status<ErrorInfo> from @local/status rather than @rust/hash-graph-type-defs. Dependency diagrams are renumbered after removing the crate node.

Reviewed by Cursor Bugbot for commit 88ba673. Bugbot is set up for automated code reviews on this repo. Configure here.

@TimDiekmann
TimDiekmann deployed to pull-request August 29, 2026 21:44 — with GitHub Actions Active
@TimDiekmann
TimDiekmann deployed to pull-request August 29, 2026 21:44 — with GitHub Actions Active
@github-actions

Copy link
Copy Markdown
Contributor

Benchmark results

@rust/hash-graph-benches – Integrations

policy_resolution_large

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2002 $$27.3 \mathrm{ms} \pm 228 \mathrm{μs}\left({\color{gray}-2.321 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.39 \mathrm{ms} \pm 20.2 \mathrm{μs}\left({\color{gray}-0.264 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1002 $$12.5 \mathrm{ms} \pm 120 \mathrm{μs}\left({\color{gray}0.400 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$43.4 \mathrm{ms} \pm 448 \mathrm{μs}\left({\color{gray}1.33 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$14.3 \mathrm{ms} \pm 149 \mathrm{μs}\left({\color{gray}0.618 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1527 $$24.6 \mathrm{ms} \pm 246 \mathrm{μs}\left({\color{gray}2.47 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$28.7 \mathrm{ms} \pm 233 \mathrm{μs}\left({\color{gray}-0.848 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.70 \mathrm{ms} \pm 22.7 \mathrm{μs}\left({\color{gray}0.031 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$13.5 \mathrm{ms} \pm 119 \mathrm{μs}\left({\color{gray}-0.076 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.76 \mathrm{ms} \pm 31.8 \mathrm{μs}\left({\color{gray}-0.533 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.93 \mathrm{ms} \pm 16.9 \mathrm{μs}\left({\color{gray}0.056 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 52 $$3.30 \mathrm{ms} \pm 20.4 \mathrm{μs}\left({\color{gray}-1.382 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$5.21 \mathrm{ms} \pm 50.3 \mathrm{μs}\left({\color{gray}1.62 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.50 \mathrm{ms} \pm 26.4 \mathrm{μs}\left({\color{gray}-0.635 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 108 $$4.10 \mathrm{ms} \pm 31.3 \mathrm{μs}\left({\color{gray}-1.091 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.35 \mathrm{ms} \pm 24.3 \mathrm{μs}\left({\color{gray}-0.558 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.39 \mathrm{ms} \pm 20.9 \mathrm{μs}\left({\color{gray}-0.428 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$4.08 \mathrm{ms} \pm 29.1 \mathrm{μs}\left({\color{gray}0.579 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.62 \mathrm{ms} \pm 15.4 \mathrm{μs}\left({\color{gray}-0.121 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.46 \mathrm{ms} \pm 17.2 \mathrm{μs}\left({\color{gray}-0.197 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 2 $$2.60 \mathrm{ms} \pm 14.6 \mathrm{μs}\left({\color{gray}-1.245 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$2.86 \mathrm{ms} \pm 18.6 \mathrm{μs}\left({\color{gray}-1.518 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.68 \mathrm{ms} \pm 16.8 \mathrm{μs}\left({\color{gray}-0.381 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$2.89 \mathrm{ms} \pm 18.6 \mathrm{μs}\left({\color{gray}0.102 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$3.00 \mathrm{ms} \pm 18.8 \mathrm{μs}\left({\color{gray}-0.297 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.72 \mathrm{ms} \pm 22.2 \mathrm{μs}\left({\color{gray}0.247 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 26 $$2.96 \mathrm{ms} \pm 23.4 \mathrm{μs}\left({\color{gray}-0.313 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.37 \mathrm{ms} \pm 23.5 \mathrm{μs}\left({\color{gray}-1.640 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$2.93 \mathrm{ms} \pm 25.4 \mathrm{μs}\left({\color{gray}-0.027 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 27 $$3.26 \mathrm{ms} \pm 22.2 \mathrm{μs}\left({\color{gray}0.006 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.34 \mathrm{ms} \pm 34.4 \mathrm{μs}\left({\color{gray}-0.134 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.90 \mathrm{ms} \pm 22.3 \mathrm{μs}\left({\color{gray}-0.825 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.27 \mathrm{ms} \pm 24.7 \mathrm{μs}\left({\color{gray}-0.901 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$41.6 \mathrm{ms} \pm 245 \mathrm{μs}\left({\color{gray}-0.057 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$31.8 \mathrm{ms} \pm 272 \mathrm{μs}\left({\color{gray}0.269 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$35.2 \mathrm{ms} \pm 302 \mathrm{μs}\left({\color{gray}0.297 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$36.9 \mathrm{ms} \pm 1.11 \mathrm{ms}\left({\color{red}20.1 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$40.4 \mathrm{ms} \pm 290 \mathrm{μs}\left({\color{gray}-1.676 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$49.2 \mathrm{ms} \pm 375 \mathrm{μs}\left({\color{gray}1.11 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$39.2 \mathrm{ms} \pm 272 \mathrm{μs}\left({\color{gray}0.588 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$90.0 \mathrm{ms} \pm 688 \mathrm{μs}\left({\color{gray}-1.575 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$45.7 \mathrm{ms} \pm 4.11 \mathrm{ms}\left({\color{red}40.4 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$307 \mathrm{ms} \pm 1.30 \mathrm{ms}\left({\color{gray}1.19 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$10.2 \mathrm{ms} \pm 76.9 \mathrm{μs}\left({\color{gray}-0.673 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$10.3 \mathrm{ms} \pm 67.5 \mathrm{μs}\left({\color{gray}-0.681 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$10.3 \mathrm{ms} \pm 59.8 \mathrm{μs}\left({\color{gray}-1.403 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$10.2 \mathrm{ms} \pm 58.3 \mathrm{μs}\left({\color{gray}-0.920 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$10.4 \mathrm{ms} \pm 64.6 \mathrm{μs}\left({\color{gray}-0.086 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$10.3 \mathrm{ms} \pm 64.3 \mathrm{μs}\left({\color{gray}-0.250 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$10.3 \mathrm{ms} \pm 102 \mathrm{μs}\left({\color{gray}1.49 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$10.3 \mathrm{ms} \pm 74.7 \mathrm{μs}\left({\color{gray}-1.133 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$10.5 \mathrm{ms} \pm 101 \mathrm{μs}\left({\color{gray}0.195 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$10.6 \mathrm{ms} \pm 76.2 \mathrm{μs}\left({\color{gray}-0.759 \mathrm{\%}}\right) $$ Flame Graph

representative_read_entity

Function Value Mean Flame graphs
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/block/v/1 $$10.6 \mathrm{ms} \pm 93.0 \mathrm{μs}\left({\color{gray}0.327 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$10.6 \mathrm{ms} \pm 64.4 \mathrm{μs}\left({\color{gray}-2.600 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$10.5 \mathrm{ms} \pm 63.6 \mathrm{μs}\left({\color{gray}-1.119 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$10.6 \mathrm{ms} \pm 77.4 \mathrm{μs}\left({\color{gray}-2.439 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$10.5 \mathrm{ms} \pm 69.5 \mathrm{μs}\left({\color{gray}-1.419 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$10.7 \mathrm{ms} \pm 78.8 \mathrm{μs}\left({\color{gray}0.444 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$10.5 \mathrm{ms} \pm 75.6 \mathrm{μs}\left({\color{gray}-0.683 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$10.6 \mathrm{ms} \pm 88.4 \mathrm{μs}\left({\color{gray}0.701 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$10.6 \mathrm{ms} \pm 69.6 \mathrm{μs}\left({\color{gray}-0.276 \mathrm{\%}}\right) $$ Flame Graph

representative_read_entity_type

Function Value Mean Flame graphs
get_entity_type_by_id Account ID: bf5a9ef5-dc3b-43cf-a291-6210c0321eba $$7.96 \mathrm{ms} \pm 58.9 \mathrm{μs}\left({\color{gray}-0.078 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$55.1 \mathrm{ms} \pm 579 \mathrm{μs}\left({\color{gray}0.800 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$106 \mathrm{ms} \pm 684 \mathrm{μs}\left({\color{gray}-0.110 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$62.5 \mathrm{ms} \pm 530 \mathrm{μs}\left({\color{gray}0.335 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$71.2 \mathrm{ms} \pm 510 \mathrm{μs}\left({\color{gray}-0.905 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$79.9 \mathrm{ms} \pm 815 \mathrm{μs}\left({\color{gray}-0.661 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$85.5 \mathrm{ms} \pm 692 \mathrm{μs}\left({\color{gray}-1.095 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$42.2 \mathrm{ms} \pm 247 \mathrm{μs}\left({\color{gray}-0.530 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$70.5 \mathrm{ms} \pm 516 \mathrm{μs}\left({\color{gray}-0.177 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$48.9 \mathrm{ms} \pm 335 \mathrm{μs}\left({\color{gray}-0.309 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$57.7 \mathrm{ms} \pm 381 \mathrm{μs}\left({\color{gray}-0.833 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$60.3 \mathrm{ms} \pm 476 \mathrm{μs}\left({\color{gray}-0.260 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$60.5 \mathrm{ms} \pm 577 \mathrm{μs}\left({\color{gray}-0.271 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$122 \mathrm{ms} \pm 736 \mathrm{μs}\left({\color{gray}2.13 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$134 \mathrm{ms} \pm 767 \mathrm{μs}\left({\color{gray}2.15 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$18.0 \mathrm{ms} \pm 126 \mathrm{μs}\left({\color{gray}0.232 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$526 \mathrm{ms} \pm 1.46 \mathrm{ms}\left({\color{gray}1.09 \mathrm{\%}}\right) $$ Flame Graph

Comment thread libs/@local/graph/type-defs/build.rs
@TimDiekmann
TimDiekmann added this pull request to the merge queue Aug 31, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue because a pull request earlier in the stack was removed Aug 31, 2026
@TimDiekmann
TimDiekmann added this pull request to the merge queue Aug 31, 2026
Base automatically changed from t/sre-983-split-the-effect-dns-hickory-rust-crate-and-typescript to t/sre-982-remove-the-graph-api-packages-javascript-surface August 31, 2026 10:42
Merged via the queue into main with commit d480fa3 Aug 31, 2026
219 checks passed
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-graph area/apps area/deps Relates to third-party dependencies (area) area/infra Relates to version control, CI, CD or IaC (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 type/legal Owned by the @legal team

Development

Successfully merging this pull request may close these issues.

3 participants