swiftengineer / elm-data / ElmData.DAO
DAOs (Data Access Objects) exist to hold all state relevant to making requests to an API.


type alias DAO recordType =
{ apiUrl : String
, authConfig : ElmData.AuthConfig.AuthConfig
, listDeserialize : Json.Decode.Decoder (List recordType)
, deserialize : Json.Decode.Decoder recordType
, serialize : recordType -> Json.Encode.Value 
}


the dao

createDAO : String -> Json.Decode.Decoder (List recordType) -> Json.Decode.Decoder recordType -> (recordType -> Json.Encode.Value) -> DAO recordType

Function used to create a DAO