Skip to content

BE-452: Enforce configurable limit for ontology query endpoints#8513

Open
TimDiekmann wants to merge 1 commit intomainfrom
t/be-452-enforce-ontology-query-limit
Open

BE-452: Enforce configurable limit for ontology query endpoints#8513
TimDiekmann wants to merge 1 commit intomainfrom
t/be-452-enforce-ontology-query-limit

Conversation

@TimDiekmann
Copy link
Member

🌟 What is the purpose of this PR?

Extends the query limit enforcement from BE-451 (entities) to all ontology query endpoints: data types, property types, and entity types (including their subgraph variants).

🔗 Related links

🚫 Blocked by

🔍 What does this change?

  • Adds query_ontology_limit to ApiConfig (default 1000, env HASH_GRAPH_QUERY_ONTOLOGY_LIMIT)
  • Enforces the limit in all six ontology query handlers (query_data_types, query_data_type_subgraph, query_property_types, query_property_type_subgraph, query_entity_types, query_entity_type_subgraph)
  • Extracts shared resolve_limit function and LimitExceededError into rest::mod for reuse across entity and ontology handlers
  • Removes EntityQueryOptionsError::LimitExceeded in favor of the shared error type

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

🛡 What tests cover this?

  • Existing ontology query HTTP tests exercise these endpoints. The limit validation uses the same resolve_limit function tested through entity query paths.

❓ How to test this?

  1. Start the graph server
  2. Query any ontology endpoint (/data-types/query, /property-types/query, /entity-types/query) with a limit exceeding 1000
  3. Confirm a 422 response with InvalidArgument status
  4. Query without a limit and confirm results are capped at 1000

@vercel
Copy link

vercel bot commented Mar 6, 2026

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

Project Deployment Actions Updated (UTC)
hash Ready Ready Preview, Comment Mar 12, 2026 7:36pm
petrinaut Ready Ready Preview, Comment Mar 12, 2026 7:36pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
hashdotdesign Ignored Ignored Preview Mar 12, 2026 7:36pm
hashdotdesign-tokens Ignored Ignored Preview Mar 12, 2026 7:36pm

@cursor
Copy link

cursor bot commented Mar 6, 2026

PR Summary

Medium Risk
Adds new limit enforcement to multiple REST query handlers and introduces a new configuration knob; risk is mainly behavior changes (requests may now be rejected/capped) rather than data integrity or security.

Overview
Enforces configurable pagination limits for ontology queries. Adds ApiConfig::query_ontology_limit (env HASH_GRAPH_QUERY_ONTOLOGY_LIMIT) and applies it to data type, property type, and entity type query + subgraph endpoints by normalizing/mutating the deserialized request limit before calling the store.

Centralizes limit validation. Introduces shared resolve_limit + LimitExceededError in rest::mod, and updates entity query option parsing to use this shared error/type instead of a bespoke EntityQueryOptionsError::LimitExceeded. Bench config is updated to include the new query_ontology_limit field.

Written by Cursor Bugbot for commit 25c7b32. This will update automatically on new commits. Configure here.

@github-actions github-actions bot added area/libs Relates to first-party libraries/crates/packages (area) type/eng > backend Owned by the @backend team area/tests New or updated tests labels Mar 6, 2026
@augmentcode
Copy link

augmentcode bot commented Mar 6, 2026

🤖 Augment PR Summary

Summary: This PR extends server-side query-limit enforcement to ontology query endpoints (data types, property types, entity types) to cap result sizes and reject overly large requests.

Changes:

  • Introduces ApiConfig::query_ontology_limit (default 1000; env HASH_GRAPH_QUERY_ONTOLOGY_LIMIT).
  • Enforces the configured limit across all ontology query handlers and their subgraph variants by resolving missing limits to the configured maximum and rejecting requests that exceed it.
  • Extracts a shared resolve_limit helper and LimitExceededError into rest::mod for reuse.
  • Updates entity query option handling to use the shared limit-resolution logic and removes the now-redundant entity-specific limit error variant.
  • Updates manual benchmark configuration to include the new ontology limit field.

Technical Notes: Limit-exceeded errors are surfaced as InvalidArgument by attaching the status code to the error report before converting it to a REST response.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 1 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

@codecov
Copy link

codecov bot commented Mar 6, 2026

Codecov Report

