Skip to content

Commit a508066

Browse files
author
Daniel Rinehart
committed
update documentation for next release
1 parent 2e7f872 commit a508066

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ typings
44
tsconfig.json
55
typings.json
66
tslint.json
7+
dist/test

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
### vNEXT
44

5+
### 0.5.1
6+
- `withFilter` now called with `(rootValue, args, context, info)` [PR #103] (https://github.com/apollographql/graphql-subscriptions/pull/103)
7+
58
### 0.5.0
69
- BREAKING CHANGE: Removed deprecated code. [PR #104] (https://github.com/apollographql/graphql-subscriptions/pull/104)
710
- BREAKING CHANGE: Minimum GraphQL version bumped to 0.10.X. [PR #104] (https://github.com/apollographql/graphql-subscriptions/pull/104)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ When publishing data to subscribers, we need to make sure that each subscribers
7575
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.
7676

7777
`withFilter` API:
78-
- `asyncIteratorFn: () => AsyncIterator<any>` : A function that returns `AsyncIterator` you got from your `pubsub.asyncIterator`.
78+
- `asyncIteratorFn: (rootValue, args, context, info) => AsyncIterator<any>` : A function that returns `AsyncIterator` you got from your `pubsub.asyncIterator`.
7979
- `filterFn: (payload, variables, context, info) => boolean | Promise<boolean>` - A filter function, executed with the payload (the published value), variables, context and operation info, must return `boolean` or `Promise<boolean>` indicating if the payload should pass to the subscriber.
8080

8181
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:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "graphql-subscriptions",
3-
"version": "0.5.0",
3+
"version": "0.5.1",
44
"description": "GraphQL subscriptions for node.js",
55
"main": "dist/index.js",
66
"repository": {

0 commit comments

Comments
 (0)