fragment WalletDelegationFields on Delegation {
  amount
  node {
    id
    name
  }
  epoch
}

query Delegations($partyId: ID!, $delegationsPagination: Pagination) {
  epoch {
    id
  }
  party(id: $partyId) {
    id
    delegationsConnection(pagination: $delegationsPagination) {
      edges {
        node {
          ...WalletDelegationFields
        }
      }
    }
    stakingSummary {
      currentStakeAvailable
    }
    accountsConnection {
      edges {
        node {
          asset {
            name
            id
            decimals
            symbol
            source {
              __typename
              ... on ERC20 {
                contractAddress
              }
            }
          }
          type
          balance
        }
      }
    }
  }
}
