Currently these two cases are handled by the same data type "Subscription". It's field "id" (a Subscription ID) is optional. Which is, of course, a poor attempt at covering these two different use-cases.
When creating a subscription the field "id" should not be provided, not even Nothing. When an existing subscription is returned it should contained a mandatory subscription ID, not a Maybe.
It probably makes sense to come with two distinct data type names and use them accordingly.
Currently these two cases are handled by the same data type "Subscription". It's field "id" (a Subscription ID) is optional. Which is, of course, a poor attempt at covering these two different use-cases.
When creating a subscription the field "id" should not be provided, not even
Nothing
. When an existing subscription is returned it should contained a mandatory subscription ID, not aMaybe
.It probably makes sense to come with two distinct data type names and use them accordingly.