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
+ export type InputProps = { | |
+ episode: string, | |
+ }; | |
+ export const withCharacter = graphql<Response, InputProps>(HERO_QUERY, { | |
- export const withCharacter = graphql<Response>(HERO_QUERY, { | |
+ options: ({ episode }) => ({ | |
+ variables: { episode }, | |
- options: () => ({ | |
- variables: { episode: "JEDI" }, |
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 from "react"; | |
import ApolloClient, { createNetworkInterface } from "apollo-client"; | |
import { ApolloProvider } from "react-apollo"; | |
import Character from "./Character"; | |
export const networkInterface = createNetworkInterface({ | |
uri: "https://mpjk0plp9.lp.gql.zone/graphql", | |
}); | |
export const client = new ApolloClient({ networkInterface }); |
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
export const withCharacter: OperationComponent<Response, InputProps> = graphql(HERO_QUERY, { | |
options: ({ episode }) => ({ | |
// Operator '>' cannot be applied to types 'string' and 'number'. | |
variables: { episode: episode > 1 }, | |
}) | |
}); |
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 { QueryProps } from "react-apollo"; | |
+ export type Props = Response & QueryProps; | |
+ export const withCharacter = graphql<Response, InputProps, Props>(HERO_QUERY, { | |
- export const withCharacter = graphql<Response, InputProps>(HERO_QUERY, { | |
options: ({ episode }) => ({ | |
variables: { episode }, | |
}), | |
+ props: ({ data }) => ({ ...data }), |
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
export const withCharacter = graphql<Response, InputProps, Props>(HERO_QUERY, { | |
options: ({ episode }) => ({ | |
variables: { episode }, | |
}), | |
props: ({ data, ownProps }) => ({ | |
...data, | |
// Operator '>' cannot be applied to types 'string' and 'number'. | |
episode: ownProps.episode > 1, | |
// Property 'isHero' does not exist on type 'Hero'. | |
isHero: data && data.hero && data.hero.isHero, |
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
Plugin 'VundleVim/Vundle.vim' | |
Plugin 'airblade/vim-gitgutter' | |
Plugin 'vim-airline/vim-airline' | |
Plugin 'vim-airline/vim-airline-themes' | |
Plugin 'austintaylor/vim-indentobject' | |
Plugin 'ctrlpvim/ctrlp.vim' | |
Plugin 'rking/ag.vim' | |
Plugin 'garbas/vim-snipmate' | |
Plugin 'marcweber/vim-addon-mw-utils' | |
Plugin 'tomtom/tlib_vim' |
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
set nocompatible | |
syntax enable | |
colorscheme norma | |
let g:airline_theme='bubblegum' | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() |
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
" =============================================================== | |
" norma | |
" | |
" URL: | |
" Author: jbaxleyiii | |
" License: MIT | |
" Last Change: 2016/11/03 00:26 | |
" =============================================================== | |
let g:colors_name="norma" |
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
# rebind prefix key | |
unbind C-b | |
set-option -g prefix C-a | |
bind-key C-a send-prefix | |
bind R source-file /home/jbaxleyiii/.tmux.conf \; display-message "tmux.conf reloaded" | |
set -g default-terminal "xterm-256color" |
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 { HERO_QUERY, withCharacter, Character, App } from '../App'; | |
import { | |
empty, | |
hero_no_friends, | |
empty_array_friends, | |
friend_without_appearsIn, | |
} from './__mocks__/data'; | |
// const mock = (hoc, props) => { |