function removeTypename(payload: any): any {
  if (isPlainObject(payload)) {
    const newPayload = {...payload};
    delete newPayload.__typename;
    return mapValues(newPayload, value => removeTypename(value));
  } else if (Array.isArray(payload)) {
    return payload.map(item => removeTypename(item));
  }
  return payload;
}
add typename: null in every object