You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Zaid-Ajaj
changed the title
Implement error handling option: "result" | "exception" for the fsharp target
Implement error handling option: "results" | "exceptions" for the fsharp target
Mar 28, 2021
Right now, the client methods generated per query come in two flavors and both return
Result
:Async<Result<Query, ErrorType list>>
Result<Query, ErrorType list>
Sometimes, using
result
can be tricky where users don't necessarily care about handling errors each request. Atry-catch
block might more suitable.To improve the situation, add an option
where
results
is the default. Whenexceptions
is used then the generated functions will use exceptions for error handling insteadAsync<Query>
Query
An exception type is generated
which is thrown when the GraphQL backend returns a non-OK response
The text was updated successfully, but these errors were encountered: