Skip to content

Commit

Permalink
Update subscriptions.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec authored Sep 4, 2019
1 parent 5b1dfbd commit fa7880a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions content/graphql/subscriptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ Likewise with filters.
```typescript
@Subscription('commentAdded', {
filter(this: AuthorResolver, payload, variables) {
// "this" refers to an instance of "AuthorResolver"
return payload.commentAdded.repositoryName === variables.repoFullName;
}
})
Expand Down

0 comments on commit fa7880a

Please sign in to comment.