Skip to content

Instantly share code, notes, and snippets.

@ssbb
Created March 17, 2018 08:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ssbb/688080e9a1053ee894cdd835cd2b6a60 to your computer and use it in GitHub Desktop.
Save ssbb/688080e9a1053ee894cdd835cd2b6a60 to your computer and use it in GitHub Desktop.
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