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

Unnamed fields in schema results in broken generated Swift code #2753

Closed
neakor opened this issue Jan 5, 2023 · 1 comment · Fixed by #2769
Closed

Unnamed fields in schema results in broken generated Swift code #2753

neakor opened this issue Jan 5, 2023 · 1 comment · Fixed by #2769
Assignees
Labels
bug Generally incorrect behavior codegen Issues related to or arising from code generation planned-next Slated to be included in the next release

Comments

@neakor
Copy link

neakor commented Jan 5, 2023

Summary

In a schema with unnamed fields such as:

input MyInput {
  _: Boolean
}

the resulting generated code is broken as:

__data = InputDict([
  "_": _
])

public var _: GraphQLNullable<Bool> {
  get { __data["_"] }
  set { __data["_"] = newValue }
}

Version

1.0.5

Steps to reproduce the behavior

  1. Create a schema with an unnamed field.
  2. Run CLI to generate code.
  3. Observe the generated Swift code does not compile.

Logs

No response

Anything else?

No response

@neakor neakor added bug Generally incorrect behavior needs investigation labels Jan 5, 2023
@calvincestari calvincestari self-assigned this Jan 6, 2023
@calvincestari calvincestari added codegen Issues related to or arising from code generation planned-next Slated to be included in the next release and removed needs investigation labels Jan 6, 2023
@calvincestari calvincestari added this to the Patch Releases (1.0.x) milestone Jan 6, 2023
@calvincestari
Copy link
Member

Thanks for the bug report @neakor, we'll get this fixed in an upcoming patch release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Generally incorrect behavior codegen Issues related to or arising from code generation planned-next Slated to be included in the next release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants