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

@soundxyz/graphql-react-ws

Package Overview
Dependencies
Maintainers
11
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@soundxyz/graphql-react-ws - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

3

client.d.ts

@@ -28,3 +28,3 @@ import { ClientOptions, ExecutionResult } from 'graphql-ws';

} | null;
useSubscription: <Doc_1 extends StringDocumentNode<Record<string, any>, Record<string, any>>>({ query, onData, onError, variables, initialData, }: {
useSubscription: <Doc_1 extends StringDocumentNode<Record<string, any>, Record<string, any>>>({ query, onData, onError, variables, initialData, enabled, }: {
query: Doc_1;

@@ -34,2 +34,3 @@ onData?: OnData<Doc_1> | undefined;

initialData?: ExecutionResultWithData<ResultOf<Doc_1>> | null | undefined;
enabled?: boolean | undefined;
} & (VariablesOf<Doc_1> extends Record<string, never> ? {

@@ -36,0 +37,0 @@ variables?: undefined;

@@ -149,3 +149,4 @@ import { createClient } from 'graphql-ws';

variables,
initialData = null
initialData = null,
enabled = true
}) {

@@ -183,3 +184,3 @@ const store = getSubscriptionStore({

const subscription = useMemo(() => {
if (typeof window === "undefined" || stableVariables === false)
if (typeof window === "undefined" || stableVariables === false || enabled === false)
return null;

@@ -190,3 +191,3 @@ return subscribe(

// Can't verify the conditional types around optional variables
variables
variables: stableVariables
},

@@ -221,3 +222,3 @@ async function({ iterator }) {

);
}, []);
}, [stableVariables, enabled, query]);
useEffect(() => {

@@ -224,0 +225,0 @@ if (!subscription)

{
"name": "@soundxyz/graphql-react-ws",
"version": "1.0.0",
"version": "1.0.1",
"sideEffects": false,

@@ -5,0 +5,0 @@ "peerDependencies": {

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