Skip to content

Conversation

@enisdenjo
Copy link
Member

@enisdenjo enisdenjo commented Oct 26, 2025

Ref ROUTER-191
Related graphql-hive/gateway#1629

Distributed as a npm package on @graphql-hive/router-query-planner using NAPI-RS.

Manually released under @graphql-hive/router-query-planner on npm.

See node addon readme.

TODO

  • Test node-addon
  • Build node-addon for all platforms Hive Router supports
  • Release node-addon on npm in CI

@github-actions
Copy link

github-actions bot commented Oct 26, 2025

k6-benchmark results

     ✓ response code was 200
     ✓ no graphql errors
     ✓ valid response structure

     █ setup

     checks.........................: 100.00% ✓ 211050      ✗ 0    
     data_received..................: 6.2 GB  205 MB/s
     data_sent......................: 83 MB   2.7 MB/s
     http_req_blocked...............: avg=3.56µs   min=701ns   med=1.74µs  max=4.81ms   p(90)=2.43µs  p(95)=2.77µs  
     http_req_connecting............: avg=917ns    min=0s      med=0s      max=2.74ms   p(90)=0s      p(95)=0s      
     http_req_duration..............: avg=20.87ms  min=2.22ms  med=19.89ms max=172.6ms  p(90)=28.52ms p(95)=31.72ms 
       { expected_response:true }...: avg=20.87ms  min=2.22ms  med=19.89ms max=172.6ms  p(90)=28.52ms p(95)=31.72ms 
     http_req_failed................: 0.00%   ✓ 0           ✗ 70370
     http_req_receiving.............: avg=158.22µs min=25.09µs med=39.24µs max=131.11ms p(90)=84.96µs p(95)=389.06µs
     http_req_sending...............: avg=23.57µs  min=5.37µs  med=10.52µs max=22.39ms  p(90)=15.1µs  p(95)=26.52µs 
     http_req_tls_handshaking.......: avg=0s       min=0s      med=0s      max=0s       p(90)=0s      p(95)=0s      
     http_req_waiting...............: avg=20.69ms  min=2.17ms  med=19.77ms max=60.44ms  p(90)=28.25ms p(95)=31.38ms 
     http_reqs......................: 70370   2340.354417/s
     iteration_duration.............: avg=21.31ms  min=5.73ms  med=20.24ms max=258.97ms p(90)=28.99ms p(95)=32.23ms 
     iterations.....................: 70350   2339.68926/s
     vus............................: 50      min=50        max=50 
     vus_max........................: 50      min=50        max=50 

@github-actions
Copy link

🐋 This PR was built and pushed to the following Docker images:

Image Names: ghcr.io/graphql-hive/router

Platforms: linux/amd64,linux/arm64

Image Tags: ghcr.io/graphql-hive/router:pr-527 ghcr.io/graphql-hive/router:sha-eb47e55

Docker metadata
{
"buildx.build.ref": "builder-a3beb108-e445-4cc5-a20f-f8d3d8706115/builder-a3beb108-e445-4cc5-a20f-f8d3d87061150/5po8t4dzjz718dtby73lfc641",
"containerimage.descriptor": {
  "mediaType": "application/vnd.oci.image.index.v1+json",
  "digest": "sha256:7132049d8cc18badc51f2e4e76eb8ee72096a5a7fb3bbd965ef53d9608936e09",
  "size": 1609
},
"containerimage.digest": "sha256:7132049d8cc18badc51f2e4e76eb8ee72096a5a7fb3bbd965ef53d9608936e09",
"image.name": "ghcr.io/graphql-hive/router:pr-527,ghcr.io/graphql-hive/router:sha-eb47e55"
}

@github-actions
Copy link

github-actions bot commented Nov 5, 2025

🐋 This PR was built and pushed to the following Docker images:

Image Names: ghcr.io/graphql-hive/router

Platforms: linux/amd64,linux/arm64

Image Tags: ghcr.io/graphql-hive/router:pr-527 ghcr.io/graphql-hive/router:sha-0d40e0b

Docker metadata
{
"buildx.build.ref": "builder-0660cebc-f6ec-4444-86b8-e6a12a864bae/builder-0660cebc-f6ec-4444-86b8-e6a12a864bae0/1i5hriialh6w4e9i2q2ryzquo",
"containerimage.descriptor": {
  "mediaType": "application/vnd.oci.image.index.v1+json",
  "digest": "sha256:26126dddc90d5b9e5016167cbe8a11fbf4a7e290a56b07e1c973d5e1d09a9d39",
  "size": 1609
},
"containerimage.digest": "sha256:26126dddc90d5b9e5016167cbe8a11fbf4a7e290a56b07e1c973d5e1d09a9d39",
"image.name": "ghcr.io/graphql-hive/router:pr-527,ghcr.io/graphql-hive/router:sha-0d40e0b"
}

@enisdenjo enisdenjo marked this pull request as ready for review November 5, 2025 13:18
@enisdenjo enisdenjo requested review from ardatan, dotansimha and kamilkisiela and removed request for dotansimha November 5, 2025 13:19
napi::Error::from_reason(format!("Failed to create query planner: {}", err))
})?;

let consumer_schema = planner.consumer_schema.document.to_string();
Copy link
Member

Choose a reason for hiding this comment

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

I think we don't use this, do we?

Copy link
Member Author

Choose a reason for hiding this comment

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

We don't, I was experimenting and left the consumer schema here. Could be useful for others.

@enisdenjo enisdenjo merged commit 454eff2 into main Nov 5, 2025
20 checks passed
@enisdenjo enisdenjo deleted the napi branch November 5, 2025 16:23
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.

2 participants