Type 'QueryProps' has no property and no string index signature

Viewed 1174

I am using react-apollo@1.4.2 and TypeScript@2.3.4 and I have received this as an error of my below code:

export default graphql(PROFILE_QUERY, {
  options: {
    fetchPolicy: 'cache-and-network',
  },
  props: ({ data: { loading, currentUser } }) => ({
    loading,
    currentUser,
  }),
})(User);

And the component is declared like this:

export interface IUserProps {
  loading: boolean;
  currentUser: {
    login: string;
  };
}
class User extends React.Component<IUserProps, any> {

0 Answers
Related