diff --git a/CHANGELOG.md b/CHANGELOG.md index 58e75fff7..96d9b598c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ### vNEXT +### v0.9.9 +- fix issue with @types/graphql@0.13 + ### v0.9.8 - added `error` event to handle connection errors and debug network troubles [PR #341](https://github.com/apollographql/subscriptions-transport-ws/pull/341). - added feature inactivityTimeout [PR #390](https://github.com/apollographql/subscriptions-transport-ws/pull/390) diff --git a/package.json b/package.json index 3c2b671f7..650680f8a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "subscriptions-transport-ws", - "version": "0.9.8", + "version": "0.9.9", "description": "A websocket transport for GraphQL subscriptions", "main": "dist/index.js", "browser": "dist/client.js", @@ -37,7 +37,7 @@ }, "devDependencies": { "@types/chai": "^4.0.0", - "@types/graphql": "^0.11.3", + "@types/graphql": "^0.13.0", "@types/is-promise": "^2.1.0", "@types/lodash": "^4.14.68", "@types/mocha": "^2.2.41", @@ -45,7 +45,7 @@ "@types/sinon": "^2.3.0", "@types/ws": "^3.0.0", "chai": "^4.0.2", - "graphql": "^0.13.1", + "graphql": "^0.13.2", "graphql-subscriptions": "^0.5.7", "istanbul": "^1.0.0-alpha.2", "lodash": "^4.17.1", @@ -53,8 +53,8 @@ "remap-istanbul": "^0.9.5", "rimraf": "^2.6.1", "sinon": "^2.3.6", - "tslint": "^5.8.0", - "typescript": "^2.6.2", + "tslint": "^5.10.0", + "typescript": "^2.8.3", "webpack": "^3.1.0" }, "typings": "dist/index.d.ts", diff --git a/src/server.ts b/src/server.ts index c2cf01033..569b6b6a9 100644 --- a/src/server.ts +++ b/src/server.ts @@ -61,6 +61,7 @@ export type ExecuteFunction = (schema: GraphQLSchema, variableValues?: { [key: string]: any }, operationName?: string, fieldResolver?: GraphQLFieldResolver) => + ExecutionResult | Promise | AsyncIterator; @@ -332,7 +333,7 @@ export class SubscriptionServer { const document = typeof baseParams.query !== 'string' ? baseParams.query : parse(baseParams.query); let executionPromise: Promise | ExecutionResult>; - const validationErrors: Error[] = validate(this.schema, document, this.specifiedRules); + const validationErrors = validate(this.schema, document, this.specifiedRules); if ( validationErrors.length > 0 ) { executionPromise = Promise.resolve({ errors: validationErrors });