@benzene/ws
Advanced tools
Comparing version 0.5.1 to 0.6.0-next.0
# @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 @@ |
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22034
444
+ Added@benzene/core@0.6.0(transitive)
- Removed@benzene/core@0.5.0(transitive)
- Removed@hoangvvo/graphql-jit@0.6.4(transitive)
- Removedlodash.memoize@4.1.2(transitive)
Updated@benzene/core@^0.6.0-next.0