Check schema validity after removing unaccessible types - #8439
Open
jdolle wants to merge 1 commit into
Open
Conversation
Collaborator
🚀 Snapshot Release (
|
| Package | Version | Info |
|---|---|---|
@graphql-hive/cli |
0.63.1-alpha-20260904211119-57ac7eec20a6567890baa2d33c4ef0d540c1dc35 |
npm ↗︎ unpkg ↗︎ |
hive |
11.12.2-alpha-20260904211119-57ac7eec20a6567890baa2d33c4ef0d540c1dc35 |
npm ↗︎ unpkg ↗︎ |
Contributor
|
🐋 This PR was built and pushed to the following Docker images: Targets: Platforms: Image Tags: |
dotansimha
reviewed
Sep 6, 2026
|
|
||
| // Marking unreachable types as @inaccessible can produce an invalid supergraph. | ||
| // This verifies that the supergraph generated is valid. | ||
| try { |
Member
There was a problem hiding this comment.
I think the invalid supergraph is a bad artifact we produced? sure, we can return an error, but isn't that a bug that we would need to fix first in composition/contracts?
dotansimha
requested changes
Sep 6, 2026
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.
Background
graphql-hive/router#1487
Description
Our composition also validates the schema, but when we add inaccessible to unreachable types afterwards, it can cause the supergraph to become invalid.
We should determine if a supergraph is valid in the registry so that we don't expose an invalid graph to the gateways.
Checklist