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

react-apollo

Package Overview
Dependencies
Maintainers
5
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 0.12.0 to 0.13.0

5

Changelog.md

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

### 0.13.0
- Make apollo-client and graphql-tag dependencies and re-export them from this package [PR #490](https://github.com/apollographql/react-apollo/pull/490)
- Print errors to console if they are not handled by component [PR #476](https://github.com/apollographql/react-apollo/pull/476)
### 0.12.0

@@ -9,0 +14,0 @@ - Update Apollo Client to 0.9.0 and bump a lot of other dependencies [PR #484](https://github.com/apollographql/react-apollo/pull/484)

1

lib/graphql.d.ts
/// <reference types="react" />
/// <reference types="graphql" />
import { ComponentClass, StatelessComponent } from 'react';

@@ -4,0 +3,0 @@ import { MutationQueryReducersMap, ApolloQueryResult, ApolloError } from 'apollo-client';

@@ -322,4 +322,17 @@ "use strict";

var currentResult = this.queryObservable.currentResult();
var loading = currentResult.loading, error = currentResult.error, networkStatus = currentResult.networkStatus;
assign(data, { loading: loading, error: error, networkStatus: networkStatus });
var loading = currentResult.loading, error_1 = currentResult.error, networkStatus = currentResult.networkStatus;
assign(data, { loading: loading, networkStatus: networkStatus });
var logErrorTimeoutId_1 = setTimeout(function () {
if (error_1) {
console.error('Uncaught (in react-apollo)', error_1.stack || error_1);
}
}, 10);
Object.defineProperty(data, 'error', {
configurable: true,
enumerable: true,
get: function () {
clearTimeout(logErrorTimeoutId_1);
return error_1;
},
});
if (loading) {

@@ -326,0 +339,0 @@ assign(data, this.previousData, currentResult.data);

export * from './browser';
export { getDataFromTree, renderToStringWithData } from './server';
export { default as ApolloClient, createNetworkInterface } from 'apollo-client';
export { default as gql } from 'graphql-tag';

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

exports.renderToStringWithData = server_1.renderToStringWithData;
var apollo_client_1 = require("apollo-client");
exports.ApolloClient = apollo_client_1.default;
exports.createNetworkInterface = apollo_client_1.createNetworkInterface;
var graphql_tag_1 = require("graphql-tag");
exports.gql = graphql_tag_1.default;
//# sourceMappingURL=index.js.map

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

/// <reference types="graphql" />
import { DocumentNode, VariableDefinitionNode } from 'graphql';

@@ -3,0 +2,0 @@ export declare enum DocumentType {

/// <reference types="react" />
/// <reference types="graphql" />
import * as React from 'react';

@@ -4,0 +3,0 @@ import { NetworkInterface, Request, SubscriptionNetworkInterface } from 'apollo-client/transport/networkInterface';

@@ -70,2 +70,5 @@ "use strict";

mockedResponses.forEach(function (mockedResponse) {
if (!mockedResponse.result && !mockedResponse.error) {
throw new Error('Mocked response should contain either result or error.');
}
_this.addMockedReponse(mockedResponse);

@@ -92,3 +95,3 @@ });

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

@@ -193,3 +196,3 @@ }

return JSON.stringify({
variables: request.variables,
variables: request.variables || {},
debugName: request.debugName,

@@ -196,0 +199,0 @@ query: queryString,

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

@@ -68,3 +68,2 @@ "main": "lib/index.js",

"peerDependencies": {
"apollo-client": "^0.8.0",
"react": "0.14.x || 15.* || ^15.0.0",

@@ -92,3 +91,2 @@ "redux": "^2.0.0 || ^3.0.0"

"@types/sinon": "^1.16.29",
"apollo-client": "^0.9.0",
"babel-jest": "^19.0.0",

@@ -103,3 +101,2 @@ "babel-preset-react-native": "^1.9.0",

"graphql": "^0.9.1",
"graphql-tag": "^1.2.4",
"gzip-size": "^3.0.0",

@@ -113,4 +110,4 @@ "immutable": "^3.8.1",

"minimist": "^1.2.0",
"mobx": "^2.4.2",
"mobx-react": "^3.5.4",
"mobx": "^3.1.0",
"mobx-react": "^4.1.0",
"pretty-bytes": "^4.0.2",

@@ -138,3 +135,5 @@ "react": "15.4.2",

"dependencies": {
"apollo-client": "^0.9.0",
"graphql-anywhere": "^2.0.0",
"graphql-tag": "^1.2.4",
"hoist-non-react-statics": "^1.2.0",

@@ -141,0 +140,0 @@ "invariant": "^2.2.1",

export * from './browser';
export { getDataFromTree, renderToStringWithData } from './server';
export { default as ApolloClient, createNetworkInterface } from 'apollo-client';
export { default as 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

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