Skip to content
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

fix(stitch): handle nested dependencies in computed fields #6180

Merged
merged 1 commit into from
May 15, 2024

Conversation

ardatan
Copy link
Owner

@ardatan ardatan commented May 14, 2024

Handle nested dependencies in the computed fields

{
  merge: {
    Product: {
      selectionSet: '{ id }',
      fields: {
        isExpensive: {
          selectionSet: '{ price }',
          computed: true,
        },
        canAfford: {
          selectionSet: '{ isExpensive }',
          computed: true,
        },
      }
    }
  }
}

@ardatan ardatan requested a review from yaacovCR May 14, 2024 13:13
Copy link

changeset-bot bot commented May 14, 2024

🦋 Changeset detected

Latest commit: d99a083

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

This PR includes changesets to release 2 packages
Name Type
@graphql-tools/stitch Patch
federation-benchmark 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

@ardatan ardatan requested review from enisdenjo, EmrysMyrddin and gilgardosh and removed request for yaacovCR May 14, 2024 13:13
Copy link
Contributor

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
@graphql-tools/stitch 9.2.9-alpha-20240514131506-d99a083d94101651043d49cb169e8439eb6722ed npm ↗︎ unpkg ↗︎

Copy link
Contributor

✅ Benchmark Results

     ✓ no_errors
     ✓ expected_result

     checks.........................: 100.00% ✓ 338       ✗ 0  
     data_received..................: 39 MB   3.9 MB/s
     data_sent......................: 145 kB  14 kB/s
     http_req_blocked...............: avg=4.12µs   min=2.06µs   med=2.65µs   max=204.27µs p(90)=3.76µs   p(95)=3.96µs  
     http_req_connecting............: avg=893ns    min=0s       med=0s       max=151.08µs p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=55.18ms  min=46.65ms  med=51.39ms  max=153.77ms p(90)=63.57ms  p(95)=87.92ms 
       { expected_response:true }...: avg=55.18ms  min=46.65ms  med=51.39ms  max=153.77ms p(90)=63.57ms  p(95)=87.92ms 
     http_req_failed................: 0.00%   ✓ 0         ✗ 169
     http_req_receiving.............: avg=131.52µs min=104.26µs med=126.18µs max=409.18µs p(90)=144.96µs p(95)=155.04µs
     http_req_sending...............: avg=24.69µs  min=19.44µs  med=23.34µs  max=63.73µs  p(90)=29.26µs  p(95)=33.97µs 
     http_req_tls_handshaking.......: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=55.02ms  min=46.5ms   med=51.24ms  max=153.4ms  p(90)=63.42ms  p(95)=87.76ms 
     http_reqs......................: 169     16.868586/s
     iteration_duration.............: avg=59.26ms  min=50.03ms  med=55.38ms  max=159.01ms p(90)=67.05ms  p(95)=91.55ms 
     iterations.....................: 169     16.868586/s
     vus............................: 1       min=1       max=1
     vus_max........................: 1       min=1       max=1

Copy link
Contributor

💻 Website Preview

The latest changes are available as preview in: https://dd6bd928.graphql-tools.pages.dev

@ardatan ardatan merged commit eec9d3d into master May 15, 2024
30 checks passed
@ardatan ardatan deleted the nested-requires branch May 15, 2024 12:20
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.

None yet

2 participants