8000 Generate sum types for @oneOf inputs by rpiaggio · Pull Request #739 · gemini-hlsw/clue · GitHub
[go: up one dir, main page]

Skip to content

Generate sum types for @oneOf inputs - #739

Merged
rpiaggio merged 5 commits into
mainfrom
oneOf-input
Dec 2, 2025
Merged

rpiaggio merged 5 commits into
mainfrom
oneOf-input

Conversation

@rpiaggio
@rpiaggio rpiaggio commented Dec 1, 2025
Copy link
Copy Markdown
Collaborator

Also:

  • Generate Prisms for all sum types
  • Generate Iso instead of Lens for classes with only one argument

@rpiaggio
rpiaggio marked this pull request as ready for review December 1, 2025 23:31
@cquiroz cquiroz left a comment
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@rpiaggio
rpiaggio merged commit c244ab5 into main Dec 2, 2025
12 checks passed
@rpiaggio
rpiaggio deleted the oneOf-input branch December 2, 2025 14:33
)
)
.collect[Class] { case InputObjectType(name, _, fields, directives) =>
if (directives.exists(_.name == "oneOf")) buildInputSumType(name, fields)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Minor thing, but InputObjectType also has a isOneOf def

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Missed that, thank you!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0