Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { USER_INFOMATION_QUERY, USER_NOTIFICATION_QUERY, USER_INFOMATION_MUTATION } from './user.graphql'
- import { graphql, compose } from 'react-apollo'
- import UserInfomationComponent from './user.component'
- // need to defined shape of
- // prop types from enhanced component
- type UserInfomationContainerPropTypes = {
- userId: string
- }
- export default compose(
- graphql<any,any,any,any>(USER_INFOMATION_QUERY, {
- props: ({ }) =>{
- return {
- }
- }
- }),
- // over here, it need to merge result type from type above to prop type of current HOC
- graphql<any,any,any,any>(USER_NOTIFICATION_QUERY, {
- }),
- ... Dont give a F about hoc type anymore
- )(UserInfomationComponent) as React.SFC<UserInfomationContainerPropTypes>
Add Comment
Please, Sign In to add comment