Skip to content

Check schema validity after removing unaccessible types - #8439

Open
jdolle wants to merge 1 commit into
mainfrom
inaccessible-supergraph-validity
Open

Check schema validity after removing unaccessible types#8439
jdolle wants to merge 1 commit into
mainfrom
inaccessible-supergraph-validity

Conversation

@jdolle

@jdolle jdolle commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

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

  • Error handling and logging
  • Testing

@jdolle
jdolle requested review from dotansimha and n1ru4l September 4, 2026 21:10
@jdolle jdolle self-assigned this Sep 4, 2026
@theguild-bot

Copy link
Copy Markdown
Collaborator

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
@graphql-hive/cli 0.63.1-alpha-20260904211119-57ac7eec20a6567890baa2d33c4ef0d540c1dc35 npm ↗︎ unpkg ↗︎
hive 11.12.2-alpha-20260904211119-57ac7eec20a6567890baa2d33c4ef0d540c1dc35 npm ↗︎ unpkg ↗︎

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🐋 This PR was built and pushed to the following Docker images:

Targets: build

Platforms: linux/amd64

Image Tags: 11.12.2-alpha-57ac7ee, 57ac7ee, 57ac7eec20a6567890baa2d33c4ef0d540c1dc35


// Marking unreachable types as @inaccessible can produce an invalid supergraph.
// This verifies that the supergraph generated is valid.
try {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants