-
Notifications
You must be signed in to change notification settings - Fork 257
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
__resolveReference
follow-ups
#1757
Conversation
✅ Deploy Preview for apollo-federation-docs canceled.
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
}, | ||
}; | ||
} else if (fieldName.startsWith("__")) { | ||
(type as any)[fieldName.substring(2)] = fieldConfig; | ||
continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to reviewer: I restored this continue
in the resolveReference
case, which previously existed here: https://github.com/apollographql/federation/pull/1746/files#diff-89b6c52a33464884610c771bf9c04484fc8acf56fb57fd9a31b168dd55595530R181
Bit tough to see with the diff. No effect on tests with or without.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch — sorry for missing that in the last review. I guess technically a no-op since fieldMap['__resolveReference']
shouldn't be truthy.
}, | ||
}; | ||
} else if (fieldName.startsWith("__")) { | ||
(type as any)[fieldName.substring(2)] = fieldConfig; | ||
continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch — sorry for missing that in the last review. I guess technically a no-op since fieldMap['__resolveReference']
shouldn't be truthy.
* Support __isTypeOf * Reference src instead of dist aross packages
Addressing feedback from #1746
The vague
"__"
is unhelpful here. We're not expecting a bunch of things to be prefixed with__
(it violates the spec to do so, albeit a useful hack in the past https://spec.graphql.org/October2021/#sec-Objects.Type-Validation).__resolveReference
and__resolveType
)schema-helper
(which is only needed for gateway's test code, not runtime)