apollo-link-state
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -5,3 +5,9 @@ # Change log | ||
### 0.1.0 | ||
### 0.0.3 | ||
- fix mutation of operation breaking context access | ||
### 0.0.2 | ||
- ensure source data is passed to resolvers | ||
### 0.0.1 | ||
- initial release |
@@ -24,10 +24,2 @@ (function (global, factory) { | ||
var __assign = (undefined && undefined.__assign) || Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
var capitalizeFirstLetter = function (str) { return str.charAt(0).toUpperCase() + str.slice(1); }; | ||
@@ -43,5 +35,5 @@ var withClientState = function (resolvers) { | ||
return new apolloLink.Observable(function (observer) { | ||
var obs = server | ||
? forward(__assign({}, operation, { query: server })) | ||
: apolloLink.Observable.of({ data: {} }); | ||
if (server) | ||
operation.query = server; | ||
var obs = server ? forward(operation) : apolloLink.Observable.of({ data: {} }); | ||
var sub = obs.subscribe({ | ||
@@ -48,0 +40,0 @@ next: function (_a) { |
@@ -1,9 +0,1 @@ | ||
var __assign = (this && this.__assign) || Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
import { ApolloLink, Observable } from 'apollo-link'; | ||
@@ -23,5 +15,5 @@ import { hasDirectives, getMainDefinition } from 'apollo-utilities'; | ||
return new Observable(function (observer) { | ||
var obs = server | ||
? forward(__assign({}, operation, { query: server })) | ||
: Observable.of({ data: {} }); | ||
if (server) | ||
operation.query = server; | ||
var obs = server ? forward(operation) : Observable.of({ data: {} }); | ||
var sub = obs.subscribe({ | ||
@@ -28,0 +20,0 @@ next: function (_a) { |
{ | ||
"name": "apollo-link-state", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "An easy way to manage local state with Apollo Link", | ||
@@ -5,0 +5,0 @@ "author": "James Baxley <james@meteor.com>", |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
35014
257