diff --git a/.npmignore b/.npmignore index 14895af..d941787 100644 --- a/.npmignore +++ b/.npmignore @@ -4,3 +4,4 @@ typings tsconfig.json typings.json tslint.json +dist/test diff --git a/CHANGELOG.md b/CHANGELOG.md index 59eb847..63b5c4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ### vNEXT +### 0.5.1 +- `withFilter` now called with `(rootValue, args, context, info)` [PR #103] (https://github.com/apollographql/graphql-subscriptions/pull/103) + ### 0.5.0 - BREAKING CHANGE: Removed deprecated code. [PR #104] (https://github.com/apollographql/graphql-subscriptions/pull/104) - BREAKING CHANGE: Minimum GraphQL version bumped to 0.10.X. [PR #104] (https://github.com/apollographql/graphql-subscriptions/pull/104) diff --git a/README.md b/README.md index c6b4fb4..84a9c3e 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ When publishing data to subscribers, we need to make sure that each subscribers To do so, we can use `withFilter` helper from this package, which wraps `AsyncIterator` with a filter function, and let you control each publication for each user. `withFilter` API: -- `asyncIteratorFn: () => AsyncIterator` : A function that returns `AsyncIterator` you got from your `pubsub.asyncIterator`. +- `asyncIteratorFn: (rootValue, args, context, info) => AsyncIterator` : A function that returns `AsyncIterator` you got from your `pubsub.asyncIterator`. - `filterFn: (payload, variables, context, info) => boolean | Promise` - A filter function, executed with the payload (the published value), variables, context and operation info, must return `boolean` or `Promise` indicating if the payload should pass to the subscriber. For example, if `somethingChanged` would also accept a variable with the ID that is relevant, we can use the following code to filter according to it: diff --git a/package.json b/package.json index bcc81ae..668ed22 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "graphql-subscriptions", - "version": "0.5.0", + "version": "0.5.1", "description": "GraphQL subscriptions for node.js", "main": "dist/index.js", "repository": {