Files
talk/plugins/talk-plugin-featured-comments/client/containers/Comment.js
T
Chi Vinh Le b4244b8671 More integration with the introspection query result
- Auto generate introspection on any change when using  `dev-start`
- Port client to use introspection matcher
2017-07-25 16:51:41 +07:00

43 lines
900 B
JavaScript

import {gql} from 'react-apollo';
import Comment from '../components/Comment';
import {withFragments} from 'plugin-api/beta/client/hocs';
import {getSlotFragmentSpreads} from 'plugin-api/beta/client/utils';
const slots = [
'commentReactions',
];
export default withFragments({
root: gql`
fragment TalkFeaturedComments_Comment_root on RootQuery {
__typename
${getSlotFragmentSpreads(slots, 'root')}
}
`,
asset: gql`
fragment TalkFeaturedComments_Comment_asset on Asset {
__typename
${getSlotFragmentSpreads(slots, 'asset')}
}
`,
comment: gql`
fragment TalkFeaturedComments_Comment_comment on Comment {
id
body
created_at
replyCount
tags {
tag {
name
}
}
user {
id
username
}
${getSlotFragmentSpreads(slots, 'comment')}
}
`
})(Comment);