@graphql-tools/executor-graphql-ws
Advanced tools
Comparing version 1.1.3-alpha-20240620034109-2a2878866aed08fedf5baaa5878414b9de79fdb2 to 1.2.0-alpha-20240705095940-3ce4d8846c1d2640ad958b9619c1a6912f2e6f10
@@ -34,3 +34,3 @@ "use strict"; | ||
} | ||
return function GraphQLWSExecutor(executionRequest) { | ||
const executor = function GraphQLWSExecutor(executionRequest) { | ||
const { document, variables, operationName, extensions, operationType = (0, utils_1.getOperationASTFromRequest)(executionRequest).operation, } = executionRequest; | ||
@@ -54,3 +54,7 @@ // additional connection params can be supplied through the "connectionParams" field in extensions. | ||
}; | ||
executor[Symbol.asyncDispose] = function disposeWS() { | ||
return graphqlWSClient.dispose(); | ||
}; | ||
return executor; | ||
} | ||
exports.buildGraphQLWSExecutor = buildGraphQLWSExecutor; |
@@ -30,3 +30,3 @@ import { print } from 'graphql'; | ||
} | ||
return function GraphQLWSExecutor(executionRequest) { | ||
const executor = function GraphQLWSExecutor(executionRequest) { | ||
const { document, variables, operationName, extensions, operationType = getOperationASTFromRequest(executionRequest).operation, } = executionRequest; | ||
@@ -50,2 +50,6 @@ // additional connection params can be supplied through the "connectionParams" field in extensions. | ||
}; | ||
executor[Symbol.asyncDispose] = function disposeWS() { | ||
return graphqlWSClient.dispose(); | ||
}; | ||
return executor; | ||
} |
{ | ||
"name": "@graphql-tools/executor-graphql-ws", | ||
"version": "1.1.3-alpha-20240620034109-2a2878866aed08fedf5baaa5878414b9de79fdb2", | ||
"version": "1.2.0-alpha-20240705095940-3ce4d8846c1d2640ad958b9619c1a6912f2e6f10", | ||
"description": "A set of utils for faster development of GraphQL tools", | ||
@@ -10,3 +10,3 @@ "sideEffects": false, | ||
"dependencies": { | ||
"@graphql-tools/utils": "10.3.0-alpha-20240620034109-2a2878866aed08fedf5baaa5878414b9de79fdb2", | ||
"@graphql-tools/utils": "10.3.0-alpha-20240705095940-3ce4d8846c1d2640ad958b9619c1a6912f2e6f10", | ||
"@types/ws": "^8.0.0", | ||
@@ -16,3 +16,3 @@ "graphql-ws": "^5.14.0", | ||
"tslib": "^2.4.0", | ||
"ws": "^8.13.0" | ||
"ws": "^8.17.1" | ||
}, | ||
@@ -19,0 +19,0 @@ "repository": { |
import { Client, ClientOptions } from 'graphql-ws'; | ||
import { Executor } from '@graphql-tools/utils'; | ||
import { DisposableExecutor } from '@graphql-tools/utils'; | ||
interface GraphQLWSExecutorOptions extends ClientOptions { | ||
onClient?: (client: Client) => void; | ||
} | ||
export declare function buildGraphQLWSExecutor(clientOptionsOrClient: GraphQLWSExecutorOptions | Client): Executor; | ||
export declare function buildGraphQLWSExecutor(clientOptionsOrClient: GraphQLWSExecutorOptions | Client): DisposableExecutor; | ||
export {}; |
Sorry, the diff of this file is not supported yet
7419
118
+ Added@graphql-tools/utils@10.3.0-alpha-20240705095940-3ce4d8846c1d2640ad958b9619c1a6912f2e6f10(transitive)
- Removed@graphql-tools/utils@10.3.0-alpha-20240620034109-2a2878866aed08fedf5baaa5878414b9de79fdb2(transitive)
- Removeddlv@1.1.3(transitive)
Updated@graphql-tools/utils@10.3.0-alpha-20240705095940-3ce4d8846c1d2640ad958b9619c1a6912f2e6f10
Updatedws@^8.17.1