n1ru4l / envelop

Envelop is a lightweight library allowing developers to easily develop, share, collaborate and extend their GraphQL execution layer. Envelop is the missing GraphQL plugin system.
https://envelop.dev
MIT License
788 stars 128 forks source link

fix: add type annotations for function and make it typesafe #2310

Closed n1ru4l closed 1 month ago

changeset-bot[bot] commented 1 month ago

🦋 Changeset detected

Latest commit: e10dadc9d5dd8c669beefec15cd552f5b62a8558

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ----------------------- | ----- | | @envelop/response-cache | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

github-actions[bot] commented 1 month ago
### 💻 Website Preview The latest changes are available as preview in: [https://f3672996.envelop.pages.dev](https://f3672996.envelop.pages.dev)
github-actions[bot] commented 1 month ago

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets): Package Version Info
@envelop/immediate-introspection 4.0.0-alpha-20241009110811-e10dadc9d5dd8c669beefec15cd552f5b62a8558 npm ↗︎ unpkg ↗︎
@envelop/response-cache 6.2.2-alpha-20241009110811-e10dadc9d5dd8c669beefec15cd552f5b62a8558 npm ↗︎ unpkg ↗︎
@envelop/sentry 10.0.0-alpha-20241009110811-e10dadc9d5dd8c669beefec15cd552f5b62a8558 npm ↗︎ unpkg ↗︎
theguild-bot commented 1 month ago

✅ Benchmark Results

     ✓ no_errors
     ✓ expected_result

     checks.............................................: 100.00% ✓ 774206      ✗ 0     
     ✓ { mode:envelop-cache-and-no-internal-tracing }...: 100.00% ✓ 165460      ✗ 0     
     ✓ { mode:envelop-cache-jit }.......................: 100.00% ✓ 340934      ✗ 0     
     ✓ { mode:envelop-just-cache }......................: 100.00% ✓ 165210      ✗ 0     
     ✓ { mode:graphql-js }..............................: 100.00% ✓ 102602      ✗ 0     
     data_received......................................: 3.0 GB  25 MB/s
     data_sent..........................................: 168 MB  1.4 MB/s
     envelop_init.......................................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:envelop-cache-jit }.......................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:envelop-just-cache }......................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:graphql-js }..............................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     envelop_total......................................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:envelop-cache-jit }.......................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:envelop-just-cache }......................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:graphql-js }..............................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     event_loop_lag.....................................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:envelop-cache-and-no-internal-tracing }...: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:envelop-cache-jit }.......................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:envelop-just-cache }......................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:graphql-js }..............................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     graphql_context....................................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:envelop-cache-jit }.......................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:envelop-just-cache }......................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:graphql-js }..............................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     graphql_execute....................................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:envelop-cache-jit }.......................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:envelop-just-cache }......................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:graphql-js }..............................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     graphql_parse......................................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:envelop-cache-jit }.......................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:envelop-just-cache }......................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:graphql-js }..............................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     graphql_validate...................................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:envelop-cache-jit }.......................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:envelop-just-cache }......................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:graphql-js }..............................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     http_req_blocked...................................: avg=2.77µs  min=1.16µs   med=2.56µs  max=3.97ms  p(90)=3.29µs  p(95)=3.68µs 
     http_req_connecting................................: avg=22ns    min=0s       med=0s      max=1.5ms   p(90)=0s      p(95)=0s     
     http_req_duration..................................: avg=2.82ms  min=157.25µs med=2.79ms  max=39.1ms  p(90)=5.11ms  p(95)=6.06ms 
       { expected_response:true }.......................: avg=2.82ms  min=157.25µs med=2.79ms  max=39.1ms  p(90)=5.11ms  p(95)=6.06ms 
     ✓ { mode:envelop-cache-and-no-internal-tracing }...: avg=3.36ms  min=416.3µs  med=3.01ms  max=16.25ms p(90)=5.69ms  p(95)=6.19ms 
     ✓ { mode:envelop-cache-jit }.......................: avg=1.46ms  min=157.25µs med=1.21ms  max=16.63ms p(90)=2.46ms  p(95)=2.6ms  
     ✓ { mode:envelop-just-cache }......................: avg=3.36ms  min=412.14µs med=3ms     max=28.02ms p(90)=5.67ms  p(95)=6.16ms 
     ✓ { mode:graphql-js }..............................: avg=5.58ms  min=726.01µs med=4.83ms  max=39.1ms  p(90)=9.34ms  p(95)=10.1ms 
     http_req_failed....................................: 0.00%   ✓ 0           ✗ 387103
     http_req_receiving.................................: avg=34.99µs min=11.95µs  med=30.51µs max=11.89ms p(90)=46.37µs p(95)=50.05µs
     http_req_sending...................................: avg=12.75µs min=4.33µs   med=10.39µs max=15.59ms p(90)=19.66µs p(95)=20.9µs 
     http_req_tls_handshaking...........................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     http_req_waiting...................................: avg=2.77ms  min=131.2µs  med=2.74ms  max=39.02ms p(90)=5.05ms  p(95)=6ms    
     http_reqs..........................................: 387103  3225.750995/s
     iteration_duration.................................: avg=3.09ms  min=344.43µs med=3.03ms  max=39.75ms p(90)=5.39ms  p(95)=6.32ms 
     iterations.........................................: 387103  3225.750995/s
     vus................................................: 10      min=10        max=10  
     vus_max............................................: 20      min=20        max=20