Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@absinthe/socket-relay

Package Overview
Dependencies
Maintainers
3
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@absinthe/socket-relay

Absinthe Socket Relay

  • 0.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
59
decreased by-28.92%
Maintainers
3
Weekly downloads
 
Created
Source

@absinthe/socket-relay

Absinthe Socket Relay

  • Installation
  • Examples
  • API
  • References
  • License

Installation

Using npm

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

Using yarn

$ yarn add @absinthe/socket-relay

Examples

  • relay-environment.js
// @flow

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

import absintheSocket from "./absintheSocket";

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 AbsintheSocket
  • onError function (error: Error): any

Returns FetchFunction

createSubscriber

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

Parameters
  • absintheSocket AbsintheSocket
  • onRecoverableError function (error: Error): any

Returns SubscribeFunction

isSubscribed

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

Parameters
  • disposable Disposable

Returns Promise<boolean>

References

License

MIT :copyright: Jumpn Limited.

Keywords

FAQs

Package last updated on 20 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc