query EndorsementList(
  $first: Int
  $last: Int
  $before: String
  $after: String
  $assertionId: Int
  $sortBy: DateSort
) {
  endorsements(
    first: $first
    last: $last
    before: $before
    after: $after
    endorsedAssertionId: $assertionId
    sortBy: $sortBy
  ) {
    totalCount
    pageInfo {
      startCursor
      endCursor
      hasPreviousPage
      hasNextPage
    }
#    edges {
#      cursor
#      node {
#        ...endorsementListNode
#      }
#    }
    nodes {
      ...endorsementListNode
    }
  }
}

fragment endorsementListNode on Endorsement {
  id
  status
  lastReviewed
  updatedAt
  assertion {
    id
    name
    status
    flags(state: OPEN) {
      totalCount
    }
  }
  organization {
    id
    name
    profileImagePath(size: 64)
  }
  user {
    id
    displayName
    role
    profileImagePath(size: 32)
  }
  revocationActivity {
    ...RevokeEndorsementActivityDetail
    note
  }
  endorsementActivity {
    ...EndorseAssertionActivityDetail
    note
  }
}
