Skip to content

Commit 2941fe0

Browse files
committed
minor improvements
1 parent 466a03b commit 2941fe0

File tree

6 files changed

+11
-10
lines changed

6 files changed

+11
-10
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ cd react-apollo
1515

1616
```sh
1717
cd server
18+
yarn install
1819
prisma deploy
1920
```
2021

@@ -65,14 +66,16 @@ Note that the part `public-hillcloak-flier-952361` of the URL is unique to your
6566
To start the server, all you need to do is execute the `start` script by running the following command inside the `server` directory:
6667

6768
```sh
69+
yarn install
6870
yarn start
6971
```
7072

7173
### 5. Run the app
7274

73-
Now that the server is running, you can run the app as well:
75+
Now that the server is running, you can run the app as well (the command needs to be run in a new terminal tab/window inside the root directory `react-apollo`):
7476

7577
```sh
76-
cd ..
7778
yarn start
78-
```
79+
```
80+
81+
Open the

server/database/prisma.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ secret: mysecret123
1010

1111
# the file path pointing to your data model
1212
datamodel: datamodel.graphql
13+
14+
cluster: public-puzzlecoyote-wing-957577/prisma-eu1

server/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const server = new GraphQLServer({
1919
...req,
2020
db: new Prisma({
2121
typeDefs: 'src/generated/prisma.graphql',
22-
endpoint: "__PRISMA_ENDPOINT__",
22+
endpoint: "https://eu1.prisma.sh/public-puzzlecoyote-wing-957577/hackernews-graphql-js/dev",
2323
secret: 'mysecret123',
2424
}),
2525
}),

src/components/LinkList.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,6 @@ class LinkList extends Component {
158158
}
159159
`,
160160
updateQuery: (previous, { subscriptionData }) => {
161-
console.log(`NEW VOTE`)
162-
const votedLinkIndex = previous.feed.links.findIndex(
163-
link => link.id === subscriptionData.data.newVote.node.link.id,
164-
)
165161
const newAllLinks = previous.feed.links.slice()
166162
const result = {
167163
...previous,

src/components/Login.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class Login extends Component {
7979
this.props.history.push(`/`)
8080
}
8181

82-
_saveUserData = (id, token) => {
82+
_saveUserData = (token) => {
8383
localStorage.setItem(AUTH_TOKEN, token)
8484
}
8585
}

src/constants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
export const AUTH_TOKEN = 'auth-token'
2-
export const LINKS_PER_PAGE = 100
2+
export const LINKS_PER_PAGE = 5

0 commit comments

Comments
 (0)