query Proposal($proposalId: ID!) {
  proposal(id: $proposalId) {
    id
    rationale {
      title
      description
    }
    reference
    state
    datetime
    rejectionReason
    party {
      id
    }
    errorDetails
    terms {
      closingDatetime
      enactmentDatetime
      change {
        ... on NewMarket {
          decimalPlaces
          metadata
          lpPriceRange
          riskParameters {
            ... on LogNormalRiskModel {
              riskAversionParameter
              tau
              params {
                mu
                r
                sigma
              }
            }
            ... on SimpleRiskModel {
              params {
                factorLong
                factorShort
              }
            }
          }
          instrument {
            name
            code
            futureProduct {
              settlementAsset {
                id
                name
                symbol
                decimals
                quantum
              }
              quoteName

              dataSourceSpecForSettlementData {
                sourceType {
                  ... on DataSourceDefinitionInternal {
                    sourceType {
                      ... on DataSourceSpecConfigurationTime {
                        conditions {
                          operator
                          value
                        }
                      }
                    }
                  }
                  ... on DataSourceDefinitionExternal {
                    sourceType {
                      ... on DataSourceSpecConfiguration {
                        signers {
                          signer {
                            ... on PubKey {
                              key
                            }
                            ... on ETHAddress {
                              address
                            }
                          }
                        }
                        filters {
                          key {
                            name
                            type
                          }
                          conditions {
                            operator
                            value
                          }
                        }
                      }
                    }
                  }
                }
              }
              dataSourceSpecForTradingTermination {
                sourceType {
                  ... on DataSourceDefinitionInternal {
                    sourceType {
                      ... on DataSourceSpecConfigurationTime {
                        conditions {
                          operator
                          value
                        }
                      }
                    }
                  }
                  ... on DataSourceDefinitionExternal {
                    sourceType {
                      ... on DataSourceSpecConfiguration {
                        signers {
                          signer {
                            ... on PubKey {
                              key
                            }
                            ... on ETHAddress {
                              address
                            }
                          }
                        }
                        filters {
                          key {
                            name
                            type
                          }
                          conditions {
                            operator
                            value
                          }
                        }
                      }
                    }
                  }
                }
              }
              dataSourceSpecBinding {
                settlementDataProperty
                tradingTerminationProperty
              }
            }
          }
          priceMonitoringParameters {
            triggers {
              horizonSecs
              probability
              auctionExtensionSecs
            }
          }
          liquidityMonitoringParameters {
            triggeringRatio
            targetStakeParameters {
              timeWindow
              scalingFactor
            }
          }
          positionDecimalPlaces
          lpPriceRange
          linearSlippageFactor
          quadraticSlippageFactor
        }
        ... on UpdateMarket {
          marketId
          updateMarketConfiguration {
            instrument {
              code
              product {
                quoteName
                dataSourceSpecForSettlementData {
                  sourceType {
                    ... on DataSourceDefinitionInternal {
                      sourceType {
                        ... on DataSourceSpecConfigurationTime {
                          conditions {
                            operator
                            value
                          }
                        }
                      }
                    }
                    ... on DataSourceDefinitionExternal {
                      sourceType {
                        ... on DataSourceSpecConfiguration {
                          signers {
                            signer {
                              ... on PubKey {
                                key
                              }
                              ... on ETHAddress {
                                address
                              }
                            }
                          }
                          filters {
                            key {
                              name
                              type
                            }
                            conditions {
                              operator
                              value
                            }
                          }
                        }
                      }
                    }
                  }
                }
                dataSourceSpecForTradingTermination {
                  sourceType {
                    ... on DataSourceDefinitionInternal {
                      sourceType {
                        ... on DataSourceSpecConfigurationTime {
                          conditions {
                            operator
                            value
                          }
                        }
                      }
                    }
                    ... on DataSourceDefinitionExternal {
                      sourceType {
                        ... on DataSourceSpecConfiguration {
                          signers {
                            signer {
                              ... on PubKey {
                                key
                              }
                              ... on ETHAddress {
                                address
                              }
                            }
                          }
                          filters {
                            key {
                              name
                              type
                            }
                            conditions {
                              operator
                              value
                            }
                          }
                        }
                      }
                    }
                  }
                }
                dataSourceSpecBinding {
                  settlementDataProperty
                  tradingTerminationProperty
                }
              }
            }
            metadata
            priceMonitoringParameters {
              triggers {
                horizonSecs
                probability
                auctionExtensionSecs
              }
            }
            liquidityMonitoringParameters {
              triggeringRatio
              targetStakeParameters {
                timeWindow
                scalingFactor
              }
            }
            riskParameters {
              ... on UpdateMarketSimpleRiskModel {
                simple {
                  factorLong
                  factorShort
                }
              }
              ... on UpdateMarketLogNormalRiskModel {
                logNormal {
                  riskAversionParameter
                  tau
                  params {
                    r
                    sigma
                    mu
                  }
                }
              }
            }
          }
        }
        ... on NewAsset {
          name
          symbol
          decimals
          quantum
          source {
            ... on BuiltinAsset {
              maxFaucetAmountMint
            }
            ... on ERC20 {
              contractAddress
              lifetimeLimit
              withdrawThreshold
            }
          }
        }
        ... on UpdateNetworkParameter {
          networkParameter {
            key
            value
          }
        }
        ... on UpdateAsset {
          quantum
          assetId
          source {
            ... on UpdateERC20 {
              lifetimeLimit
              withdrawThreshold
            }
          }
        }
      }
    }
    votes {
      yes {
        totalTokens
        totalNumber
        totalEquityLikeShareWeight
      }
      no {
        totalTokens
        totalNumber
        totalEquityLikeShareWeight
      }
    }
  }
}
