fix: do not add inaccessible directive on federation built-in types#295
Merged
fix: do not add inaccessible directive on federation built-in types#295
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the addInaccessibleToUnreachableTypes function to include ContextArgument and FieldValue from the join specification in the list of types that should not be marked as inaccessible. A new test case has been added to verify this change, although it contains a minor typo in its description where 'ContextArgument' is repeated.
Contributor
kamilkisiela
approved these changes
Apr 10, 2026
n1ru4l
pushed a commit
that referenced
this pull request
Apr 10, 2026
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @theguild/federation-composition@0.22.2 ### Patch Changes - [#295](#295) [`fffe987`](fffe987) Thanks [@n1ru4l](https://github.com/n1ru4l)! - Fix schema contract composition applying `@inaccessible` on the federation types `ContextArgument` and `FieldValue` on the supergraph SDL. This mitigates the following error in apollo-router upon processing the supergraph: could not create router: Api error(s): The supergraph schema failed to produce a valid API schema: The following errors occurred: - Core feature type `join__ContextArgument` cannot use @inaccessible. - Core feature type `join__FieldValue` cannot use @inaccessible. Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ix schema contract composition applying
@inaccessibleon the federation typesContextArgumentandFieldValueon the supergraph SDL.This mitigates the following error in apollo-router upon processing the supergraph: