Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

apollo-link-polling

Package Overview
Dependencies
Maintainers
2
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apollo-link-polling - npm Package Compare versions

Comparing version 0.0.1 to 0.1.0

3

dist/src/pollingLink.d.ts

@@ -1,3 +0,2 @@

/// <reference types="zen-observable" />
import { ApolloLink, Operation, NextLink, FetchResult, Observable } from 'apollo-link';
import { ApolloLink, Operation, NextLink, FetchResult, Observable } from 'apollo-link-core';
export default class PollingLink extends ApolloLink {

@@ -4,0 +3,0 @@ private pollInterval;

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

Object.defineProperty(exports, "__esModule", { value: true });
var apollo_link_1 = require("apollo-link");
var apollo_link_core_1 = require("apollo-link-core");
var PollingLink = (function (_super) {

@@ -24,3 +24,3 @@ __extends(PollingLink, _super);

var _this = this;
return new apollo_link_1.Observable(function (observer) {
return new apollo_link_core_1.Observable(function (observer) {
var subscriber = {

@@ -50,4 +50,4 @@ next: function (data) {

return PollingLink;
}(apollo_link_1.ApolloLink));
}(apollo_link_core_1.ApolloLink));
exports.default = PollingLink;
//# sourceMappingURL=pollingLink.js.map

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

var pollingLink_1 = require("../src/pollingLink");
var apollo_link_1 = require("apollo-link");
var apollo_link_core_1 = require("apollo-link-core");
var graphql_tag_1 = require("graphql-tag");

@@ -32,3 +32,3 @@ var query = (_a = ["\n query SampleQuery {\n stub {\n id\n }\n }\n"], _a.raw = ["\n query SampleQuery {\n stub {\n id\n }\n }\n"], graphql_tag_1.default(_a));

}
return apollo_link_1.Observable.of({
return apollo_link_core_1.Observable.of({
data: {

@@ -39,3 +39,3 @@ count: count++,

});
subscription = apollo_link_1.execute(poll, { query: query }).subscribe({
subscription = apollo_link_core_1.execute(poll, { query: query }).subscribe({
next: spy,

@@ -60,7 +60,7 @@ error: function (error) { return chai_1.expect.fail(null, null, error.message); },

if (count >= 5) {
return new apollo_link_1.Observable(function (observer) {
return new apollo_link_core_1.Observable(function (observer) {
throw error;
});
}
return apollo_link_1.Observable.of({
return apollo_link_core_1.Observable.of({
data: {

@@ -71,3 +71,3 @@ count: count++,

});
subscription = apollo_link_1.execute(poll, { query: query }).subscribe({
subscription = apollo_link_core_1.execute(poll, { query: query }).subscribe({
next: spy,

@@ -74,0 +74,0 @@ error: function (err) { return checkResults(err); },

@@ -1,3 +0,2 @@

/// <reference types="zen-observable" />
import { ApolloLink, Operation, NextLink, FetchResult, Observable } from 'apollo-link';
import { ApolloLink, Operation, NextLink, FetchResult, Observable } from 'apollo-link-core';
export default class PollingLink extends ApolloLink {

@@ -4,0 +3,0 @@ private pollInterval;

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

Object.defineProperty(exports, "__esModule", { value: true });
var apollo_link_1 = require("apollo-link");
var apollo_link_core_1 = require("apollo-link-core");
var PollingLink = (function (_super) {

@@ -24,3 +24,3 @@ __extends(PollingLink, _super);

var _this = this;
return new apollo_link_1.Observable(function (observer) {
return new apollo_link_core_1.Observable(function (observer) {
var subscriber = {

@@ -50,4 +50,4 @@ next: function (data) {

return PollingLink;
}(apollo_link_1.ApolloLink));
}(apollo_link_core_1.ApolloLink));
exports.default = PollingLink;
//# sourceMappingURL=pollingLink.js.map
{
"name": "apollo-link-polling",
"version": "0.0.1",
"version": "0.1.0",
"description": "HTTP transport layer for GraphQL",

@@ -42,3 +42,3 @@ "author": "Evans Hauser <evanshauser@gmail.com>",

"dependencies": {
"apollo-link": "^0.0.3"
"apollo-link-core": "^0.1.0"
},

@@ -45,0 +45,0 @@ "devDependencies": {

@@ -7,3 +7,3 @@ import {

Observable,
} from 'apollo-link';
} from 'apollo-link-core';

@@ -10,0 +10,0 @@ export default class PollingLink extends ApolloLink {

@@ -5,3 +5,3 @@ import { assert, expect } from 'chai';

import PollingLink from '../src/pollingLink';
import { execute, Observable } from 'apollo-link';
import { execute, Observable } from 'apollo-link-core';

@@ -8,0 +8,0 @@ import gql from 'graphql-tag';

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