Socket
Socket
Sign inDemoInstall

graphql-subscriptions

Package Overview
Dependencies
Maintainers
5
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-subscriptions - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

3

CHANGELOG.md

@@ -5,2 +5,5 @@ # Changelog

### 0.5.1
- `withFilter` now called with `(rootValue, args, context, info)` [PR #103] (https://github.com/apollographql/graphql-subscriptions/pull/103)
### 0.5.0

@@ -7,0 +10,0 @@ - BREAKING CHANGE: Removed deprecated code. [PR #104] (https://github.com/apollographql/graphql-subscriptions/pull/104)

2

dist/with-filter.d.ts
export declare type FilterFn = (rootValue?: any, args?: any, context?: any, info?: any) => boolean;
export declare type ResolverFn = (rootValue?: any, args?: any, context?: any, info?: any) => AsyncIterator<any>;
export declare const withFilter: (asyncIteratorFn: () => AsyncIterator<any>, filterFn: FilterFn) => Function;
export declare const withFilter: (asyncIteratorFn: ResolverFn, filterFn: FilterFn) => Function;

@@ -6,3 +6,3 @@ "use strict";

return function (rootValue, args, context, info) {
var asyncIterator = asyncIteratorFn();
var asyncIterator = asyncIteratorFn(rootValue, args, context, info);
var getNextPromise = function () {

@@ -9,0 +9,0 @@ return asyncIterator

{
"name": "graphql-subscriptions",
"version": "0.5.0",
"version": "0.5.1",
"description": "GraphQL subscriptions for node.js",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -78,3 +78,3 @@ [![npm version](https://badge.fury.io/js/graphql-subscriptions.svg)](https://badge.fury.io/js/graphql-subscriptions) [![GitHub license](https://img.shields.io/github/license/apollostack/graphql-subscriptions.svg)](https://github.com/apollostack/graphql-subscriptions/blob/license/LICENSE)

`withFilter` API:
- `asyncIteratorFn: () => AsyncIterator<any>` : A function that returns `AsyncIterator` you got from your `pubsub.asyncIterator`.
- `asyncIteratorFn: (rootValue, args, context, info) => AsyncIterator<any>` : A function that returns `AsyncIterator` you got from your `pubsub.asyncIterator`.
- `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.

@@ -81,0 +81,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc