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
<link rel="preload" as="font" type="font/woff2" href="fonts/font.woff2" crossorigin="anonymous"> |
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
/* | |
* "InuFont" licensed under the SIL Open Font License | |
* https://www.hogehoge.com/(配布元のURL) | |
*/ | |
@font-face { | |
font-family: 'Fuga'; | |
src: url('Fuga.woff2') format('woff2'); | |
font-weight: normal; | |
font-style: normal; | |
} |
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
/* | |
* Copyright © [yyyy] [配布者の名前] | |
* http://www.hogehoge.com/(配布元のURL) | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.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
query UserData { | |
me { | |
name | |
friends { | |
name | |
} | |
} | |
} |
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
{ | |
"me": { | |
"name": "takanori", | |
"friends": [ | |
{ | |
"name": "taro" | |
}, | |
{ | |
"name": "noriko" | |
} |
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
import gql from "graphql-tag"; | |
import { Query } from "react-apollo"; | |
const GET_DOGS = gql` | |
{ | |
dogs { | |
id | |
breed | |
} | |
} |
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
<script> | |
window.__APOLLO_STATE__ = client.extract(); | |
</script> |
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
const client = new ApolloClient({ | |
cache: new InMemoryCache().restore(window.__APOLLO_STATE__), | |
link, | |
}); |
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
import { Route, Switch } from 'react-router'; | |
import { Link } from 'react-router-dom'; | |
import React from 'react'; | |
import routes from './routes'; | |
const Layout = () => | |
<div> | |
<nav> | |
<ul> |
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
const withClientOnlyUser = () => ( | |
<Query query={GET_USER_WITH_ID} ssr={false}> | |
{({ data }) => <span>I won't be run on the server</span>} | |
</Query> | |
); |