This file contains hidden or 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
... | |
static public AuthComponent plusAuthComponent() { | |
if (sAuthComponent == null) { | |
sAuthComponent = sAppComponent.plusAuthComponent(); | |
} | |
return sAuthComponent; | |
} | |
... |
This file contains hidden or 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 { ApolloClient } from 'apollo-client'; | |
import { withClientState } from 'apollo-link-state'; | |
import { InMemoryCache } from 'apollo-cache-inmemory'; | |
import { ApolloProvider } from 'react-apollo'; | |
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import defaults from './graphql/defaults'; | |
import resolvers from './graphql/resolvers'; | |
import typeDefs from './graphql/typeDefs'; | |
import './index.css'; |
This file contains hidden or 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
export default {}; |
This file contains hidden or 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
export default { | |
counter: 0, | |
}; |
This file contains hidden or 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
export default ` | |
type Query { | |
counter: Int | |
} | |
`; |
This file contains hidden or 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
... | |
<p className="App-intro"> | |
To get started, edit <code>src/App.js</code> and save to reload. | |
</p> | |
<Counter /> | |
</div> | |
... |
This file contains hidden or 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 { PropTypes } from 'prop-types'; | |
import React from 'react'; | |
import { Query } from 'react-apollo'; | |
const CounterView = ({ counter }) => ( | |
<div>{counter}</div> | |
); | |
CounterView.propTypes = { |
This file contains hidden or 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 { PropTypes } from 'prop-types'; | |
import React from 'react'; | |
import { Query } from 'react-apollo'; | |
const CounterView = ({ counter, onDecrement, onIncrement }) => ( | |
<div> | |
<div>{counter}</div> | |
<button onClick={onDecrement}>-</button> | |
<button onClick={onIncrement}>+</button> |
This file contains hidden or 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
export default ` | |
type Query { | |
counter: Int | |
} | |
type Mutation { | |
decrementCounter(unused: Boolean): Int | |
incrementCounter(unused: Boolean): Int | |
} | |
`; |
This file contains hidden or 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'; | |
const query = gql` | |
{ | |
counter @client | |
} | |
`; | |
export default { | |
Mutation: { |