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

@benzene/ws

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@benzene/ws - npm Package Compare versions

Comparing version 0.5.1 to 0.6.0-next.0

11

CHANGELOG.md
# @benzene/ws
## 0.6.0-next.0
### Minor Changes
- 055eda0: allow custom compileQuery implementation
### Patch Changes
- Updated dependencies [055eda0]
- @benzene/core@0.6.0-next.0
## 0.5.1

@@ -4,0 +15,0 @@

2

dist/handler.d.ts

@@ -8,2 +8,2 @@ import { Benzene, ExtractExtraType } from "@benzene/core";

*/
export declare function makeHandler<TBenzene extends Benzene>(GQL: TBenzene, options?: HandlerOptions<ExtractExtraType<TBenzene>>): (socket: WebSocket, extra?: ExtractExtraType<TBenzene> | undefined) => void;
export declare function makeHandler<TBenzene extends Benzene>(GQL: TBenzene, options?: HandlerOptions<ExtractExtraType<TBenzene>>): (socket: WebSocket, extra?: (TBenzene extends Benzene<any, infer TExtra_1> ? TExtra_1 : never) | undefined) => void;

@@ -82,3 +82,3 @@ import { isAsyncIterator } from '@benzene/core';

}
const cachedOrResult = GQL.getCachedGQL(message.payload.query, message.payload.operationName);
const cachedOrResult = GQL.getCached(message.payload.query, message.payload.operationName);
if (!("document" in cachedOrResult)) {

@@ -96,7 +96,7 @@ return sendErr(socket, message.id, cachedOrResult.errors);

if (cachedOrResult.operation !== "subscription") {
sendRes(socket, message.id, await GQL.execute(execArg, cachedOrResult.jit));
sendRes(socket, message.id, await GQL.execute(execArg, cachedOrResult.compiled));
}
else {
try {
const result = await GQL.subscribe(execArg, cachedOrResult.jit);
const result = await GQL.subscribe(execArg, cachedOrResult.compiled);
if (!isAsyncIterator(result)) {

@@ -103,0 +103,0 @@ // If it is not an async iterator, it must be an

@@ -51,3 +51,3 @@ import { ValueOrPromise } from "@benzene/core";

connectionInitReceived: boolean;
extra?: TExtra;
extra: TExtra | undefined;
}

@@ -54,0 +54,0 @@ export interface HandlerOptions<TExtra> {

{
"name": "@benzene/ws",
"type": "module",
"version": "0.5.1",
"version": "0.6.0-next.0",
"description": "Fast and minimal GraphQL over WebSockets server",

@@ -42,3 +42,3 @@ "author": "Hoang Vo (https://hoangvvo.com)",

"dependencies": {
"@benzene/core": "^0.5.0"
"@benzene/core": "^0.6.0-next.0"
},

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

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