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 2.0.0 to 2.0.1

8

ApolloProvider.d.ts
/// <reference types="react" />
import { Component } from 'react';
import ApolloClient from 'apollo-client';
export interface ProviderProps<Cache> {
client: ApolloClient<Cache>;
export interface ProviderProps<TCache> {
client: ApolloClient<TCache>;
}
export default class ApolloProvider extends Component<ProviderProps<Cache>, any> {
export default class ApolloProvider<TCache> extends Component<ProviderProps<TCache>, any> {
static propTypes: {

@@ -17,5 +17,5 @@ client: any;

getChildContext(): {
client: ApolloClient<Cache>;
client: ApolloClient<TCache>;
};
render(): JSX.Element;
}

@@ -18,2 +18,3 @@ import { Children } from 'react';

instance_1.context = instance_1.context || context;
instance_1.state = instance_1.state || null;
instance_1.setState = function (newState) {

@@ -20,0 +21,0 @@ if (typeof newState === 'function') {

@@ -89,2 +89,8 @@ var __extends = (this && this.__extends) || (function () {

GraphQL.prototype.componentWillReceiveProps = function (nextProps, nextContext) {
if (this.shouldSkip(nextProps)) {
if (!this.shouldSkip(this.props)) {
this.unsubscribeFromQuery();
}
return;
}
var client = mapPropsToOptions(nextProps).client;

@@ -124,8 +130,2 @@ if (shallowEqual(this.props, nextProps) &&

}
if (this.shouldSkip(nextProps)) {
if (!this.shouldSkip(this.props)) {
this.unsubscribeFromQuery();
}
return;
}
this.updateQuery(nextProps);

@@ -132,0 +132,0 @@ this.subscribeToQuery();

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

@@ -45,2 +45,3 @@ "main": "react-apollo.umd.js",

"@types/sinon": "2.3.5",
"@types/zen-observable": "^0.5.3",
"apollo-cache-inmemory": "^1.0.0",

@@ -47,0 +48,0 @@ "apollo-client": "^2.0.0",

@@ -279,2 +279,8 @@ (function (global, factory) {

GraphQL.prototype.componentWillReceiveProps = function (nextProps, nextContext) {
if (this.shouldSkip(nextProps)) {
if (!this.shouldSkip(this.props)) {
this.unsubscribeFromQuery();
}
return;
}
var client = mapPropsToOptions(nextProps).client;

@@ -314,8 +320,2 @@ if (shallowEqual(this.props, nextProps) &&

}
if (this.shouldSkip(nextProps)) {
if (!this.shouldSkip(this.props)) {
this.unsubscribeFromQuery();
}
return;
}
this.updateQuery(nextProps);

@@ -684,2 +684,3 @@ this.subscribeToQuery();

instance_1.context = instance_1.context || context;
instance_1.state = instance_1.state || null;
instance_1.setState = function (newState) {

@@ -686,0 +687,0 @@ if (typeof newState === 'function') {

@@ -279,2 +279,8 @@ (function (global, factory) {

GraphQL.prototype.componentWillReceiveProps = function (nextProps, nextContext) {
if (this.shouldSkip(nextProps)) {
if (!this.shouldSkip(this.props)) {
this.unsubscribeFromQuery();
}
return;
}
var client = mapPropsToOptions(nextProps).client;

@@ -314,8 +320,2 @@ if (shallowEqual(this.props, nextProps) &&

}
if (this.shouldSkip(nextProps)) {
if (!this.shouldSkip(this.props)) {
this.unsubscribeFromQuery();
}
return;
}
this.updateQuery(nextProps);

@@ -684,2 +684,3 @@ this.subscribeToQuery();

instance_1.context = instance_1.context || context;
instance_1.state = instance_1.state || null;
instance_1.setState = function (newState) {

@@ -686,0 +687,0 @@ if (typeof newState === 'function') {

@@ -136,2 +136,2 @@ # [React Apollo](http://dev.apollodata.com/react/) [![npm version](https://badge.fury.io/js/react-apollo.svg)](https://badge.fury.io/js/react-apollo) [![Get on Slack](https://img.shields.io/badge/slack-join-orange.svg)](http://www.apollostack.com/#slack)

- [Optimistic UI](http://dev.apollodata.com/react/optimistic-ui.html)
- [Server Side Rendering](http://dev.apollodata.com/react/server-side-rendering.html)
- [Server Side Rendering](https://www.apollographql.com/docs/react/recipes/server-side-rendering.html)

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

import { Operation, GraphQLRequest, ApolloLink, FetchResult } from 'apollo-link';
/// <reference types="zen-observable" />
import { Operation, GraphQLRequest, ApolloLink, FetchResult, Observable } from 'apollo-link';
export interface MockedResponse {

@@ -21,3 +22,3 @@ request: GraphQLRequest;

addMockedResponse(mockedResponse: MockedResponse): void;
request(operation: Operation): any;
request(operation: Operation): Observable<FetchResult<Record<string, any>, Record<string, any>>>;
}

@@ -29,3 +30,3 @@ export declare class MockSubscriptionLink extends ApolloLink {

constructor();
request(): any;
request(): Observable<FetchResult<Record<string, any>, Record<string, any>>>;
simulateResult(result: MockedSubscriptionResult): void;

@@ -32,0 +33,0 @@ onSetup(listener: any): void;

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