❌ Patch coverage is 0% with 67 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.66%. Comparing base (07c2523) to head (25c7b32).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
libs/@local/graph/api/src/rest/data_type.rs 0.00% 18 Missing ⚠️
libs/@local/graph/api/src/rest/entity_type.rs 0.00% 18 Missing ⚠️
libs/@local/graph/api/src/rest/property_type.rs 0.00% 18 Missing ⚠️
libs/@local/graph/api/src/rest/mod.rs 0.00% 10 Missing ⚠️
.../@local/graph/api/src/rest/entity_query_request.rs 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8513      +/-   ##
==========================================
- Coverage   62.67%   62.66%   -0.02%     
==========================================
  Files        1312     1314       +2     
  Lines      133807   133854      +47     
  Branches     5514     5517       +3     
==========================================
+ Hits        83870    83878       +8     
- Misses      49022    49061      +39     
  Partials      915      915              
Flag Coverage Δ
apps.hash-ai-worker-ts 1.40% <ø> (ø)
apps.hash-api 0.00% <ø> (ø)
local.hash-graph-sdk 9.63% <ø> (+1.89%) ⬆️
local.hash-isomorphic-utils 0.00% <ø> (ø)
rust.hash-graph-api 2.62% <0.00%> (-0.02%) ⬇️

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.

🚀 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.

@TimDiekmann TimDiekmann changed the base branch from t/be-451-enforce-entity-query-limit to graphite-base/8513 March 6, 2026 14:57
@TimDiekmann TimDiekmann changed the base branch from graphite-base/8513 to main March 6, 2026 14:57
Copy link
Member Author

TimDiekmann commented Mar 6, 2026

@TimDiekmann TimDiekmann force-pushed the t/be-452-enforce-ontology-query-limit branch from a48ef0c to e9f9bd6 Compare March 6, 2026 15:00
@github-actions github-actions bot added area/deps Relates to third-party dependencies (area) area/apps > hash* Affects HASH (a `hash-*` app) area/apps area/apps > hash-graph labels Mar 6, 2026
@TimDiekmann TimDiekmann changed the base branch from main to graphite-base/8513 March 6, 2026 15:02
@TimDiekmann TimDiekmann force-pushed the t/be-452-enforce-ontology-query-limit branch from e9f9bd6 to a67dafb Compare March 6, 2026 15:02
@TimDiekmann TimDiekmann changed the base branch from graphite-base/8513 to t/be-451-enforce-entity-query-limit March 6, 2026 15:02
@github-actions github-actions bot removed area/deps Relates to third-party dependencies (area) area/apps > hash* Affects HASH (a `hash-*` app) area/apps area/apps > hash-graph labels Mar 6, 2026
@codspeed-hq
Copy link

codspeed-hq bot commented Mar 6, 2026

Merging this PR will not alter performance

✅ 80 untouched benchmarks


Comparing t/be-452-enforce-ontology-query-limit (e9f9bd6) with t/be-451-enforce-entity-query-limit (cad3334)

Open in CodSpeed

CiaranMn
CiaranMn previously approved these changes Mar 10, 2026
CiaranMn
CiaranMn previously approved these changes Mar 12, 2026
Base automatically changed from t/be-451-enforce-entity-query-limit to main March 12, 2026 19:25
Add `query_ontology_limit` to `ApiConfig` (default 1000, env
`HASH_GRAPH_QUERY_ONTOLOGY_LIMIT`) and enforce it in all six ontology
query handlers: data types, property types, entity types, and their
subgraph variants.

Extract `resolve_limit` and `LimitExceededError` into `rest::mod` for
reuse across entity and ontology handlers. The entity query limit
validation in `EntityQueryOptions::into_params` now delegates to the
shared `resolve_limit` function.
@TimDiekmann TimDiekmann force-pushed the t/be-452-enforce-ontology-query-limit branch from a67dafb to 25c7b32 Compare March 12, 2026 19:26
@github-actions github-actions bot dismissed stale reviews from CiaranMn and CiaranMn March 12, 2026 19:27

Your organization requires reapproval when changes are made, so Graphite has dismissed approvals. See the output of git range-diff at https://github.com/hashintel/hash/actions/runs/23019966380

@graphite-app
Copy link
Contributor

graphite-app bot commented Mar 12, 2026

Merge activity

  • Mar 12, 7:27 PM UTC: Graphite rebased this pull request, because this pull request is set to merge when ready.

