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
154 stars 25 forks source link

Add an option to return Task from async F# client functions instead of Async #47

Closed Numpsy closed 3 years ago

Numpsy commented 3 years ago

Refs #31 - adds an 'asyncReturnType' option to the config which, when set to 'task' uses Ply to generate F# client functions that return Task instead of Async.

This is the same change as the commit I linked from #31, but with the suggested changes to case sensitivity in the 'async' string and additional piece of validation to make it an error to specify usage of tasks in Fable targets.

Zaid-Ajaj commented 3 years ago

Awesome stuff @Numpsy 😍 I merged, then added some docs and integration tests for the option.

Published into Snowflaqe v1.25 🚀