Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(codegen): abstract effect not propagated to union siblings #2493

Merged
merged 3 commits into from
Dec 21, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fmt
i10416 committed Dec 21, 2024
commit c8879a90fa4a29f7dae04282dfa2d3ed382f64ab
4 changes: 2 additions & 2 deletions tools/src/main/scala/caliban/tools/SchemaWriter.scala
Original file line number Diff line number Diff line change
@@ -92,10 +92,10 @@ object SchemaWriter {
def isAbstractEffectful(typedef: ObjectTypeDefinition): Boolean =
isEffectTypeAbstract && isEffectful(typedef)

def isEffectful(typedef: ObjectTypeDefinition): Boolean =
def isEffectful(typedef: ObjectTypeDefinition): Boolean =
isLocalEffectful(typedef) || isNestedEffectful(typedef)

def isUnionSiblingAbstractEffectful(typedef: ObjectTypeDefinition): Boolean =
def isUnionSiblingAbstractEffectful(typedef: ObjectTypeDefinition): Boolean =
schema.unionTypeDefinitions
.exists(union =>
union.memberTypes.contains(typedef.name) &&