New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@graphql-live/client

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-live/client - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

dist/apollo.d.ts

8

dist/createClient.js

@@ -30,2 +30,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

const onOperationResult = ({ id, patch, isFinal }) => {
var _a, _b, _c, _d;
const record = operations.get(id);

@@ -37,6 +38,6 @@ if (!record)

record.latestResult = applyPatch(deepClone(record.latestResult), patch).newDocument;
record.observer.next(record.latestResult);
(_b = (_a = record.observer).next) === null || _b === void 0 ? void 0 : _b.call(_a, record.latestResult);
if (isFinal) {
operations.delete(id);
record.observer.complete();
(_d = (_c = record.observer).complete) === null || _d === void 0 ? void 0 : _d.call(_c);
}

@@ -80,5 +81,6 @@ };

return () => {
var _a;
socket.emit("graphql:unsubscribe", id);
operations.delete(id);
observer.complete();
(_a = observer.complete) === null || _a === void 0 ? void 0 : _a.call(observer);
};

@@ -85,0 +87,0 @@ };

export * from "./createClient";
export * from "./urql";
export * from "./types";
export * from "./createClient";
export * from "./urql";
export * from "./types";
//# sourceMappingURL=index.js.map

@@ -19,5 +19,5 @@ import { ManagerOptions, Socket, SocketOptions } from "socket.io-client";

export declare type ResultObserver = {
next(value: ExecutionResult): void;
error(error: any): void;
complete(): void;
next?(value: ExecutionResult): void;
error?(error: any): void;
complete?(): void;
};

@@ -24,0 +24,0 @@ export declare type OperationPayload<TContext = any> = {

import { ClientOptions } from ".";
export declare function liveExchange<TContext = any>(options: ClientOptions<TContext>): import("urql").Exchange;
export declare function liveExchange<TContext = any>(options?: ClientOptions<TContext>): import("urql").Exchange;
import { subscriptionExchange } from "urql";
import { createClient } from ".";
export function liveExchange(options) {
export function liveExchange(options = {}) {
const { execute } = createClient(options);

@@ -5,0 +5,0 @@ return subscriptionExchange({

{
"name": "@graphql-live/client",
"version": "0.1.7",
"version": "0.1.8",
"description": "The client part of the GraphQLive package",

@@ -33,2 +33,3 @@ "main": "dist/index.js",

"devDependencies": {
"@apollo/client": "^3.3.12",
"@types/node": "^14.14.35",

@@ -35,0 +36,0 @@ "typescript": "^4.2.3",

@@ -45,6 +45,6 @@ import { io } from "socket.io-client";

).newDocument;
record.observer.next(record.latestResult);
record.observer.next?.(record.latestResult);
if (isFinal) {
operations.delete(id);
record.observer.complete();
record.observer.complete?.();
}

@@ -91,3 +91,3 @@ };

operations.delete(id);
observer.complete();
observer.complete?.();
};

@@ -94,0 +94,0 @@ };

export * from "./createClient";
export * from "./urql";
export * from "./types";

@@ -23,5 +23,5 @@ import { ManagerOptions, Socket, SocketOptions } from "socket.io-client";

export type ResultObserver = {
next(value: ExecutionResult): void;
error(error: any): void;
complete(): void;
next?(value: ExecutionResult): void;
error?(error: any): void;
complete?(): void;
};

@@ -28,0 +28,0 @@

import { subscriptionExchange } from "urql";
import { ClientOptions, createClient } from ".";
export function liveExchange<TContext = any>(options: ClientOptions<TContext>) {
export function liveExchange<TContext = any>(
options: ClientOptions<TContext> = {}
) {
const { execute } = createClient(options);

@@ -6,0 +8,0 @@ return subscriptionExchange({

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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