Skip to content

Commit

Permalink
Step 7.2: Provide Apollo client
Browse files Browse the repository at this point in the history
  • Loading branch information
DAB0mB authored and Urigo committed May 20, 2020
1 parent f18e424 commit aa22ee7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"url": "https://github.com/Urigo/WhatsApp-Clone-Client-React.git"
},
"dependencies": {
"@apollo/react-hooks": "3.1.5",
"@material-ui/core": "4.9.14",
"@material-ui/icons": "4.9.1",
"@testing-library/jest-dom": "5.8.0",
Expand All @@ -23,6 +24,8 @@
"apollo-client": "2.6.10",
"apollo-link": "1.2.14",
"apollo-link-http": "1.5.17",
"graphql": "15.0.0",
"graphql-tag": "2.10.3",
"history": "4.10.1",
"jest-environment-jsdom-sixteen": "1.0.3",
"jest-fetch-mock": "3.0.3",
Expand Down
6 changes: 5 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { MuiThemeProvider, createMuiTheme } from '@material-ui/core/styles';
import React from 'react';
import ReactDOM from 'react-dom';
import { ApolloProvider } from '@apollo/react-hooks';
import './index.css';
import App from './App';
import client from './client';
import * as serviceWorker from './serviceWorker';

const theme = createMuiTheme({
Expand All @@ -15,7 +17,9 @@ const theme = createMuiTheme({
ReactDOM.render(
<React.StrictMode>
<MuiThemeProvider theme={theme}>
<App />
<ApolloProvider client={client}>
<App />
</ApolloProvider>
</MuiThemeProvider>
</React.StrictMode>,
document.getElementById('root')
Expand Down

0 comments on commit aa22ee7

Please sign in to comment.