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

@graffy/client

Package Overview
Dependencies
Maintainers
0
Versions
228
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graffy/client

Graffy client library for the browser, usin the `fetch()` or `WebSocket` APIs. This module is intended to be used with a Node.js server running Graffy Server.

  • 0.16.20-alpha.5
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Graffy Client

Graffy client library for the browser, usin the fetch() or WebSocket APIs. This module is intended to be used with a Node.js server running Graffy Server.

Usage

import Graffy from '@graffy/core';
import client from '@graffy/client';

const store = new Graffy();
store.use(client(url, options));

// Add downstream providers to the store

An HTTP connection is used if the URL begins with http(s)://, and a Websocket is used if it begins with ws(s)://.

Options

  • getOptions(operation, payload, options), a callback to get the options that should be passed to the server with each operation.
  • connInfoPath, a location in the store to put connection metadata. Defaults to connection.

Connection status

If using a WebSocket connection, Graffy client creates a connection: { status: boolean } node in the store. The location of this node can be controlled by the connInfoPath option. Reading from or watching this node provides information about the current connection status. The application may explicitly tear-down or re-establish connections by writing false or true to it, respectively.

See Graffy documentation for more.

FAQs

Package last updated on 22 Oct 2024

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