-- Do not manually edit this file, it was auto-generated by dillonkearns/elm-graphql -- https://github.com/dillonkearns/elm-graphql module Github.Enum.IssueState exposing (IssueState(..), decoder, toString) import Json.Decode as Decode exposing (Decoder) {-| The possible states of an issue. - Open - An issue that is still open - Closed - An issue that has been closed -} type IssueState = Open | Closed decoder : Decoder IssueState decoder = Decode.string |> Decode.andThen (\string -> case string of "OPEN" -> Decode.succeed Open "CLOSED" -> Decode.succeed Closed _ -> Decode.fail ("Invalid IssueState type, " ++ string ++ " try re-running the @dillonkearns/elm-graphql CLI ") ) {-| Convert from the union type representating the Enum to a string that the GraphQL server will recognize. -} toString : IssueState -> String toString enum = case enum of Open -> "OPEN" Closed -> "CLOSED"