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
Account
is shared across many services.Account.id
is resolved in a local resolver that is stitched into the main schema.And two of our subschemas have
Account
merge arguments with avaluesFromResults
function that looks like this:The reason for this
valuesFromResults
is that some services may respond with fewerAccount
objects than requested. In@graphql-tools/[email protected]
, this function worked for us. But with the upgrade to10.0.5
this function no longer works becauseresults
does not have anid
field.I believe
id
is removed in this line:graphql-tools/packages/delegate/src/prepareGatewayDocument.ts
Line 270 in 66c99d9
id
is already available.Are we doing something unconventional here, or should
id
remain a part of theresults
objects?Beta Was this translation helpful? Give feedback.
All reactions