Last active
November 30, 2016 19:56
-
-
Save dustinfarris/de3a019616b366d610e794a302883dfd to your computer and use it in GitHub Desktop.
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 Ember from 'ember'; | |
import hbs from 'htmlbars-inline-precompile'; | |
import connect from 'ember-redux/components/connect'; | |
import { cashay } from 'cashay'; | |
const capitalsQuery = ` | |
{ | |
missouriCapital: capital(state: MISSOURI) { | |
name | |
size(unit: SQ_MI) | |
} | |
newYorkCapital: capital(state: NEW_YORK) { | |
name | |
size(unit: SQ_KM) | |
} | |
}`; | |
const stateToComputed = () => { | |
const { | |
data: { missouriCapital, newYorkCapital } | |
} = cashay.query(capitalsQuery); | |
return { missouriCapital, newYorkCapital }; | |
}; | |
export default connect(stateToComputed)(Ember.Component); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment