Skip to content

Commit 0b2e8df

Browse files
committed
Updated Apollo to version 2.0.0
1 parent f054285 commit 0b2e8df

30 files changed

+136
-128
lines changed

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
"graphql"
3131
],
3232
"dependencies": {
33+
"apollo-cache-inmemory": "^1.0.0",
34+
"apollo-client": "^2.0.1",
35+
"apollo-link-http": "^1.0.0",
3336
"apollo-server-express": "^1.1.2",
3437
"babel-runtime": "^6.26.0",
3538
"body-parser": "^1.17.2",
@@ -41,6 +44,7 @@
4144
"express-session": "^1.15.5",
4245
"firebase": "^4.3.1",
4346
"graphql": "^0.10.5",
47+
"graphql-tag": "^2.5.0",
4448
"graphql-tools": "^1.2.1",
4549
"isomorphic-fetch": "^2.2.1",
4650
"lru-cache": "^4.1.1",
@@ -49,7 +53,7 @@
4953
"passport-local": "^1.0.0",
5054
"prop-types": "^15.5.10",
5155
"react": "^16.0.0",
52-
"react-apollo": "^1.4.15",
56+
"react-apollo": "^2.0.0",
5357
"react-dom": "^16.0.0",
5458
"react-redux": "^5.0.6",
5559
"react-render-html": "^0.5.1",

src/components/container/NewsFeedWithApolloRenderer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
44
import NewsFeed from '../presentational/NewsFeed';
55
import LoadingSpinner from '../presentational/LoadingSpinner';
66

7-
export default ({ data: { loading, error, feed }, options }) => {
7+
export default ({ data: { loading, error, feed }, data, options }) => {
88
if (error) return <tr><td>Error loading news items.</td></tr>;
99
if (feed && feed.length) return <NewsFeed newsItems={feed} {...options} />;
1010
return <LoadingSpinner />;

src/components/presentational/Comment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import PropTypes from 'prop-types';
3-
import { gql } from 'react-apollo';
3+
import gql from 'graphql-tag';
44
import Link from 'next/link';
55
import renderHTML from 'react-render-html';
66

src/components/presentational/Comments.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import PropTypes from 'prop-types';
3-
import { gql } from 'react-apollo';
3+
import gql from 'graphql-tag';
44

55
import Comment from './Comment';
66

src/components/presentational/NewsDetail.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { Component } from 'react';
2-
import { gql, graphql } from 'react-apollo';
2+
import gql from 'graphql-tag';
33
import Link from 'next/link';
44
import PropTypes from 'prop-types';
55
import url from 'url';

src/components/presentational/NewsFeed.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import PropTypes from 'prop-types';
3-
import { gql } from 'react-apollo';
3+
import gql from 'graphql-tag';
44

55
import NewsTitle from '../container/NewsTitleWithData';
66
import NewsDetail from '../container/NewsDetailWithData';

src/components/presentational/NewsTitle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { Component } from 'react';
2-
import { gql } from 'react-apollo';
2+
import gql from 'graphql-tag';
33
import Link from 'next/link';
44
import PropTypes from 'prop-types';
55
import url from 'url';

src/data/mutations/hideNewsItem.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { gql } from 'react-apollo';
1+
import gql from 'graphql-tag';
22

33
export default gql`
44
mutation HideNewsItem($id: Int!) {

src/data/mutations/submitNewsItem.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { gql } from 'react-apollo';
1+
import gql from 'graphql-tag';
22
import NewsFeed from '../../components/presentational/NewsFeed';
33

44
export default gql`

src/data/mutations/upvoteNewsItem.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { gql } from 'react-apollo';
1+
import gql from 'graphql-tag';
22

33
export default gql`
44
mutation UpvoteNewsItem($id: Int!) {

0 commit comments

Comments
 (0)