1.1.4 • Published 2 years ago

@r26d/absinthe-apollo-socket-relay v1.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@r26d/absinthe-apollo-socket-relay

Absinthe Socket Relay for React

Installation

Using npm

$ npm install --save @r26d/absinthe-apollo-socket-relay

Using yarn

$ yarn add @r26d/absinthe-apollo-socket-relay

Examples

  • relay-environment.js
// @flow

import {createFetcher, createSubscriber} from "@absinthe-phoenix-socket-relay";
import {Environment, Network} from "relay-runtime";

import * as AbsintheSocket from '@r26d/absinthe-apollo-socket'

export default new Environment({
  network: Network.create(
    createFetcher(absintheSocket),
    createSubscriber(absintheSocket)
  ),
  store: new Store(new RecordSource())
});

API

createFetcher

Creates a Fetcher (Relay FetchFunction) using the given AbsintheSocket instance

Parameters

  • absintheSocket
  • onError

createSubscriber

Creates a Subscriber (Relay SubscribeFunction) using the given AbsintheSocket instance

Parameters

  • absintheSocket
  • onRecoverableError

isSubscribed

Returns a promise that resolves to true in case subscription of given disposable has started or to false otherwise

Parameters

  • disposable

References

License

MIT :copyright: r26D LLC

1.1.1

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

0.3.0

3 years ago

0.3.6

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.2.2

3 years ago

0.1.2

3 years ago

0.1.0

5 years ago

0.0.11

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.6

5 years ago