Skip to content

Commit

Permalink
chore: update simple example
Browse files Browse the repository at this point in the history
  • Loading branch information
alessbell committed Oct 24, 2022
1 parent 26147d2 commit 663c042
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 15 deletions.
28 changes: 19 additions & 9 deletions examples/simple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,31 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"apollo-cache-inmemory": "1.x",
"apollo-client": "2.x",
"@apollo/client": "3.7.1",
"apollo-link-rest": "0.x",
"graphql": "0.x",
"graphql-tag": "2.x",
"qs": "^6.6.0",
"react": "16.x",
"react-apollo": "2.x",
"react-dom": "16.x",
"react-scripts": "1.x"
"graphql": "16.6.0",
"graphql-tag": "2.12.6",
"qs": "6.11.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-scripts": "5.0.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
4 changes: 1 addition & 3 deletions examples/simple/src/App.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import React, { Component } from 'react';
import { ApolloClient } from 'apollo-client';
import { InMemoryCache } from 'apollo-cache-inmemory';
import { ApolloProvider } from 'react-apollo';
import { ApolloClient, InMemoryCache, ApolloProvider } from '@apollo/client';
import { RestLink } from 'apollo-link-rest';
import Person from './Person';
import './App.css';
Expand Down
2 changes: 1 addition & 1 deletion examples/simple/src/Person.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
import { graphql } from 'react-apollo';
import { graphql } from '@apollo/client/react/hoc';
import gql from 'graphql-tag';

const Query = gql`
Expand Down
6 changes: 4 additions & 2 deletions examples/simple/src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { createRoot } from 'react-dom/client';
import './index.css';
import App from './App';

ReactDOM.render(<App />, document.getElementById('root'));
const container = document.getElementById('root');
const root = createRoot(container);
root.render(<App />);

0 comments on commit 663c042

Please sign in to comment.