delegate with valuesFromResults missing id
#6382
Unanswered
cassiascheffer
asked this question in
Q&A
Replies: 1 comment
-
|
@ardatan Here is a PR with a failing test where For additional context, our project is on the following versions: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, we noticed that this PR broke how we use
valuesFromResults: #6134We have a stitched schema that merges a few types. The type
Accountis shared across many services.Account.idis resolved in a local resolver that is stitched into the main schema.And two of our subschemas have
Accountmerge arguments with avaluesFromResultsfunction that looks like this:The reason for this
valuesFromResultsis that some services may respond with fewerAccountobjects than requested. In@graphql-tools/[email protected], this function worked for us. But with the upgrade to10.0.5this function no longer works becauseresultsdoes not have anidfield.I believe
idis removed in this line:graphql-tools/packages/delegate/src/prepareGatewayDocument.ts
Line 270 in 66c99d9
idis already available.Are we doing something unconventional here, or should
idremain a part of theresultsobjects?Beta Was this translation helpful? Give feedback.
All reactions