Huge News!Announcing our $40M Series B led by Abstract Ventures.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.0.5 to 0.0.6

5

dist/createClient.d.ts

@@ -19,3 +19,3 @@ import { ExecutionResult } from "graphql";

id: number;
context: any;
context?: any;
operation: Operation;

@@ -25,4 +25,4 @@ };

id: number;
result: ExecutionResult;
isFinal?: boolean;
result: ExecutionResult;
};

@@ -35,4 +35,5 @@ export declare type Operation = {

export declare function createClient({ url, context, socketOptions }?: ClientOptions): {
socket: import("socket.io-client").Socket;
execute: (operation: Operation, observer: ResultObserver) => () => void;
destroy: () => void;
};

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

};
const onOperationResult = ({ id, isFinal, result }) => {
const onOperationResult = ({ id, result, isFinal }) => {
const record = operations.get(id);

@@ -63,3 +63,3 @@ if (!record)

return () => {
socket.emit("graphql:unsubscribe", { id });
socket.emit("graphql:unsubscribe", id);
operations.delete(id);

@@ -70,2 +70,3 @@ observer.complete();

return {
socket,
execute,

@@ -72,0 +73,0 @@ destroy

2

package.json
{
"name": "@graphql-live/client",
"version": "0.0.5",
"version": "0.0.6",
"description": "The client part of the GraphQLive package",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -23,3 +23,3 @@ import { ExecutionResult } from "graphql";

id: number;
context: any;
context?: any;
operation: Operation;

@@ -30,4 +30,4 @@ };

id: number;
result: ExecutionResult;
isFinal?: boolean;
result: ExecutionResult;
};

@@ -62,3 +62,3 @@

const onOperationResult = ({ id, isFinal, result }: ResultPayload) => {
const onOperationResult = ({ id, result, isFinal }: ResultPayload) => {
const record = operations.get(id);

@@ -85,3 +85,3 @@ if (!record) return;

const id = currentId++;
const record = {
const record: OperationRecord = {
observer,

@@ -100,3 +100,3 @@ async execute() {

return () => {
socket.emit("graphql:unsubscribe", { id });
socket.emit("graphql:unsubscribe", id);
operations.delete(id);

@@ -108,2 +108,3 @@ observer.complete();

return {
socket,
execute,

@@ -110,0 +111,0 @@ destroy

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