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

Isolate computed fields return objects only if not referenced from other, non-isolated, objects #6543

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

enisdenjo
Copy link
Collaborator

@enisdenjo enisdenjo commented Sep 26, 2024

When isolating the User.requiresField from the following schema

scalar _Any

union _Entity = User

type Query {
  someResolver: SomeTypeWithDisappearingField
  _entities(representations: [_Any!]!): _Entity
}

type SomeRequiredType {
  id: String
}

type SomeTypeWithDisappearingField {
  otherField: String
  disappearingField: SomeRequiredType
}

type User {
  id: ID!
  requiresField: SomeRequiredType
}

the SomeRequiredType should not be isolated because it is referenced from another, non-isolated, object SomeTypeWithDisappearingField.

TODO

  • Why is isolateComputedFieldsTransformer > with composite return type > return type is unmerged type failing?

Copy link

changeset-bot bot commented Sep 26, 2024

🦋 Changeset detected

Latest commit: 71773b3

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

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

Copy link
Contributor

github-actions bot commented Sep 26, 2024

✅ Benchmark Results

     ✓ no_errors
     ✓ expected_result

     checks.........................: 100.00% ✓ 314       ✗ 0  
     data_received..................: 37 MB   3.6 MB/s
     data_sent......................: 134 kB  13 kB/s
     http_req_blocked...............: avg=4.69µs   min=2.32µs   med=3.14µs   max=224.92µs p(90)=4.14µs   p(95)=4.47µs  
     http_req_connecting............: avg=918ns    min=0s       med=0s       max=144.19µs p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=59.22ms  min=49.42ms  med=55.68ms  max=177.76ms p(90)=63.87ms  p(95)=91.36ms 
       { expected_response:true }...: avg=59.22ms  min=49.42ms  med=55.68ms  max=177.76ms p(90)=63.87ms  p(95)=91.36ms 
     http_req_failed................: 0.00%   ✓ 0         ✗ 157
     http_req_receiving.............: avg=132.45µs min=104.82µs med=128.44µs max=224.62µs p(90)=149.41µs p(95)=159.51µs
     http_req_sending...............: avg=25.48µs  min=20.51µs  med=24.48µs  max=109.49µs p(90)=29.04µs  p(95)=30.06µs 
     http_req_tls_handshaking.......: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=59.06ms  min=49.26ms  med=55.54ms  max=177.43ms p(90)=63.72ms  p(95)=91.21ms 
     http_reqs......................: 157     15.635571/s
     iteration_duration.............: avg=63.93ms  min=54.14ms  med=60.5ms   max=182.03ms p(90)=69.98ms  p(95)=96.15ms 
     iterations.....................: 157     15.635571/s
     vus............................: 1       min=1       max=1
     vus_max........................: 1       min=1       max=1

@theguild-bot
Copy link
Collaborator

theguild-bot commented Sep 26, 2024

🚀 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/federation 2.2.11-alpha-20241001170715-71773b38b5fe7e2b79e03e2e1fbb405d85fe1abf npm ↗︎ unpkg ↗︎
@graphql-tools/stitch 9.2.11-alpha-20241001170715-71773b38b5fe7e2b79e03e2e1fbb405d85fe1abf npm ↗︎ unpkg ↗︎

Copy link
Contributor

github-actions bot commented Sep 26, 2024

💻 Website Preview

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

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