Zaid-Ajaj / Snowflaqe

A dotnet CLI to generate type-safe GraphQL clients for F# and Fable with automatic deserialization, static query verification and type checking
MIT License
157 stars 26 forks source link

Add comment to indicate auto-generated code #28

Closed OttoBos closed 3 years ago

OttoBos commented 3 years ago

Hi, would be good if the auto-generated code would contain some comment header to indicate it was auto-generated by snowflaqe, maybe even including the date / GraphQL URI / name of query file, and a link to the snowflaqe repo of course. This would avoid people manually editing these files.

Zaid-Ajaj commented 3 years ago

Hi @OttoBos, this sounds like a good idea. I'll add it as a configuration option sometime soon 😄

Zaid-Ajaj commented 3 years ago

Fixed as of v1.19 🚀 Snowflaqe will now emit code generation metadata when when the option emitMetadata is set to true

{
    "emitMetadata": true
}

This option is set to false by default when you do not provide in the configuration.