1.1.4 • Published 1 year ago
@r26d/absinthe-apollo-socket-relay v1.1.4
@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
1 year ago
1.1.4
1 year ago
1.1.3
1 year ago
1.1.2
1 year ago
1.0.2
1 year ago
1.0.1
1 year ago
1.0.0
1 year ago
1.0.4
1 year ago
1.0.3
1 year ago
0.3.0
1 year ago
0.3.6
1 year ago
0.2.1
2 years ago
0.2.0
2 years ago
0.2.2
2 years ago
0.1.2
2 years ago
0.1.0
4 years ago
0.0.11
4 years ago
0.0.9
4 years ago
0.0.8
4 years ago
0.0.6
4 years ago