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

react-apollo

Package Overview
Dependencies
Maintainers
1
Versions
220
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-apollo - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

6

Changelog.md

@@ -7,2 +7,8 @@ # Change log

### 1.1.0
- Pass cached data to the child component along with the error. [PR #548](https://github.com/apollographql/react-apollo/pull/548)
- Fix version lock down for peer dependency version of React. [PR #626](https://github.com/apollographql/react-apollo/pull/626)
- Switch `graphql-tag` dependency to `2.0.0`. This isn't really a breaking change because we only export `gql` from `react-apollo`.
- Fix: convert deprecated `React.PropTypes` to `PropTypes` provided by the `prop-types` package. [PR #628](https://github.com/apollographql/react-apollo/pull/628)
### 1.0.2

@@ -9,0 +15,0 @@ - Exposed `createBatchingNetworkInterface` from apollo-client so that it can be imported from react-apollo just like `createNetworkInterface`. [PR #618](https://github.com/apollographql/react-apollo/pull/618)

14

lib/ApolloProvider.d.ts

@@ -13,13 +13,13 @@ /// <reference types="react" />

static propTypes: {
store: React.Requireable<any>;
client: React.Validator<any>;
immutable: React.Requireable<any>;
children: React.Validator<any>;
store: any;
client: any;
immutable: any;
children: any;
};
static childContextTypes: {
store: React.Requireable<any>;
client: React.Validator<any>;
store: any;
client: any;
};
static contextTypes: {
store: React.Requireable<any>;
store: any;
};

@@ -26,0 +26,0 @@ constructor(props: any, context: any);

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

var React = require("react");
var PropTypes = require("prop-types");
var react_1 = require("react");

@@ -50,19 +51,19 @@ var invariant = require("invariant");

ApolloProvider.propTypes = {
store: react_1.PropTypes.shape({
subscribe: react_1.PropTypes.func.isRequired,
dispatch: react_1.PropTypes.func.isRequired,
getState: react_1.PropTypes.func.isRequired,
store: PropTypes.shape({
subscribe: PropTypes.func.isRequired,
dispatch: PropTypes.func.isRequired,
getState: PropTypes.func.isRequired,
}),
client: react_1.PropTypes.object.isRequired,
immutable: react_1.PropTypes.bool,
children: react_1.PropTypes.element.isRequired,
client: PropTypes.object.isRequired,
immutable: PropTypes.bool,
children: PropTypes.element.isRequired,
};
ApolloProvider.childContextTypes = {
store: react_1.PropTypes.object,
client: react_1.PropTypes.object.isRequired,
store: PropTypes.object,
client: PropTypes.object.isRequired,
};
ApolloProvider.contextTypes = {
store: react_1.PropTypes.object,
store: PropTypes.object,
};
exports.default = ApolloProvider;
//# sourceMappingURL=ApolloProvider.js.map

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

var react_1 = require("react");
var PropTypes = require("prop-types");
var pick = require("lodash.pick");

@@ -74,3 +75,3 @@ var shallowEqual_1 = require("./shallowEqual");

WithApollo.WrappedComponent = WrappedComponent;
WithApollo.contextTypes = { client: react_1.PropTypes.object.isRequired };
WithApollo.contextTypes = { client: PropTypes.object.isRequired };
return hoistNonReactStatics(WithApollo, WrappedComponent, {});

@@ -362,2 +363,5 @@ }

}
else if (error_1) {
assign(data, (this.queryObservable.getLastResult() || {}).data);
}
else {

@@ -392,3 +396,3 @@ assign(data, currentResult.data);

GraphQL.contextTypes = {
client: react_1.PropTypes.object.isRequired,
client: PropTypes.object.isRequired,
};

@@ -395,0 +399,0 @@ return hoistNonReactStatics(GraphQL, WrappedComponent, {});

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

var apollo_client_1 = require("apollo-client");
var bundledPrinter_1 = require("graphql-tag/bundledPrinter");
var graphql_1 = require("graphql");
var ApolloProvider_1 = require("./ApolloProvider");

@@ -98,3 +98,3 @@ var MockedProvider = (function (_super) {

if (!_this.mockedResponsesByKey[key] || _this.mockedResponsesByKey[key].length === 0) {
throw new Error('No more mocked responses for the query: ' + bundledPrinter_1.print(request.query));
throw new Error('No more mocked responses for the query: ' + graphql_1.print(request.query));
}

@@ -177,3 +177,3 @@ var original = _this.mockedResponsesByKey[key].slice();

throw new Error("No more mocked subscription responses for the query: " +
(bundledPrinter_1.print(subscription.request.query) + ", variables: " + JSON.stringify(subscription.request.variables)));
(graphql_1.print(subscription.request.query) + ", variables: " + JSON.stringify(subscription.request.variables)));
}

@@ -196,3 +196,3 @@ var response_1 = subscription.results.shift();

function requestToKey(request) {
var queryString = request.query && bundledPrinter_1.print(request.query);
var queryString = request.query && graphql_1.print(request.query);
return JSON.stringify({

@@ -199,0 +199,0 @@ variables: request.variables || {},

{
"name": "react-apollo",
"version": "1.0.2",
"version": "1.1.0",
"description": "React data container for Apollo Client",

@@ -16,4 +16,5 @@ "main": "lib/index.js",

"compile": "tsc",
"compile:browser": "rm -rf ./dist && mkdir ./dist && browserify ./lib/index.js --i react --i apollo-client -o=./dist/index.js && npm run minify:browser",
"compile:browser": "rm -rf ./dist && mkdir ./dist && browserify ./lib/index.js --i react --i apollo-client -o=./dist/index.js && npm run minify:browser && npm run compress:browser",
"minify:browser": "uglifyjs --compress --mangle --screw-ie8 -o=./dist/index.min.js -- ./dist/index.js",
"compress:browser": "./scripts/gzip.js --file=./dist/index.min.js",
"watch": "tsc -w",

@@ -70,3 +71,3 @@ "lint": "tslint 'src/*.ts*' && tslint 'test/*.ts*'"

"peerDependencies": {
"react": "15.5.0",
"react": "0.14.x || 15.* || ^15.0.0",
"redux": "^2.0.0 || ^3.0.0"

@@ -88,3 +89,3 @@ },

"@types/react-addons-test-utils": "^0.14.14",
"@types/react-dom": "^0.14.16",
"@types/react-dom": "^15.5.0",
"@types/react-redux": "^4.4.31",

@@ -101,5 +102,4 @@ "@types/redux-form": "^6.3.2",

"enzyme-to-json": "^1.1.5",
"flow-bin": "^0.43.0",
"flow-bin": "^0.44.0",
"graphql": "^0.9.1",
"gzip-size": "^3.0.0",
"immutable": "^3.8.1",

@@ -115,2 +115,3 @@ "isomorphic-fetch": "^2.2.1",

"pretty-bytes": "^4.0.2",
"prop-types": "^15.5.8",
"react": "^15.5.4",

@@ -139,3 +140,3 @@ "react-addons-test-utils": "^15.5.1",

"graphql-anywhere": "^3.0.0",
"graphql-tag": "^1.3.1",
"graphql-tag": "^2.0.0",
"hoist-non-react-statics": "^1.2.0",

@@ -142,0 +143,0 @@ "invariant": "^2.2.1",

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

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