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

@activimetrics/socket-relay

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@activimetrics/socket-relay

Absinthe Socket Relay

  • 0.2.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@activimetrics/socket-relay

Absinthe Socket Relay

  • Installation
  • Examples
  • API
  • References
  • License

Installation

Using npm

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

Using yarn

$ yarn add @activimetrics/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 30 Sep 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