test(strawberry-shake): regression guard for inheritance codegen (#5593)#15
Open
cliedeman wants to merge 1 commit into
Open
test(strawberry-shake): regression guard for inheritance codegen (#5593)#15cliedeman wants to merge 1 commit into
cliedeman wants to merge 1 commit into
Conversation
…e base Adds a regression guard for the scenario in ChilliCream#5593, where two object types sharing a common interface base (Exercise and Survey both implementing Activity) made StrawberryShake v13 emit a duplicate base class and fail with "base class already defined" / HC0065. The scenario was verified against the issue's schema shape and generates correctly on the current type-system pipeline, so this locks in the now-correct behavior rather than fixing a live defect. Two operation shapes are covered: the interface selected directly as a list, and via a connection `nodes` field, each with inline fragments on both implementations.
10 tasks
cliedeman
force-pushed
the
fix/ss-inheritance-base-class-already-defined
branch
from
June 27, 2026 14:34
0e8d53d to
0efcb6c
Compare
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.
Summary
Relates to ChilliCream#5593 ("StrawberryShake v13 not generating source for schema with inheritance"). The issue reported that when two object types share a common interface base (the reporter's
ExerciseandSurveyboth implementingActivity), the v13 generator emitted a duplicate base class and failed witherror HC0065: The name 'Activity' was already registered/ "base class already defined".Verified: this no longer reproduces on the current
main. The shared-interface scenario now generates correct C# (one shared base interface, each implementation deriving it exactly once) and compiles. Rather than a fix for a live defect, this PR adds a regression guard that locks in the now-correct behavior.What was checked
Query/Mutation/Subscriptionbodies, theApplyPolicyenum,StringOperationFilterInput, andPageInfo). After filling in only those omissions, without altering theActivity/Exercise/Surveyshapes, all operation variants generated cleanly. The only failures encountered were unrelated missing-type errors from the incomplete gist, never the inheritance duplicate-base defect.HC0065, no non-compiling output.Tests
New
InheritanceGeneratorTestscovering the issue's shape viaGeneratorTestHelper.AssertResult(which Roslyn-compiles the generated output), with two operation variants:[Activity!]!) with inline fragments on both implementationsnodesfieldBoth pass across all target frameworks. Surrounding generator test classes (
EntityGeneratorTests,ResultTypeGeneratorTests,StarWarsGeneratorTests) remain green (124 passed, 0 failed).— Claude
🤖 Generated with Claude Code