Created
March 17, 2018 08:58
-
-
Save ssbb/688080e9a1053ee894cdd835cd2b6a60 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
fetchAgent : String -> Cmd Msg | |
fetchAgent slug = | |
let | |
query = | |
Query.selection identity | |
|> with | |
(Query.node { id = Api.encodeAgentId slug } | |
(Node.selection (always Agent) | |
[ Node.onAgent agentSelection ] | |
) | |
|> Field.nonNullOrFail | |
) | |
in | |
Api.sendQuery FetchResponse query |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment