Husqvik / GraphQlClientGenerator

GraphQL C# client generator
MIT License
213 stars 49 forks source link

Generate Separate Files / Folder Structure #136

Closed GarretWayne closed 1 year ago

GarretWayne commented 1 year ago

Based on the classes, interfaces and generated regions it would be great to have a separate file structure, so that we can quickly replace the changed code when we regenerate the client. This could also lead to a better VSC history, as it won't be a megalithic file.

Husqvik commented 1 year ago

that is supported already. Except the hardcoded base classes which is a single resource. But every generated class/enum can be generated as separate file

--outputType <OneClassPerFile|SingleFile>                                                      Specifies generated classes organization [default: SingleFile]

It also gives you option to have own extensions of the classes using own partial classes stored anywhere but within the same namespace

GarretWayne commented 1 year ago

Thanks, I will try it out later :)

Husqvik commented 1 year ago

you can also override/implement GenerationContext and write your own custom structure.