Socket
Socket
Sign inDemoInstall

graphql-subscriptions

Package Overview
Dependencies
Maintainers
2
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.2.0 to 0.2.1

AUTHORS

1

dist/pubsub.js

@@ -120,2 +120,3 @@ "use strict";

});
delete this.subscriptions[subId];
};

@@ -122,0 +123,0 @@ return SubscriptionManager;

@@ -162,2 +162,10 @@ "use strict";

});
it('can subscribe with a nameless query and gets a subId back', function () {
var query = 'subscription { testSubscription }';
var callback = function () { return null; };
subManager.subscribe({ query: query, operationName: 'X', callback: callback }).then(function (subId) {
expect(subId).to.be.a('number');
subManager.unsubscribe(subId);
});
});
it('can subscribe with a valid query and get the root value', function (done) {

@@ -270,2 +278,10 @@ var query = 'subscription X{ testSubscription }';

});
it('throws an error when trying to unsubscribe a second time', function () {
var query = 'subscription X{ testSubscription }';
return subManager.subscribe({ query: query, operationName: 'X', callback: function () { } }).then(function (subId) {
subManager.unsubscribe(subId);
expect(function () { return subManager.unsubscribe(subId); })
.to.throw('undefined');
});
});
it('calls the error callback if there is an execution error', function (done) {

@@ -272,0 +288,0 @@ var query = "subscription X($uga: Boolean!){\n testSubscription @skip(if: $uga)\n }";

2

dist/validation.js

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

OperationDefinition: function (node) {
var operationName = node.name.value;
var operationName = node.name ? node.name.value : '';
var numFields = 0;

@@ -16,0 +16,0 @@ node.selectionSet.selections.forEach(function (selection) {

{
"name": "graphql-subscriptions",
"version": "0.2.0",
"version": "0.2.1",
"description": "GraphQL subscriptions for node.js",

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

@@ -0,1 +1,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)
# graphql-subscriptions

@@ -2,0 +4,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

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