Allow passing custom fragments to withReaction and withTag

This commit is contained in:
Chi Vinh Le
2017-08-18 22:19:03 +07:00
parent 0cbf6e24f7
commit b8452b535b
4 changed files with 44 additions and 10 deletions
@@ -31,7 +31,6 @@ export default withFragments({
name
}
}
user {
id
username
@@ -1,5 +1,16 @@
import ModTag from '../components/ModTag';
import {withTags} from 'plugin-api/beta/client/hocs';
import {gql} from 'react-apollo';
export default withTags('featured')(ModTag);
const fragments = {
comment: gql`
fragment TalkFeaturedComments_ModTag_comment on Comment {
user {
username
}
}
`
};
export default withTags('featured', {fragments})(ModTag);