apollo-link
Advanced tools
Comparing version 0.7.0 to 0.8.0
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('zen-observable-ts'), require('apollo-utilities'), require('graphql/language/printer')) : | ||
typeof define === 'function' && define.amd ? define(['exports', 'zen-observable-ts', 'apollo-utilities', 'graphql/language/printer'], factory) : | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('zen-observable'), require('apollo-utilities'), require('graphql/language/printer')) : | ||
typeof define === 'function' && define.amd ? define(['exports', 'zen-observable', 'apollo-utilities', 'graphql/language/printer'], factory) : | ||
(factory((global.apolloLinkCore = {}),global.Observable,global.apolloUtilities,global.graphql_language_printer)); | ||
}(this, (function (exports,Observable,apolloUtilities,graphql_language_printer) { 'use strict'; | ||
var Observable__default = Observable['default']; | ||
var __extends = (undefined && undefined.__extends) || (function () { | ||
@@ -118,3 +116,3 @@ var extendStatics = Object.setPrototypeOf || | ||
var passthrough = function (op, forward) { return (forward ? forward(op) : Observable__default.of()); }; | ||
var passthrough = function (op, forward) { return (forward ? forward(op) : Observable.of()); }; | ||
var toLink = function (handler) { | ||
@@ -124,3 +122,3 @@ return typeof handler === 'function' ? new ApolloLink(handler) : handler; | ||
var empty = function () { | ||
return new ApolloLink(function (op, forward) { return Observable__default.of(); }); | ||
return new ApolloLink(function (op, forward) { return Observable.of(); }); | ||
}; | ||
@@ -139,4 +137,4 @@ var from = function (links) { | ||
return test(operation) | ||
? leftLink.request(operation) || Observable__default.of() | ||
: rightLink.request(operation) || Observable__default.of(); | ||
? leftLink.request(operation) || Observable.of() | ||
: rightLink.request(operation) || Observable.of(); | ||
}); | ||
@@ -147,4 +145,4 @@ } | ||
return test(operation) | ||
? leftLink.request(operation, forward) || Observable__default.of() | ||
: rightLink.request(operation, forward) || Observable__default.of(); | ||
? leftLink.request(operation, forward) || Observable.of() | ||
: rightLink.request(operation, forward) || Observable.of(); | ||
}); | ||
@@ -162,3 +160,3 @@ } | ||
return new ApolloLink(function (operation) { | ||
return firstLink.request(operation, function (op) { return nextLink.request(op) || Observable__default.of(); }) || Observable__default.of(); | ||
return firstLink.request(operation, function (op) { return nextLink.request(op) || Observable.of(); }) || Observable.of(); | ||
}); | ||
@@ -169,4 +167,4 @@ } | ||
return (firstLink.request(operation, function (op) { | ||
return nextLink.request(op, forward) || Observable__default.of(); | ||
}) || Observable__default.of()); | ||
return nextLink.request(op, forward) || Observable.of(); | ||
}) || Observable.of()); | ||
}); | ||
@@ -196,6 +194,6 @@ } | ||
function execute(link, operation) { | ||
return (link.request(createOperation(operation.context, transformOperation(validateOperation(operation)))) || Observable__default.of()); | ||
return (link.request(createOperation(operation.context, transformOperation(validateOperation(operation)))) || Observable.of()); | ||
} | ||
exports.Observable = Observable__default; | ||
exports.Observable = Observable; | ||
exports.makePromise = makePromise; | ||
@@ -208,3 +206,2 @@ exports.empty = empty; | ||
exports.execute = execute; | ||
Object.keys(Observable).forEach(function (key) { exports[key] = Observable[key]; }); | ||
@@ -211,0 +208,0 @@ Object.defineProperty(exports, '__esModule', { value: true }); |
export * from './link'; | ||
export { makePromise } from './linkUtils'; | ||
export * from './types'; | ||
import Observable from 'zen-observable-ts'; | ||
export * from 'zen-observable-ts'; | ||
import * as Observable from 'zen-observable'; | ||
export { Observable }; |
export * from './link'; | ||
export { makePromise } from './linkUtils'; | ||
import Observable from 'zen-observable-ts'; | ||
export * from 'zen-observable-ts'; | ||
import * as Observable from 'zen-observable'; | ||
export { Observable }; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,3 @@ | ||
import Observable from 'zen-observable-ts'; | ||
/// <reference types="zen-observable" /> | ||
import * as Observable from 'zen-observable'; | ||
import { GraphQLRequest, NextLink, Operation, RequestHandler, FetchResult } from './types'; | ||
@@ -3,0 +4,0 @@ export declare const empty: () => ApolloLink; |
@@ -1,2 +0,2 @@ | ||
import Observable from 'zen-observable-ts'; | ||
import * as Observable from 'zen-observable'; | ||
import { validateOperation, isTerminating, LinkError, transformOperation, createOperation, } from './linkUtils'; | ||
@@ -3,0 +3,0 @@ var passthrough = function (op, forward) { return (forward ? forward(op) : Observable.of()); }; |
@@ -1,2 +0,3 @@ | ||
import Observable from 'zen-observable-ts'; | ||
/// <reference types="zen-observable" /> | ||
import * as Observable from 'zen-observable'; | ||
import { GraphQLRequest, Operation } from './types'; | ||
@@ -3,0 +4,0 @@ import { ApolloLink } from './link'; |
@@ -0,3 +1,4 @@ | ||
/// <reference types="zen-observable" /> | ||
import { Operation, RequestHandler, NextLink, FetchResult } from '../types'; | ||
import Observable from 'zen-observable-ts'; | ||
import * as Observable from 'zen-observable'; | ||
import { ApolloLink } from '../link'; | ||
@@ -4,0 +5,0 @@ export default class MockLink extends ApolloLink { |
@@ -0,3 +1,4 @@ | ||
/// <reference types="zen-observable" /> | ||
import { Operation, NextLink, FetchResult } from '../types'; | ||
import Observable from 'zen-observable-ts'; | ||
import * as Observable from 'zen-observable'; | ||
import { ApolloLink } from '../link'; | ||
@@ -4,0 +5,0 @@ export default class SetContextLink extends ApolloLink { |
@@ -1,2 +0,3 @@ | ||
import Observable from 'zen-observable-ts'; | ||
/// <reference types="zen-observable" /> | ||
import * as Observable from 'zen-observable'; | ||
import { ExecutionResult, DocumentNode } from 'graphql'; | ||
@@ -3,0 +4,0 @@ export interface GraphQLRequest { |
{ | ||
"name": "apollo-link", | ||
"version": "0.7.0", | ||
"version": "0.8.0", | ||
"description": "Flexible, lightweight transport layer for GraphQL", | ||
@@ -44,9 +44,13 @@ "author": "Evans Hauser <evanshauser@gmail.com>", | ||
"apollo-utilities": "^0.2.0-beta.0", | ||
"graphql": "^0.11.3", | ||
"zen-observable-ts": "^0.5.0" | ||
"zen-observable": "^0.6.0" | ||
}, | ||
"peerDependencies": { | ||
"graphql": "^0.11.3" | ||
}, | ||
"devDependencies": { | ||
"@types/graphql": "0.11.4", | ||
"@types/jest": "21.1.1", | ||
"@types/graphql": "0.11.5", | ||
"@types/jest": "21.1.2", | ||
"@types/zen-observable": "^0.5.3", | ||
"browserify": "14.4.0", | ||
"graphql": "^0.11.3", | ||
"graphql-tag": "2.4.2", | ||
@@ -56,3 +60,3 @@ "jest": "21.2.1", | ||
"rollup": "0.45.2", | ||
"ts-jest": "21.0.1", | ||
"ts-jest": "21.1.2", | ||
"tslint": "5.7.0", | ||
@@ -59,0 +63,0 @@ "typescript": "2.5.1", |
@@ -1,2 +0,2 @@ | ||
import Observable from 'zen-observable-ts'; | ||
import * as Observable from 'zen-observable'; | ||
import gql from 'graphql-tag'; | ||
@@ -3,0 +3,0 @@ import { print } from 'graphql/language/printer'; |
import * as LinkUtils from '../linkUtils'; | ||
import Observable from 'zen-observable-ts'; | ||
import * as Observable from 'zen-observable'; | ||
@@ -4,0 +4,0 @@ describe('Link utilities:', () => { |
@@ -5,5 +5,4 @@ export * from './link'; | ||
import Observable from 'zen-observable-ts'; | ||
export * from 'zen-observable-ts'; | ||
import * as Observable from 'zen-observable'; | ||
export { Observable }; |
@@ -1,2 +0,2 @@ | ||
import Observable from 'zen-observable-ts'; | ||
import * as Observable from 'zen-observable'; | ||
@@ -3,0 +3,0 @@ import { |
import { getOperationName } from 'apollo-utilities'; | ||
import Observable from 'zen-observable-ts'; | ||
import * as Observable from 'zen-observable'; | ||
import { print } from 'graphql/language/printer'; | ||
@@ -4,0 +4,0 @@ |
import { Operation, RequestHandler, NextLink, FetchResult } from '../types'; | ||
import Observable from 'zen-observable-ts'; | ||
import * as Observable from 'zen-observable'; | ||
@@ -5,0 +5,0 @@ import { ApolloLink } from '../link'; |
import { Operation, NextLink, FetchResult } from '../types'; | ||
import Observable from 'zen-observable-ts'; | ||
import * as Observable from 'zen-observable'; | ||
@@ -5,0 +5,0 @@ import { ApolloLink } from '../link'; |
@@ -1,2 +0,2 @@ | ||
import Observable from 'zen-observable-ts'; | ||
import * as Observable from 'zen-observable'; | ||
import { ExecutionResult, DocumentNode } from 'graphql'; | ||
@@ -3,0 +3,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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
86139
13
+ Addedzen-observable@^0.6.0
+ Addedzen-observable@0.6.1(transitive)
- Removedgraphql@^0.11.3
- Removedzen-observable-ts@^0.5.0
- Removedzen-observable-ts@0.5.0(transitive)