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
{ | |
// Fonts | |
"editor.fontSize": 16, | |
"editor.lineHeight": 22, | |
"editor.fontFamily": "Fira Code", | |
"editor.fontLigatures": true, | |
"editor.letterSpacing": 0.5, | |
"editor.fontWeight": "400", | |
// Prettier | |
"editor.formatOnSave": 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
module.exports = { | |
extends: ["airbnb", "prettier", "prettier/react"], | |
parser: "babel-eslint", | |
parserOptions: { | |
ecmaVersion: 8, | |
ecmaFeatures: { | |
experimentalObjectRestSpread: true, | |
impliedStrict: true, | |
classes: 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
npm install apollo-boost react-apollo graphql-tag graphql --save |
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 ApolloClient from "apollo-boost"; | |
const client = new ApolloClient({uri: "https://graphql.org/swapi-graphql/"}); |
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 ApolloClient from "apollo-boost"; | |
import { ApolloProvider, ApolloConsumer } from "react-apollo"; | |
const client = new ApolloClient({ | |
uri: "https://www.graphqlhub.com/graphql", | |
connectToDevTools: true | |
}); | |
render() { | |
return ( |
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 { Query } from "react-apollo"; | |
import gql from "graphql-tag"; | |
const query = gql`{ | |
allFilms { | |
films { | |
title | |
episodeID | |
director |
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"; | |
const query = gql`{ | |
allFilms { | |
films { | |
title | |
episodeID | |
director | |
} | |
} |
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 { Mutation } from "react-apollo"; | |
const ADD_FILM = gql` | |
mutation addFilm($title: String!, $episodeId: Int!) { | |
addFilm(title: $title, episodeId, $episodeId) { | |
eposideId | |
} | |
} | |
`; |
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 React, { Component } from 'react'; | |
import { View, Text } from 'react-native'; | |
export default class App extends Component { | |
render() { | |
return ( | |
<View style={styles.container}> | |
<Text style={styles.hello}>Hello world!</Text> | |
</View> | |
); |
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 styles = StyleSheet.create({ | |
container: { | |
borderRadius: 4, | |
borderWidth: 0.5, | |
borderColor: '#d6d7da', | |
}, | |
title: { | |
fontSize: 19, | |
fontWeight: 'bold', | |
}, |
OlderNewer