Closed etareduction closed 1 year ago
I am thinking of FSharp.Compiler.Syntax.PrettyNaming.NormalizeIdentifierBackticks, which should add double-backticks if required to any identifier.
Hi @etareduction i thought we were escaping keywords, guess of
slipped through. I will have a look when I can, for the time being, you can alias the GraphQL field to something else that is not a F# keyword.
@Zaid-Ajaj
for the time being, you can alias the GraphQL field to something else that is not a F# keyword.
I don't think it's that easy. Snowflaqe seems to generate types for the whole schema, not only types that i depend on in queries. So it doesn't compile as a whole for me while this problem is unsolved.
Snowflaqe seems to generate types for the whole schema
I believe only input types and enums are generated globally, the rest is dependant on the query
So it doesn't compile as a whole for me while this problem is unsolved
Happy to accept a PR if you are willing to look into it 😄
@Zaid-Ajaj
I believe only input types and enums are generated globally, the rest is dependant on the query
Yeah, i see. I have of
's in my input types unfortunately :(
@Zaid-Ajaj
Happy to accept a PR if you are willing to look into it 😄
Here it is: #81
Currently if you try to generate from a schema that has fields named like
of
in it's type declarations, generated types won't compile with following errorI suggest escaping such cases like that:
Also @baronfel#1673 in F# discord suggested that there is some compiler-provided function to detect stuff like that.