Last active
August 30, 2016 22:34
-
-
Save johncmckim/cd7c21551bec2f9c8ef16f08f80a21bc to your computer and use it in GitHub Desktop.
Garden Aid - React - Moisture container
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 { connect } from 'react-apollo'; | |
import MoistureChart from '../../pres/Moisture/Chart'; | |
export default connect({ | |
mapQueriesToProps({ ownProps, state }) { // eslint-disable-line no-unused-vars | |
return { | |
moisture: { | |
query: gql`{ | |
moisture(hours: ${ownProps.hours}, clientId: "${ownProps.clientId}") { | |
date, moisture | |
} | |
}`, | |
variables: {}, | |
pollInterval: 1000 * 30, // 30 seconds | |
}, | |
}; | |
}, | |
})(MoistureChart); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment