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

Refactored fsproj generation to System.Xml.Linq and added use of StringBuffer for F# code generation #37

Closed anthony-mi closed 3 years ago

Zaid-Ajaj commented 3 years ago

Hi @anthony-mi this is really awesome work, thanks a lot 🙏 it looks a lot cleaner now. The integration tests are failing when generating a project using the shared target. I am not sure why but that is a small thing. You can always run the integration tests locally using the following and see what happens:

cd ./build
dotnet run -- integration

Another thing is the extension for XElement to generate a package refernce

XElement.ofStringName("PackageReference",
      XAttribute.ofStringName("Include", "Fable.SimpleHttp"),
      XAttribute.ofStringName("Version", "3.0.0")
)

Wouldn't it be nicer to have a dedicated extension to build those

XElement.PackageReference("Fable.SimpleHttp", "3.0.0")

What do you think?

anthony-mi commented 3 years ago

Cool idea. I'll redo it.

I just noticed that when generating an F# project, an additional Content item is added to it, which applies only to the Fable. I'll fix it and see why the integration test failed.