-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
868c31c
commit a6ac9f4
Showing
9 changed files
with
45 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"timestamp":1585927005472,"hash":"53260b0eb5ca3cf626e0786300172b67","assets":{"/":{"/static/lato-latin-700-1efbd38aa76ddae2580fedf378276333.woff2":true}}} | ||
{"timestamp":1598194155286,"hash":"9793e6f763870c321663cfe5f7b34b4c","assets":{"/":{"/static/lato-latin-700-1efbd38aa76ddae2580fedf378276333.woff2":true},"/dev-404-page/":{"/static/lato-latin-700-1efbd38aa76ddae2580fedf378276333.woff2":true},"/404/":{"/static/lato-latin-700-1efbd38aa76ddae2580fedf378276333.woff2":true},"/battlefield/":{"/static/lato-latin-700-1efbd38aa76ddae2580fedf378276333.woff2":true,"/static/lato-latin-400-b4d2c4c39853ee244272c04999b230ba.woff2":true},"/fighters/":{"/static/lato-latin-700-1efbd38aa76ddae2580fedf378276333.woff2":true},"/result/":{"/static/lato-latin-700-1efbd38aa76ddae2580fedf378276333.woff2":true},"/404.html":{"/static/lato-latin-700-1efbd38aa76ddae2580fedf378276333.woff2":true}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,7 @@ | |
"version": "1.0.0", | ||
"author": "Henrique Miranda <[email protected]>", | ||
"dependencies": { | ||
"@apollo/react-hooks": "^3.1.4", | ||
"apollo-boost": "^0.4.7", | ||
"@apollo/client": "^3.1.3", | ||
"babel-plugin-polished": "^1.1.0", | ||
"dotenv": "^8.2.0", | ||
"gatsby": "^2.24.47", | ||
|
@@ -30,7 +29,6 @@ | |
"isomorphic-fetch": "^2.2.1", | ||
"polished": "^3.6.5", | ||
"react": "^16.12.0", | ||
"react-apollo": "^3.1.4", | ||
"react-dom": "^16.12.0", | ||
"react-helmet": "^6.1.0", | ||
"react-icons": "^3.11.0", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { | ||
ApolloClient, | ||
ApolloLink, | ||
concat, | ||
HttpLink, | ||
InMemoryCache, | ||
} from '@apollo/client'; | ||
import fetch from 'isomorphic-fetch'; | ||
|
||
const httpLink = new HttpLink({ | ||
uri: 'https://api.github.com/graphql', | ||
fetch, | ||
}); | ||
|
||
/** | ||
* An auth middleware for add the GitHub token on the requests | ||
*/ | ||
const authMiddleware = new ApolloLink((operation, forward) => { | ||
operation.setContext({ | ||
headers: { | ||
authorization: `token ${process.env.GATSBY_GITHUB_TOKEN}`, | ||
}, | ||
}); | ||
|
||
return forward(operation); | ||
}); | ||
|
||
export default new ApolloClient({ | ||
link: concat(authMiddleware, httpLink), | ||
cache: new InMemoryCache(), | ||
}); |
Oops, something went wrong.