Skip to content

Allow field visibility transformation to remove interface relationships - #4419

Merged
andimarek merged 2 commits into
masterfrom
codex/interface-relationship-visibility
Jul 21, 2026
Merged

Allow field visibility transformation to remove interface relationships#4419
andimarek merged 2 commits into
masterfrom
codex/interface-relationship-visibility

Conversation

@andimarek

@andimarek andimarek commented Jul 21, 2026

Copy link
Copy Markdown
Member

Summary

  • add a dedicated predicate and environment for controlling individual interface implementation relationships
  • apply field and relationship visibility in the same schema transformation so related removals are validated atomically
  • preserve existing constructor behavior by retaining all interface relationships unless the new predicate is supplied
  • retain the existing reachability cleanup and fail schema construction for invalid transitive interface removals
  • mark graphql.schema.transform as @NullMarked and enforce package-level JSpecify annotations in the architecture test

Testing

  • ./gradlew test --tests graphql.schema.transform.FieldVisibilitySchemaTransformationInterfaceImplementationTest
  • ./gradlew test --tests graphql.schema.transform.FieldVisibilitySchemaTransformationTest
  • ./gradlew test --tests graphql.archunit.JSpecifyAnnotationsCheck --tests graphql.schema.transform.FieldVisibilitySchemaTransformationInterfaceImplementationTest --tests graphql.schema.transform.FieldVisibilitySchemaTransformationTest (63 tests)
  • ./gradlew test (5,700 tests)
  • ./gradlew jacocoTestReport
  • ./gradlew javadoc --info --stacktrace

The changed transformer and relationship-removal visitor have 100% line, branch, and method coverage.

@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Test Report

Test Results

Java Version Total Passed Failed Errors Skipped
Java 11 5890 (+9 🟢) 5834 (+9 🟢) 0 (±0) 0 (±0) 56 (±0)
Java 17 5890 (+9 🟢) 5833 (+9 🟢) 0 (±0) 0 (±0) 57 (±0)
Java 21 5890 (+9 🟢) 5833 (+9 🟢) 0 (±0) 0 (±0) 57 (±0)
Java 25 5890 (+9 🟢) 5833 (+9 🟢) 0 (±0) 0 (±0) 57 (±0)
jcstress 32 (±0) 32 (±0) 0 (±0) 0 (±0) 0 (±0)
Total 23592 (+36 🟢) 23365 (+36 🟢) 0 (±0) 0 (±0) 227 (±0)

Code Coverage (Java 25)

Metric Covered Missed Coverage vs Master
Lines 29713 3128 90.5% ±0.0%
Branches 8740 1532 85.1% ±0.0%
Methods 7935 1208 86.8% ±0.0%

Changed Class Coverage (4 classes)

Class Line Branch Method
g.s.GraphQLInterfaceType
$Builder
+1.4% 🟢 ±0.0% +3.8% 🟢
g.s.t.FieldVisibilitySchemaTransformation
$ElementRemovalVisitor
+100.0% 🟢 +100.0% 🟢 +100.0% 🟢
g.s.t.FieldVisibilitySchemaTransformation
$FieldRemovalVisitor
removed removed removed
g.s.t.VisibleInterfaceImplementationPredicateEnvironmentImpl +100.0% 🟢 ±0.0% +100.0% 🟢

Full HTML report: build artifact jacoco-html-report

Updated: 2026-07-21 22:56:16 UTC

@andimarek
andimarek merged commit 6046d9e into master Jul 21, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant