Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Commit

Permalink
fix issue with @types/grpahql@0.13
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Rinehart committed May 7, 2018
1 parent c36add4 commit e97af9d
Showing 3 changed files with 10 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -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,24 +37,24 @@
},
"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",
"@types/node": "^8.0.8",
"@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",
"mocha": "^3.4.2",
"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",
3 changes: 2 additions & 1 deletion src/server.ts
Original file line number Diff line number Diff line change
@@ -61,6 +61,7 @@ export type ExecuteFunction = (schema: GraphQLSchema,
variableValues?: { [key: string]: any },
operationName?: string,
fieldResolver?: GraphQLFieldResolver<any, any>) =>
ExecutionResult |
Promise<ExecutionResult> |
AsyncIterator<ExecutionResult>;

@@ -332,7 +333,7 @@ export class SubscriptionServer {

const document = typeof baseParams.query !== 'string' ? baseParams.query : parse(baseParams.query);
let executionPromise: Promise<AsyncIterator<ExecutionResult> | 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 });

0 comments on commit e97af9d

Please sign in to comment.