@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">
19 lines (13 loc) • 367 B
Flow
// @flow
import {replace as arrayReplace} from "@jumpn/utils-array";
import findIndex from "./findIndex";
import type {Notifier} from "../types";
const refresh = (notifier: Notifier<any>) => (
notifiers: Array<Notifier<any>>
) =>
arrayReplace(
findIndex(notifiers, "request", notifier.request),
[notifier],
notifiers
);
export default refresh;