@dillonkearns/elm-graphql
Version:
<img src="https://cdn.jsdelivr.net/gh/martimatix/logo-graphqelm/logo.svg" alt="dillonearns/elm-graphql logo" width="40%" align="right">
14 lines (9 loc) • 302 B
Flow
// @flow
import {Push} from "phoenix";
import type {PushHandler} from "./types";
const handlePush = (push: Push, handler: PushHandler<any>) =>
push
.receive("ok", handler.onSucceed)
.receive("error", handler.onError)
.receive("timeout", handler.onTimeout);
export default handlePush;