mirror of
https://github.com/wassname/talk.git
synced 2026-08-18 12:30:39 +08:00
16 lines
491 B
JavaScript
16 lines
491 B
JavaScript
import React from 'react';
|
|
import {getDisplayName} from 'recompose';
|
|
|
|
// TODO: revisit `filtering` after https://github.com/apollographql/graphql-anywhere/issues/38.
|
|
|
|
export default fragments => WrappedComponent => {
|
|
class WithFragments extends React.Component {
|
|
render() {
|
|
return <WrappedComponent {...this.props} />;
|
|
}
|
|
}
|
|
WithFragments.fragments = fragments;
|
|
WithFragments.displayName = `WithFragments(${getDisplayName(WrappedComponent)})`;
|
|
return WithFragments;
|
|
};
|