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

Generating appropriate default values for __typename; #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LeffelMania
Copy link
Member

Addresses #2 and #3 - generates default __typename literals reflecting the type name from the schema.

@LeffelMania
Copy link
Member Author

Based on running this in Remind, this actually doesn't work I guess, specifically for Union types. For a union type including SomeType, we generate a struct called AsSomeType, but that's not the type name in the schema. Will have to dig a little deeper on that.

@@ -60,7 +60,7 @@ public func codeGen(configuration: Configuration) throws {

\(optionalInputValueCode)

\(variableInputParamterCode)
\(variableInputParamterCode)\n
"""
Copy link
Member

Choose a reason for hiding this comment

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

since this is a multi-line literal, can simply add a real newline and it should work. also noticing variableInputParamterCode is spelled wrong 😬

Copy link
Member

Choose a reason for hiding this comment

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

#8

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.

2 participants