Hi, enum is declared like this:

and generated code throws these errors:

It looks like there is problem with INIT case when using enum.
apollo-ios SDK version: 0.34.1Generate code with init in enum case.
Is it problem on my side or bug in apollo codegen. Any possible fixes?
Thanks.
It's the codegen - it's not properly escaping the case named init, which is a reserved Swift keyword. Upcoming codegen should handle this better but it's gonna be a bit - is this schema already public or is it still being evolved?
Schema is partially public but I think there is not chance that there will be some changes. Anyway if I change .init to .init on lines where error is triggered, it disappears. But of course on next build code is regenerated. So I think this should be fixed in codegen.
Yeah, absolutely - fixing the current codegen is a pain (which is why it's being rewritten) so I was trying to make sure it was necessary before diving into it. 馃檭
Thank you 馃憤 it is not necessary for me, I think i can handle it somehow (use temporary script to rename all .init cases to ".init")
You'd need to make it
`.init`
rather than ".init", but if you're ok with that, I'm very OK with not diving into typsecript hell 馃槆. If that's cool with you, mind if we close this one out?
Yes closed. We fixed SecuritySystemStateStatus enum INIT to INITIAL 馃槑 but I think in future you should fix it :)
Yeah we're definitely planning to fix this in new codegen.
Most helpful comment
Yeah, absolutely - fixing the current codegen is a pain (which is why it's being rewritten) so I was trying to make sure it was necessary before diving into it. 馃檭