fragment ProposalFields on Proposal {
  id
  rationale {
    title
    description
  }
  reference
  state
  datetime
  rejectionReason
  party {
    id
  }
  errorDetails
  terms {
    closingDatetime
    enactmentDatetime
    change {
      ... on NewMarket {
        instrument {
          name
          code
          futureProduct {
            settlementAsset {
              symbol
            }
          }
        }
      }
      ... on UpdateMarket {
        marketId
      }
      ... on NewAsset {
        __typename
        name
        symbol
        decimals
        quantum
        source {
          ... on BuiltinAsset {
            maxFaucetAmountMint
          }
          ... on ERC20 {
            contractAddress
            withdrawThreshold
            lifetimeLimit
          }
        }
      }
      ... on UpdateNetworkParameter {
        networkParameter {
          key
          value
        }
      }
      ... on UpdateAsset {
        quantum
        assetId
        source {
          ... on UpdateERC20 {
            lifetimeLimit
            withdrawThreshold
          }
        }
      }
    }
  }
  votes {
    yes {
      totalTokens
      totalNumber
      totalEquityLikeShareWeight
    }
    no {
      totalTokens
      totalNumber
      totalEquityLikeShareWeight
    }
  }
}

query Proposals {
  proposalsConnection {
    edges {
      node {
        ...ProposalFields
      }
    }
  }
}