@github-actions
Copy link
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 $$28.3 \mathrm{ms} \pm 175 \mathrm{μs}\left({\color{gray}-1.207 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.52 \mathrm{ms} \pm 17.9 \mathrm{μs}\left({\color{gray}-2.039 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1001 $$12.6 \mathrm{ms} \pm 90.4 \mathrm{μs}\left({\color{lightgreen}-8.945 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$44.2 \mathrm{ms} \pm 295 \mathrm{μs}\left({\color{gray}-0.537 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$15.0 \mathrm{ms} \pm 93.1 \mathrm{μs}\left({\color{gray}0.957 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1526 $$25.0 \mathrm{ms} \pm 194 \mathrm{μs}\left({\color{gray}1.96 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$29.1 \mathrm{ms} \pm 176 \mathrm{μs}\left({\color{gray}-0.877 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.83 \mathrm{ms} \pm 19.0 \mathrm{μs}\left({\color{gray}-0.927 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$13.6 \mathrm{ms} \pm 112 \mathrm{μs}\left({\color{lightgreen}-9.006 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.88 \mathrm{ms} \pm 19.1 \mathrm{μs}\left({\color{gray}-1.183 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.07 \mathrm{ms} \pm 11.3 \mathrm{μs}\left({\color{gray}-0.848 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 51 $$3.45 \mathrm{ms} \pm 16.0 \mathrm{μs}\left({\color{gray}-0.691 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$5.32 \mathrm{ms} \pm 27.3 \mathrm{μs}\left({\color{gray}-1.162 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.68 \mathrm{ms} \pm 18.7 \mathrm{μs}\left({\color{gray}0.004 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 107 $$4.26 \mathrm{ms} \pm 20.8 \mathrm{μs}\left({\color{gray}0.456 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.62 \mathrm{ms} \pm 26.2 \mathrm{μs}\left({\color{gray}-0.060 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.53 \mathrm{ms} \pm 18.1 \mathrm{μs}\left({\color{gray}-1.699 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$4.20 \mathrm{ms} \pm 24.2 \mathrm{μs}\left({\color{gray}-0.699 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.82 \mathrm{ms} \pm 15.2 \mathrm{μs}\left({\color{gray}-1.325 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.76 \mathrm{ms} \pm 13.1 \mathrm{μs}\left({\color{gray}-2.342 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1 $$2.88 \mathrm{ms} \pm 14.5 \mathrm{μs}\left({\color{gray}-1.881 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$3.20 \mathrm{ms} \pm 21.1 \mathrm{μs}\left({\color{gray}1.95 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.96 \mathrm{ms} \pm 14.3 \mathrm{μs}\left({\color{gray}0.605 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$3.28 \mathrm{ms} \pm 18.1 \mathrm{μs}\left({\color{gray}0.229 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$3.30 \mathrm{ms} \pm 22.5 \mathrm{μs}\left({\color{gray}3.44 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.98 \mathrm{ms} \pm 17.5 \mathrm{μs}\left({\color{gray}3.78 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 25 $$3.13 \mathrm{ms} \pm 24.6 \mathrm{μs}\left({\color{gray}3.32 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.70 \mathrm{ms} \pm 18.7 \mathrm{μs}\left({\color{gray}1.76 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.22 \mathrm{ms} \pm 15.0 \mathrm{μs}\left({\color{gray}1.51 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 26 $$3.45 \mathrm{ms} \pm 18.9 \mathrm{μs}\left({\color{gray}1.56 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.69 \mathrm{ms} \pm 28.0 \mathrm{μs}\left({\color{gray}4.32 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.25 \mathrm{ms} \pm 19.7 \mathrm{μs}\left({\color{gray}4.79 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.53 \mathrm{ms} \pm 24.9 \mathrm{μs}\left({\color{gray}0.995 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$45.6 \mathrm{ms} \pm 204 \mathrm{μs}\left({\color{gray}-1.683 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$83.3 \mathrm{ms} \pm 447 \mathrm{μs}\left({\color{gray}0.242 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$50.9 \mathrm{ms} \pm 329 \mathrm{μs}\left({\color{gray}0.893 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$52.9 \mathrm{ms} \pm 362 \mathrm{μs}\left({\color{gray}1.01 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$63.1 \mathrm{ms} \pm 334 \mathrm{μs}\left({\color{gray}2.74 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$47.0 \mathrm{ms} \pm 184 \mathrm{μs}\left({\color{gray}-1.000 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$418 \mathrm{ms} \pm 856 \mathrm{μs}\left({\color{gray}-1.670 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$101 \mathrm{ms} \pm 451 \mathrm{μs}\left({\color{gray}0.138 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$91.6 \mathrm{ms} \pm 418 \mathrm{μs}\left({\color{gray}0.340 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$315 \mathrm{ms} \pm 694 \mathrm{μs}\left({\color{gray}-1.786 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$19.5 \mathrm{ms} \pm 94.6 \mathrm{μs}\left({\color{gray}-2.253 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$20.3 \mathrm{ms} \pm 100 \mathrm{μs}\left({\color{gray}-0.361 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$20.1 \mathrm{ms} \pm 91.8 \mathrm{μs}\left({\color{gray}-1.382 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$20.2 \mathrm{ms} \pm 84.3 \mathrm{μs}\left({\color{gray}-2.183 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$24.7 \mathrm{ms} \pm 111 \mathrm{μs}\left({\color{gray}-0.385 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$19.9 \mathrm{ms} \pm 104 \mathrm{μs}\left({\color{gray}-0.921 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$19.8 \mathrm{ms} \pm 97.9 \mathrm{μs}\left({\color{gray}-0.138 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$19.7 \mathrm{ms} \pm 107 \mathrm{μs}\left({\color{gray}0.120 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$20.0 \mathrm{ms} \pm 97.1 \mathrm{μs}\left({\color{gray}-1.019 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$26.8 \mathrm{ms} \pm 237 \mathrm{μs}\left({\color{gray}-1.531 \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 $$34.3 \mathrm{ms} \pm 302 \mathrm{μs}\left({\color{gray}-4.597 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$35.5 \mathrm{ms} \pm 252 \mathrm{μs}\left({\color{gray}-0.673 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$35.5 \mathrm{ms} \pm 293 \mathrm{μs}\left({\color{gray}0.323 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$34.3 \mathrm{ms} \pm 291 \mathrm{μs}\left({\color{gray}-4.419 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$34.9 \mathrm{ms} \pm 326 \mathrm{μs}\left({\color{gray}-1.565 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$35.1 \mathrm{ms} \pm 269 \mathrm{μs}\left({\color{gray}-2.521 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$33.6 \mathrm{ms} \pm 288 \mathrm{μs}\left({\color{gray}-4.941 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$34.1 \mathrm{ms} \pm 306 \mathrm{μs}\left({\color{lightgreen}-7.708 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$34.6 \mathrm{ms} \pm 277 \mathrm{μs}\left({\color{lightgreen}-6.434 \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 $$8.63 \mathrm{ms} \pm 58.0 \mathrm{μs}\left({\color{gray}-2.955 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$93.0 \mathrm{ms} \pm 477 \mathrm{μs}\left({\color{lightgreen}-7.196 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$144 \mathrm{ms} \pm 447 \mathrm{μs}\left({\color{gray}-3.253 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$99.3 \mathrm{ms} \pm 417 \mathrm{μs}\left({\color{lightgreen}-7.334 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$108 \mathrm{ms} \pm 503 \mathrm{μs}\left({\color{lightgreen}-6.608 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$117 \mathrm{ms} \pm 450 \mathrm{μs}\left({\color{lightgreen}-5.099 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$124 \mathrm{ms} \pm 501 \mathrm{μs}\left({\color{gray}-4.946 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$101 \mathrm{ms} \pm 491 \mathrm{μs}\left({\color{gray}-2.628 \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 $$129 \mathrm{ms} \pm 529 \mathrm{μs}\left({\color{gray}-2.889 \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 $$109 \mathrm{ms} \pm 552 \mathrm{μs}\left({\color{gray}-0.133 \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 $$117 \mathrm{ms} \pm 451 \mathrm{μs}\left({\color{gray}-0.809 \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 $$119 \mathrm{ms} \pm 478 \mathrm{μs}\left({\color{gray}0.036 \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 $$119 \mathrm{ms} \pm 493 \mathrm{μs}\left({\color{gray}-2.352 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$134 \mathrm{ms} \pm 565 \mathrm{μs}\left({\color{gray}0.813 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$144 \mathrm{ms} \pm 551 \mathrm{μs}\left({\color{gray}1.89 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$104 \mathrm{ms} \pm 447 \mathrm{μs}\left({\color{gray}-0.962 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$570 \mathrm{ms} \pm 3.01 \mathrm{ms}\left({\color{gray}4.71 \mathrm{\%}}\right) $$ Flame Graph

@TimDiekmann TimDiekmann enabled auto-merge March 13, 2026 02:10
@TimDiekmann TimDiekmann requested a review from CiaranMn March 13, 2026 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/libs Relates to first-party libraries/crates/packages (area) 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