Created
January 6, 2018 13:02
-
-
Save grrinchas/774b848cbb57f266974b9634407fdd08 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
decodePosts : Decoder.Decoder (List Post) | |
decodePosts = | |
Decoder.list decodePost | |
|> Decoder.field "allPosts" | |
|> Decoder.field "data" | |
decodeGraphcoolToken : Decoder.Decoder String | |
decodeGraphcoolToken = | |
Decoder.string | |
|> Decoder.field "token" | |
|> Decoder.field "authenticate" | |
|> Decoder.field "data" | |
decodePost : Decoder.Decoder Post | |
decodePost = | |
Pipeline.decode Post | |
|> Pipeline.required "id" Decoder.string | |
|> Pipeline.required "title" Decoder.string | |
|> Pipeline.required "body" Decoder.string |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment