import { GraphQLObjectType, GraphQLInt } from 'graphql';

import { Account, AccountFields } from '../interface/Account';

export const Host = new GraphQLObjectType({
  name: 'Host',
  description: 'This represents an Host account',
  interfaces: () => [Account],
  fields: () => {
    return {
      ...AccountFields,
      totalHostedCollectives: {
        type: GraphQLInt,
        resolve(collective) {
          return collective.getHostedCollectivesCount();
        },
      },
    };
  },
});

@@ -311,16 +311,160 @@
 Fields,%0A
+      hostFeePercent: %7B%0A        type: GraphQLInt,%0A        resolve(collective) %7B%0A          return collective.hostFeePercent;%0A        %7D,%0A      %7D,%0A
       to

add hostFeePercent to graphql v2 host