Skip to content

Commit ca89e8f

Browse files
authored
Merge pull request #4 from the-road-to-graphql/node-apollo-boost-github-graphql-api-progress
Align with Tutorial
2 parents 92efcab + ed3363c commit ca89e8f

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/index.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ import 'dotenv/config';
22
import 'cross-fetch/polyfill';
33
import ApolloClient, { gql } from 'apollo-boost';
44

5-
let state = {
6-
organization: null,
7-
};
8-
95
const client = new ApolloClient({
106
uri: 'https://api.github.com/graphql',
117
request: operation => {
@@ -17,8 +13,6 @@ const client = new ApolloClient({
1713
},
1814
});
1915

20-
// QUERY
21-
2216
const GET_REPOSITORIES_OF_ORGANIZATION = gql`
2317
query($organization: String!, $cursor: String) {
2418
organization(login: $organization) {
@@ -41,7 +35,6 @@ const GET_REPOSITORIES_OF_ORGANIZATION = gql`
4135
}
4236
}
4337
}
44-
4538
fragment repository on Repository {
4639
name
4740
url
@@ -93,8 +86,6 @@ client
9386
// log error when there is no next page
9487
.catch(console.log);
9588

96-
// MUTATION
97-
9889
const ADD_STAR = gql`
9990
mutation AddStar($repositoryId: ID!) {
10091
addStar(input: { starrableId: $repositoryId }) {

0 commit comments

Comments
 (0)