From 5a6e2ec46f97740b60d26a948cc097791353faad Mon Sep 17 00:00:00 2001
From: Sai Kumar <17549398+gsk967@users.noreply.github.com>
Date: Thu, 14 Oct 2021 11:00:39 +0530
Subject: [PATCH] Integrate graphql server (#5)
* WIP: migrating the nameservice module
* WIP: migrating the nameservice module from dxns to ethermint
* refactor: move the proto package version from `v1` to `v1beta1` for vulcanize modules
* refactor: added bond module dependency to nameserivce module
* feat: added graphql for bond module
* feat: added auction module dependency to nameservice module
* refactor: refactored the nameservice module
* refactor: add human-readable attributes output to cli nameservice `list`
* WIP: add grpc query test cases
* fix: fix the sub names authority storing issue
* WIP: add the test cases
* refactor: removed legacyCodec from nameservice
* fix: fix the responses for `authority-expiry` and `records-expiry` commands query result
* refactor: sort the imports in app
* WIP: add test cases for cli query, tx for nameservice module
* feat: add test cases for grpc of nameservice module
1. renamed grpc gateway routes from ethermint to vulcanize
* refactor: refactored the test cases for grpc lookup of nameservice
* refactor: refactored the test cases for bond module
* feat: add node status for gql
* feat: add get actions by ids in gql
* feat: add lookup authorities,resolve name, lookup name queries to gql
* updated readme file
---
cmd/ethermintd/root.go | 5 +
docs/api/proto-docs.md | 679 +-
go.mod | 8 +-
go.sum | 50 +-
gql/README.md | 351 +
gql/generated.go | 8781 +++++++++++++++++
gql/gqlgen.yml | 14 +
gql/models_gen.go | 160 +
gql/resolver.go | 335 +
gql/server.go | 44 +
gql/status.go | 99 +
gql/util.go | 267 +
gql/version.go | 4 +
gql/vulcanize/dxns/schema.graphql | 260 +
proto/vulcanize/auction/v1beta1/genesis.proto | 8 +-
proto/vulcanize/auction/v1beta1/query.proto | 132 +-
proto/vulcanize/auction/v1beta1/tx.proto | 160 +-
proto/vulcanize/auction/v1beta1/types.proto | 214 +-
server/flags/flags.go | 12 +
server/start.go | 4 +
x/auction/README.md | 37 +-
x/bond/keeper/keeper.go | 21 +
22 files changed, 10807 insertions(+), 838 deletions(-)
create mode 100644 gql/README.md
create mode 100644 gql/generated.go
create mode 100644 gql/gqlgen.yml
create mode 100644 gql/models_gen.go
create mode 100644 gql/resolver.go
create mode 100644 gql/server.go
create mode 100644 gql/status.go
create mode 100644 gql/util.go
create mode 100644 gql/version.go
create mode 100644 gql/vulcanize/dxns/schema.graphql
diff --git a/cmd/ethermintd/root.go b/cmd/ethermintd/root.go
index b87fb553..ccf2c89a 100644
--- a/cmd/ethermintd/root.go
+++ b/cmd/ethermintd/root.go
@@ -120,6 +120,9 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) {
// add rosetta
rootCmd.AddCommand(sdkserver.RosettaCommand(encodingConfig.InterfaceRegistry, encodingConfig.Marshaler))
+ // Add flags for GQL server.
+ rootCmd = srvflags.AddGQLFlags(rootCmd)
+
return rootCmd, encodingConfig
}
@@ -228,6 +231,8 @@ func (a appCreator) newApp(logger tmlog.Logger, db dbm.DB, traceStore io.Writer,
baseapp.SetSnapshotKeepRecent(cast.ToUint32(appOpts.Get(sdkserver.FlagStateSyncSnapshotKeepRecent))),
)
+ // Start
+ //go gql.Server(ethermintApp.BaseApp, ethermintApp.AppCodec(), ethermintApp.AccountKeeper, ethermintApp.BondKeeper)
return ethermintApp
}
diff --git a/docs/api/proto-docs.md b/docs/api/proto-docs.md
index d797278f..f4ee1325 100644
--- a/docs/api/proto-docs.md
+++ b/docs/api/proto-docs.md
@@ -71,44 +71,44 @@
- [QueryBlockGasResponse](#ethermint.feemarket.v1.QueryBlockGasResponse)
- [QueryParamsRequest](#ethermint.feemarket.v1.QueryParamsRequest)
- [QueryParamsResponse](#ethermint.feemarket.v1.QueryParamsResponse)
-
+
- [Query](#ethermint.feemarket.v1.Query)
-
+
- [ethermint/types/v1/account.proto](#ethermint/types/v1/account.proto)
- [EthAccount](#ethermint.types.v1.EthAccount)
-
+
- [ethermint/types/v1/web3.proto](#ethermint/types/v1/web3.proto)
- [ExtensionOptionsWeb3Tx](#ethermint.types.v1.ExtensionOptionsWeb3Tx)
-
+
- [vulcanize/auction/v1beta1/types.proto](#vulcanize/auction/v1beta1/types.proto)
- [Auction](#vulcanize.auction.v1beta1.Auction)
- [Auctions](#vulcanize.auction.v1beta1.Auctions)
- [Bid](#vulcanize.auction.v1beta1.Bid)
- [Params](#vulcanize.auction.v1beta1.Params)
-
+
- [vulcanize/auction/v1beta1/genesis.proto](#vulcanize/auction/v1beta1/genesis.proto)
- [GenesisState](#vulcanize.auction.v1beta1.GenesisState)
-
+
- [vulcanize/auction/v1beta1/query.proto](#vulcanize/auction/v1beta1/query.proto)
- - [AuctionRequest](#vulcanize.auction.v1beta1.AuctionRequest)
- - [AuctionResponse](#vulcanize.auction.v1beta1.AuctionResponse)
- - [AuctionsByBidderRequest](#vulcanize.auction.v1beta1.AuctionsByBidderRequest)
- - [AuctionsByBidderResponse](#vulcanize.auction.v1beta1.AuctionsByBidderResponse)
- - [AuctionsByOwnerRequest](#vulcanize.auction.v1beta1.AuctionsByOwnerRequest)
- - [AuctionsByOwnerResponse](#vulcanize.auction.v1beta1.AuctionsByOwnerResponse)
- - [AuctionsRequest](#vulcanize.auction.v1beta1.AuctionsRequest)
- - [AuctionsResponse](#vulcanize.auction.v1beta1.AuctionsResponse)
- - [BalanceRequest](#vulcanize.auction.v1beta1.BalanceRequest)
- - [BalanceResponse](#vulcanize.auction.v1beta1.BalanceResponse)
- - [BidRequest](#vulcanize.auction.v1beta1.BidRequest)
- - [BidResponse](#vulcanize.auction.v1beta1.BidResponse)
- - [BidsRequest](#vulcanize.auction.v1beta1.BidsRequest)
- - [BidsResponse](#vulcanize.auction.v1beta1.BidsResponse)
- - [QueryParamsRequest](#vulcanize.auction.v1beta1.QueryParamsRequest)
- - [QueryParamsResponse](#vulcanize.auction.v1beta1.QueryParamsResponse)
-
- - [Query](#vulcanize.auction.v1beta1.Query)
-
+ - [AuctionRequest](#vulcanize.auction.v1beta1.AuctionRequest)
+ - [AuctionResponse](#vulcanize.auction.v1beta1.AuctionResponse)
+ - [AuctionsByBidderRequest](#vulcanize.auction.v1beta1.AuctionsByBidderRequest)
+ - [AuctionsByBidderResponse](#vulcanize.auction.v1beta1.AuctionsByBidderResponse)
+ - [AuctionsByOwnerRequest](#vulcanize.auction.v1beta1.AuctionsByOwnerRequest)
+ - [AuctionsByOwnerResponse](#vulcanize.auction.v1beta1.AuctionsByOwnerResponse)
+ - [AuctionsRequest](#vulcanize.auction.v1beta1.AuctionsRequest)
+ - [AuctionsResponse](#vulcanize.auction.v1beta1.AuctionsResponse)
+ - [BalanceRequest](#vulcanize.auction.v1beta1.BalanceRequest)
+ - [BalanceResponse](#vulcanize.auction.v1beta1.BalanceResponse)
+ - [BidRequest](#vulcanize.auction.v1beta1.BidRequest)
+ - [BidResponse](#vulcanize.auction.v1beta1.BidResponse)
+ - [BidsRequest](#vulcanize.auction.v1beta1.BidsRequest)
+ - [BidsResponse](#vulcanize.auction.v1beta1.BidsResponse)
+ - [QueryParamsRequest](#vulcanize.auction.v1beta1.QueryParamsRequest)
+ - [QueryParamsResponse](#vulcanize.auction.v1beta1.QueryParamsResponse)
+
+ - [Query](#vulcanize.auction.v1beta1.Query)
+
- [vulcanize/auction/v1beta1/tx.proto](#vulcanize/auction/v1beta1/tx.proto)
- [MsgCommitBid](#vulcanize.auction.v1beta1.MsgCommitBid)
- [MsgCommitBidResponse](#vulcanize.auction.v1beta1.MsgCommitBidResponse)
@@ -116,16 +116,16 @@
- [MsgCreateAuctionResponse](#vulcanize.auction.v1beta1.MsgCreateAuctionResponse)
- [MsgRevealBid](#vulcanize.auction.v1beta1.MsgRevealBid)
- [MsgRevealBidResponse](#vulcanize.auction.v1beta1.MsgRevealBidResponse)
-
+
- [Msg](#vulcanize.auction.v1beta1.Msg)
-
+
- [vulcanize/bond/v1beta1/bond.proto](#vulcanize/bond/v1beta1/bond.proto)
- [Bond](#vulcanize.bond.v1beta1.Bond)
- [Params](#vulcanize.bond.v1beta1.Params)
-
+
- [vulcanize/bond/v1beta1/genesis.proto](#vulcanize/bond/v1beta1/genesis.proto)
- [GenesisState](#vulcanize.bond.v1beta1.GenesisState)
-
+
- [vulcanize/bond/v1beta1/query.proto](#vulcanize/bond/v1beta1/query.proto)
- [QueryGetBondByIdRequest](#vulcanize.bond.v1beta1.QueryGetBondByIdRequest)
- [QueryGetBondByIdResponse](#vulcanize.bond.v1beta1.QueryGetBondByIdResponse)
@@ -192,9 +192,9 @@
- [QueryResolveWrnResponse](#vulcanize.nameservice.v1beta1.QueryResolveWrnResponse)
- [QueryWhoisRequest](#vulcanize.nameservice.v1beta1.QueryWhoisRequest)
- [QueryWhoisResponse](#vulcanize.nameservice.v1beta1.QueryWhoisResponse)
-
+
- [Query](#vulcanize.nameservice.v1beta1.Query)
-
+
- [vulcanize/nameservice/v1beta1/tx.proto](#vulcanize/nameservice/v1beta1/tx.proto)
- [MsgAssociateBond](#vulcanize.nameservice.v1beta1.MsgAssociateBond)
- [MsgAssociateBondResponse](#vulcanize.nameservice.v1beta1.MsgAssociateBondResponse)
@@ -217,9 +217,9 @@
- [MsgSetRecord](#vulcanize.nameservice.v1beta1.MsgSetRecord)
- [MsgSetRecordResponse](#vulcanize.nameservice.v1beta1.MsgSetRecordResponse)
- [Payload](#vulcanize.nameservice.v1beta1.Payload)
-
+
- [Msg](#vulcanize.nameservice.v1beta1.Msg)
-
+
- [Scalar Value Types](#scalar-value-types)
@@ -1252,18 +1252,12 @@ authtypes.BaseAccount type. It is compatible with the auth AccountKeeper.
### ExtensionOptionsWeb3Tx
-
-
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `typed_data_chain_id` | [uint64](#uint64) | | typed data chain id used only in EIP712 Domain and should match Ethereum network ID in a Web3 provider (e.g. Metamask). |
| `fee_payer` | [string](#string) | | fee payer is an account address for the fee payer. It will be validated during EIP712 signature checking. |
| `fee_payer_sig` | [bytes](#bytes) | | fee payer sig is a signature data from the fee paying account, allows to perform fee delegation when using EIP712 Domain. |
-
-
-
-
@@ -1302,31 +1296,19 @@ Auction represents a sealed-bid on-chain auction
| `winning_bid` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | Winning bid, i.e., the highest bid |
| `winning_price` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | Amount the winner pays, i.e. the second highest auction |
-
-
-
-
-
### Auctions
-
-
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `auctions` | [Auction](#vulcanize.auction.v1beta1.Auction) | repeated | |
-
-
-
-
-
### Bid
-Bid represents a sealed bid (commit) made during the auction
+Bid represents a sealed bid (commit) made during the auction
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
@@ -1340,16 +1322,11 @@ Bid represents a sealed bid (commit) made during the auction
| `reveal_fee` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | |
| `bid_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | |
-
-
-
-
-
### Params
-Params defines the auction module parameters
+Params defines the auction module parameters
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
@@ -1359,10 +1336,6 @@ Params defines the auction module parameters
| `reveal_fee` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | Reveal fees |
| `minimum_bid` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | Minimum acceptable bid amount |
-
-
-
-
@@ -1383,18 +1356,14 @@ Params defines the auction module parameters
### GenesisState
-GenesisState defines the genesis state of the auction module
+GenesisState defines the genesis state of the auction module
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `params` | [Params](#vulcanize.auction.v1beta1.Params) | | |
| `auctions` | [Auction](#vulcanize.auction.v1beta1.Auction) | repeated | |
-
-
-
-
@@ -1410,239 +1379,158 @@ GenesisState defines the genesis state of the auction module
## vulcanize/auction/v1beta1/query.proto
-
-
### AuctionRequest
-AuctionRequest is the format for querying a specific auction
+AuctionRequest is the format for querying a specific auction
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `id` | [string](#string) | | Auction ID |
-
-
-
-
-
### AuctionResponse
-AuctionResponse returns the details of the queried auction
+AuctionResponse returns the details of the queried auction
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `auction` | [Auction](#vulcanize.auction.v1beta1.Auction) | | Auction details |
-
-
-
-
-
### AuctionsByBidderRequest
-AuctionsByBidderRequest is the format for querying all auctions containing a bidder address
+AuctionsByBidderRequest is the format for querying all auctions containing a bidder address
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `bidder_address` | [string](#string) | | Address of the bidder |
-
-
-
-
-
### AuctionsByBidderResponse
-AuctionsByBidderResponse returns all auctions containing a bidder
+AuctionsByBidderResponse returns all auctions containing a bidder
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `auctions` | [Auctions](#vulcanize.auction.v1beta1.Auctions) | | List of auctions |
-
-
-
-
-
### AuctionsByOwnerRequest
-AuctionsByOwnerRequest is the format for querying all auctions created by an owner
+AuctionsByOwnerRequest is the format for querying all auctions created by an owner
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `owner_address` | [string](#string) | | Address of the owner |
-
-
-
-
-
### AuctionsByOwnerResponse
-AuctionsByOwnerResponse returns all auctions created by an owner
+AuctionsByOwnerResponse returns all auctions created by an owner
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `auctions` | [Auctions](#vulcanize.auction.v1beta1.Auctions) | | List of auctions |
-
-
-
-
-
### AuctionsRequest
-AuctionsRequest is the format for querying all the auctions
+AuctionsRequest is the format for querying all the auctions
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination info for the next request |
-
-
-
-
-
### AuctionsResponse
-AuctionsResponse returns the list of all auctions
+AuctionsResponse returns the list of all auctions
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `auctions` | [Auctions](#vulcanize.auction.v1beta1.Auctions) | | List of auctions |
| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination info for the next request |
-
-
-
-
-
### BalanceRequest
+
BalanceRequest is the format to fetch all balances
-
-
-
-
-
### BalanceResponse
-
-
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `balance` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | Set of all balances within the auction |
-
-
-
-
-
### BidRequest
-BidRequest is the format for querying a specific bid in an auction
+BidRequest is the format for querying a specific bid in an auction
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `auction_id` | [string](#string) | | Auction ID |
| `bidder` | [string](#string) | | Bidder address |
-
-
-
-
-
### BidResponse
-BidResponse returns the details of the queried bid
+BidResponse returns the details of the queried bid
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `bid` | [Bid](#vulcanize.auction.v1beta1.Bid) | | Bid details |
-
-
-
-
-
### BidsRequest
-BidsRequest is the format for querying all bids in an auction
+BidsRequest is the format for querying all bids in an auction
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `auction_id` | [string](#string) | | Auction ID |
-
-
-
-
-
### BidsResponse
-BidsResponse returns details of all bids in an auction
+BidsResponse returns details of all bids in an auction
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `bids` | [Bid](#vulcanize.auction.v1beta1.Bid) | repeated | List of bids in the auction |
-
-
-
-
-
### QueryParamsRequest
+
QueryParamsRequest is the format to query the parameters of the auction module
-
-
-
-
-
### QueryParamsResponse
-QueryParamsResponse returns parameters of the auction module
+QueryParamsResponse returns parameters of the auction module
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `params` | [Params](#vulcanize.auction.v1beta1.Params) | | |
-
-
-
-
@@ -1680,8 +1568,8 @@ Query defines the gRPC querier interface for the auction module
### MsgCommitBid
-CommitBid defines the message to commit a bid
+CommitBid defines the message to commit a bid
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
@@ -1689,31 +1577,21 @@ CommitBid defines the message to commit a bid
| `commit_hash` | [string](#string) | | Commit Hash |
| `signer` | [string](#string) | | Address of the signer |
-
-
-
-
-
### MsgCommitBidResponse
-MsgCommitBidResponse returns the state of the auction after the bid creation
+MsgCommitBidResponse returns the state of the auction after the bid creation
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `bid` | [Bid](#vulcanize.auction.v1beta1.Bid) | | Auction details |
-
-
-
-
-
### MsgCreateAuction
-MsgCreateAuction defines a create auction message
+MsgCreateAuction defines a create auction message
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
@@ -1724,31 +1602,21 @@ MsgCreateAuction defines a create auction message
| `minimum_bid` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | Minimum acceptable bid amount |
| `signer` | [string](#string) | | Address of the signer |
-
-
-
-
-
### MsgCreateAuctionResponse
-MsgCreateAuctionResponse returns the details of the created auction
+MsgCreateAuctionResponse returns the details of the created auction
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `auction` | [Auction](#vulcanize.auction.v1beta1.Auction) | | Auction details |
-
-
-
-
-
### MsgRevealBid
-RevealBid defines the message to reveal a bid
+RevealBid defines the message to reveal a bid
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
@@ -1756,25 +1624,16 @@ RevealBid defines the message to reveal a bid
| `reveal` | [string](#string) | | Commit Hash |
| `signer` | [string](#string) | | Address of the signer |
-
-
-
-
-
### MsgRevealBidResponse
-MsgRevealBidResponse returns the state of the auction after the bid reveal
+MsgRevealBidResponse returns the state of the auction after the bid reveal
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `auction` | [Auction](#vulcanize.auction.v1beta1.Auction) | | Auction details |
-
-
-
-
@@ -2195,45 +2054,33 @@ Msg defines the bond Msg service.
## vulcanize/nameservice/v1beta1/nameservice.proto
-
-
### AuctionBidInfo
-AuctionBidInfo
+AuctionBidInfo
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `auction_id` | [string](#string) | | |
| `bidder_address` | [string](#string) | | |
-
-
-
-
-
### AuthorityEntry
-AuthorityEntry defines the nameservice module AuthorityEntries
+AuthorityEntry defines the nameservice module AuthorityEntries
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `name` | [string](#string) | | |
| `entry` | [NameAuthority](#vulcanize.nameservice.v1beta1.NameAuthority) | | |
-
-
-
-
-
### BlockChangeSet
-BlockChangeSet
+BlockChangeSet
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
@@ -2244,16 +2091,11 @@ BlockChangeSet
| `authorities` | [string](#string) | repeated | |
| `names` | [string](#string) | repeated | |
-
-
-
-
-
### NameAuthority
-NameAuthority
+NameAuthority
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
@@ -2265,64 +2107,44 @@ NameAuthority
| `bond_id` | [string](#string) | | |
| `expiry_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | |
-
-
-
-
-
### NameEntry
-NameEntry
+NameEntry
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `name` | [string](#string) | | |
| `entry` | [NameRecord](#vulcanize.nameservice.v1beta1.NameRecord) | | |
-
-
-
-
-
### NameRecord
-NameRecord
+NameRecord
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `latest` | [NameRecordEntry](#vulcanize.nameservice.v1beta1.NameRecordEntry) | | |
| `history` | [NameRecordEntry](#vulcanize.nameservice.v1beta1.NameRecordEntry) | repeated | |
-
-
-
-
-
### NameRecordEntry
-NameRecordEntry
+NameRecordEntry
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `id` | [string](#string) | | |
| `height` | [uint64](#uint64) | | |
-
-
-
-
-
### Params
-Params defines the nameservice module parameters
+Params defines the nameservice module parameters
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
@@ -2338,16 +2160,11 @@ Params defines the nameservice module parameters
| `authority_auction_reveal_fee` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | |
| `authority_auction_minimum_bid` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | |
-
-
-
-
-
### Record
-Params defines the nameservice module records
+Params defines the nameservice module records
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
@@ -2359,26 +2176,17 @@ Params defines the nameservice module records
| `owners` | [string](#string) | repeated | |
| `attributes` | [bytes](#bytes) | | |
-
-
-
-
-
### Signature
-Signature
+Signature
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `sig` | [string](#string) | | |
| `pub_key` | [string](#string) | | |
-
-
-
-
@@ -2394,13 +2202,11 @@ Signature
## vulcanize/nameservice/v1beta1/genesis.proto
-
-
### GenesisState
-GenesisState defines the nameservice module's genesis state.
+GenesisState defines the nameservice module's genesis state.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
@@ -2409,10 +2215,6 @@ GenesisState defines the nameservice module's genesis state.
| `authorities` | [AuthorityEntry](#vulcanize.nameservice.v1beta1.AuthorityEntry) | repeated | authorities |
| `names` | [NameEntry](#vulcanize.nameservice.v1beta1.NameEntry) | repeated | names |
-
-
-
-
@@ -2428,173 +2230,117 @@ GenesisState defines the nameservice module's genesis state.
## vulcanize/nameservice/v1beta1/query.proto
-
-
### AccountBalance
-AccountBalance is nameservice module account balance
+AccountBalance is nameservice module account balance
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `account_name` | [string](#string) | | |
| `balance` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | |
-
-
-
-
-
### ExpiryQueueRecord
-ExpiryQueueRecord
+ExpiryQueueRecord
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `id` | [string](#string) | | |
| `value` | [string](#string) | repeated | |
-
-
-
-
-
### GetNameServiceModuleBalanceRequest
+
GetNameServiceModuleBalanceRequest is request type for nameservice module accounts balance
-
-
-
-
-
### GetNameServiceModuleBalanceResponse
-GetNameServiceModuleBalanceResponse is response type for nameservice module accounts balance
+GetNameServiceModuleBalanceResponse is response type for nameservice module accounts balance
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `balances` | [AccountBalance](#vulcanize.nameservice.v1beta1.AccountBalance) | repeated | |
-
-
-
-
-
### QueryGetAuthorityExpiryQueue
-QueryGetAuthorityExpiryQueue
+QueryGetAuthorityExpiryQueue
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. |
-
-
-
-
-
### QueryGetAuthorityExpiryQueueResponse
-QueryGetAuthorityExpiryQueueResponse
+QueryGetAuthorityExpiryQueueResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `authorities` | [ExpiryQueueRecord](#vulcanize.nameservice.v1beta1.ExpiryQueueRecord) | repeated | |
| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. |
-
-
-
-
-
### QueryGetRecordExpiryQueue
-QueryGetRecordExpiryQueue
+QueryGetRecordExpiryQueue
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. |
-
-
-
-
-
### QueryGetRecordExpiryQueueResponse
-QueryGetRecordExpiryQueueResponse
+QueryGetRecordExpiryQueueResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `records` | [ExpiryQueueRecord](#vulcanize.nameservice.v1beta1.ExpiryQueueRecord) | repeated | |
| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. |
-
-
-
-
-
### QueryListNameRecordsRequest
-QueryListNameRecordsRequest is request type for nameservice names records
+QueryListNameRecordsRequest is request type for nameservice names records
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. |
-
-
-
-
-
### QueryListNameRecordsResponse
-QueryListNameRecordsResponse is response type for nameservice names records
+QueryListNameRecordsResponse is response type for nameservice names records
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `names` | [NameEntry](#vulcanize.nameservice.v1beta1.NameEntry) | repeated | |
| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. |
-
-
-
-
-
### QueryListRecordsRequest
-QueryListRecordsRequest is request type for nameservice records list
+QueryListRecordsRequest is request type for nameservice records list
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. |
-
-
-
-
-
### QueryListRecordsResponse
@@ -2606,187 +2352,124 @@ QueryListRecordsResponse is response type for nameservice records list
| `records` | [Record](#vulcanize.nameservice.v1beta1.Record) | repeated | |
| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. |
-
-
-
-
-
### QueryLookupWrn
-QueryLookupWrn is request type for LookupWrn
+QueryLookupWrn is request type for LookupWrn
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `wrn` | [string](#string) | | |
-
-
-
-
-
### QueryLookupWrnResponse
-QueryLookupWrnResponse is response type for QueryLookupWrn
+QueryLookupWrnResponse is response type for QueryLookupWrn
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `name` | [NameRecord](#vulcanize.nameservice.v1beta1.NameRecord) | | |
-
-
-
-
-
### QueryParamsRequest
+
QueryParamsRequest is request type for nameservice params
-
-
-
-
-
### QueryParamsResponse
-QueryParamsResponse is response type for nameservice params
+QueryParamsResponse is response type for nameservice params
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `params` | [Params](#vulcanize.nameservice.v1beta1.Params) | | |
-
-
-
-
-
### QueryRecordByBondIdRequest
-QueryRecordByBondIdRequest is request type for get the records by bond-id
+QueryRecordByBondIdRequest is request type for get the records by bond-id
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `id` | [string](#string) | | |
| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. |
-
-
-
-
-
### QueryRecordByBondIdResponse
-QueryRecordByBondIdResponse is response type for records list by bond-id
+QueryRecordByBondIdResponse is response type for records list by bond-id
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `records` | [Record](#vulcanize.nameservice.v1beta1.Record) | repeated | |
| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. |
-
-
-
-
-
### QueryRecordByIdRequest
-QueryRecordByIdRequest is request type for nameservice records by id
+QueryRecordByIdRequest is request type for nameservice records by id
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `id` | [string](#string) | | |
-
-
-
-
-
### QueryRecordByIdResponse
-QueryRecordByIdResponse is response type for nameservice records by id
+QueryRecordByIdResponse is response type for nameservice records by id
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `record` | [Record](#vulcanize.nameservice.v1beta1.Record) | | |
-
-
-
-
-
### QueryResolveWrn
-QueryResolveWrn is request type for ResolveWrn
+QueryResolveWrn is request type for ResolveWrn
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `wrn` | [string](#string) | | |
-
-
-
-
-
### QueryResolveWrnResponse
-QueryResolveWrnResponse is response type for QueryResolveWrn
+QueryResolveWrnResponse is response type for QueryResolveWrn
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `record` | [Record](#vulcanize.nameservice.v1beta1.Record) | | |
-
-
-
-
-
### QueryWhoisRequest
-QueryWhoisRequest is request type for Get NameAuthority
+QueryWhoisRequest is request type for Get NameAuthority
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `name` | [string](#string) | | |
-
-
-
-
-
### QueryWhoisResponse
-QueryWhoisResponse is response type for whois request
+QueryWhoisResponse is response type for whois request
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `name_authority` | [NameAuthority](#vulcanize.nameservice.v1beta1.NameAuthority) | | |
-
-
-
-
@@ -2822,13 +2505,11 @@ Query defines the gRPC querier service for nameservice module
## vulcanize/nameservice/v1beta1/tx.proto
-
-
### MsgAssociateBond
-MsgAssociateBond
+MsgAssociateBond
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
@@ -2836,104 +2517,68 @@ MsgAssociateBond
| `bond_id` | [string](#string) | | |
| `signer` | [string](#string) | | |
-
-
-
-
-
### MsgAssociateBondResponse
+
MsgAssociateBondResponse
-
-
-
-
-
### MsgDeleteNameAuthority
-MsgDeleteNameAuthority is SDK message for DeleteNameAuthority
+MsgDeleteNameAuthority is SDK message for DeleteNameAuthority
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `wrn` | [string](#string) | | |
| `signer` | [string](#string) | | |
-
-
-
-
-
### MsgDeleteNameAuthorityResponse
+
MsgDeleteNameAuthorityResponse
-
-
-
-
-
### MsgDissociateBond
-MsgDissociateBond is SDK message for Msg/DissociateBond
+MsgDissociateBond is SDK message for Msg/DissociateBond
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `record_id` | [string](#string) | | |
| `signer` | [string](#string) | | |
-
-
-
-
-
### MsgDissociateBondResponse
+
MsgDissociateBondResponse is response type for MsgDissociateBond
-
-
-
-
-
### MsgDissociateRecords
-MsgDissociateRecords is SDK message for Msg/DissociateRecords
+MsgDissociateRecords is SDK message for Msg/DissociateRecords
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `bond_id` | [string](#string) | | |
| `signer` | [string](#string) | | |
-
-
-
-
-
### MsgDissociateRecordsResponse
+
MsgDissociateRecordsResponse is response type for MsgDissociateRecords
-
-
-
-
-
### MsgReAssociateRecords
-MsgReAssociateRecords is SDK message for Msg/ReAssociateRecords
+MsgReAssociateRecords is SDK message for Msg/ReAssociateRecords
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
@@ -2941,52 +2586,34 @@ MsgReAssociateRecords is SDK message for Msg/ReAssociateRecords
| `old_bond_id` | [string](#string) | | |
| `signer` | [string](#string) | | |
-
-
-
-
-
### MsgReAssociateRecordsResponse
+
MsgReAssociateRecordsResponse is response type for MsgReAssociateRecords
-
-
-
-
-
### MsgRenewRecord
-MsgRenewRecord is SDK message for Renew a record
+MsgRenewRecord is SDK message for Renew a record
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `record_id` | [string](#string) | | |
| `signer` | [string](#string) | | |
-
-
-
-
-
### MsgRenewRecordResponse
+
MsgRenewRecordResponse
-
-
-
-
-
### MsgReserveAuthority
-MsgReserveName
+MsgReserveName
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
@@ -2994,26 +2621,17 @@ MsgReserveName
| `signer` | [string](#string) | | |
| `owner` | [string](#string) | | if creating a sub-authority. |
-
-
-
-
-
### MsgReserveAuthorityResponse
+
MsgReserveNameResponse
-
-
-
-
-
### MsgSetAuthorityBond
-MsgSetAuthorityBond is SDK message for SetAuthorityBond
+MsgSetAuthorityBond is SDK message for SetAuthorityBond
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
@@ -3021,26 +2639,17 @@ MsgSetAuthorityBond is SDK message for SetAuthorityBond
| `bond_id` | [string](#string) | | |
| `signer` | [string](#string) | | |
-
-
-
-
-
### MsgSetAuthorityBondResponse
+
MsgSetAuthorityBondResponse
-
-
-
-
-
### MsgSetName
-MsgSetName
+MsgSetName
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
@@ -3048,26 +2657,17 @@ MsgSetName
| `cid` | [string](#string) | | |
| `signer` | [string](#string) | | |
-
-
-
-
-
### MsgSetNameResponse
+
MsgSetNameResponse
-
-
-
-
-
### MsgSetRecord
-MsgSetRecord
+MsgSetRecord
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
@@ -3075,36 +2675,23 @@ MsgSetRecord
| `signer` | [string](#string) | | |
| `payload` | [Payload](#vulcanize.nameservice.v1beta1.Payload) | | |
-
-
-
-
-
### MsgSetRecordResponse
+
MsgSetRecordResponse
-
-
-
-
-
### Payload
-Payload
+Payload
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `record` | [Record](#vulcanize.nameservice.v1beta1.Record) | | |
| `signatures` | [Signature](#vulcanize.nameservice.v1beta1.Signature) | repeated | |
-
-
-
-
@@ -3132,25 +2719,29 @@ Msg
-
-
## Scalar Value Types
-| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
-| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- |
-| double | | double | double | float | float64 | double | float | Float |
-| float | | float | float | float | float32 | float | float | Float |
-| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
-| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum |
-| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) |
-| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) |
-| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
-| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum |
-| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) |
-| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum |
-| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
-| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum |
-| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass |
-| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) |
-| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) |
+| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | | ----------- | ----- | --- | ---- | ------ | -- |
+-- | --- | ---- | | double | | double | double | float | float64 | double | float | Float |
+| float | | float | float | float | float32 | float | float | Float | | int32 |
+Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative
+values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
+| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is
+likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum |
+| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer |
+Bignum or Fixnum (as required) | | uint64 | Uses variable-length encoding. | uint64 | long |
+int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | | sint32 | Uses
+variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32
+| int | int | int32 | int | integer | Bignum or Fixnum (as required) | | sint64 | Uses
+variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64
+| long | int/long | int64 | long | integer/string | Bignum | | fixed32 | Always four bytes. More
+efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or
+Fixnum (as required) | | fixed64 | Always eight bytes. More efficient than uint64 if values are
+often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | |
+sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
+| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string |
+Bignum | | bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass |
+| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String |
+str/unicode | string | string | string | String (UTF-8) | | bytes | May contain any arbitrary
+sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) |
diff --git a/go.mod b/go.mod
index 7fe01ea5..3b784a97 100644
--- a/go.mod
+++ b/go.mod
@@ -3,11 +3,13 @@ module github.com/tharsis/ethermint
go 1.17
require (
+ github.com/99designs/gqlgen v0.14.0
github.com/btcsuite/btcd v0.22.0-beta
github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce
github.com/cosmos/cosmos-sdk v0.44.0
github.com/cosmos/go-bip39 v1.0.0
github.com/cosmos/ibc-go v1.2.0
+ github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea
github.com/ethereum/go-ethereum v1.10.3
github.com/gibson042/canonicaljson-go v1.0.3
github.com/gogo/protobuf v1.3.3
@@ -27,12 +29,14 @@ require (
github.com/rs/zerolog v1.25.0
github.com/spf13/cast v1.4.1
github.com/spf13/cobra v1.2.1
+ github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.8.1
github.com/status-im/keycard-go v0.0.0-20200402102358-957c09536969
github.com/stretchr/testify v1.7.0
github.com/tendermint/tendermint v0.34.13
github.com/tendermint/tm-db v0.6.4
github.com/tyler-smith/go-bip39 v1.1.0
+ github.com/vektah/gqlparser/v2 v2.2.0
go.etcd.io/bbolt v1.3.6 // indirect
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect
golang.org/x/net v0.0.0-20210903162142-ad29c8ab022f // indirect
@@ -55,6 +59,7 @@ require (
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect
github.com/VictoriaMetrics/fastcache v1.5.7 // indirect
github.com/Workiva/go-datastructures v1.0.52 // indirect
+ github.com/agnivade/levenshtein v1.1.0 // indirect
github.com/aokoli/goutils v1.1.1 // indirect
github.com/armon/go-metrics v0.3.9 // indirect
github.com/beorn7/perks v1.0.1 // indirect
@@ -68,7 +73,6 @@ require (
github.com/cosmos/ledger-go v0.9.2 // indirect
github.com/danieljoos/wincred v1.0.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
- github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea // indirect
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect
github.com/dgraph-io/badger/v2 v2.2007.2 // indirect
github.com/dgraph-io/ristretto v0.0.3 // indirect
@@ -129,7 +133,6 @@ require (
github.com/mtibben/percent v0.2.1 // indirect
github.com/multiformats/go-base32 v0.0.3 // indirect
github.com/multiformats/go-multibase v0.0.1 // indirect
- github.com/multiformats/go-varint v0.0.5 // indirect
github.com/mwitkow/go-proto-validators v0.3.2 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/pelletier/go-toml v1.9.3 // indirect
@@ -149,7 +152,6 @@ require (
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/spf13/afero v1.6.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
- github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20210305035536-64b5b1c73954 // indirect
github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect
diff --git a/go.sum b/go.sum
index 4fbbeb44..1aa5911d 100644
--- a/go.sum
+++ b/go.sum
@@ -43,6 +43,8 @@ collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
filippo.io/edwards25519 v1.0.0-beta.2 h1:/BZRNzm8N4K4eWfK28dL4yescorxtO7YG1yun8fy+pI=
filippo.io/edwards25519 v1.0.0-beta.2/go.mod h1:X+pm78QAUPtFLi1z9PYIlS/bdDnvbCOGKtZ+ACWEf7o=
+github.com/99designs/gqlgen v0.14.0 h1:Wg8aNYQUjMR/4v+W3xD+7SizOy6lSvVeQ06AobNQAXI=
+github.com/99designs/gqlgen v0.14.0/go.mod h1:S7z4boV+Nx4VvzMUpVrY/YuHjFX4n7rDyuTqvAkuoRE=
github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4=
github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc=
github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4=
@@ -102,6 +104,9 @@ github.com/adlio/schema v1.1.13 h1:LeNMVg5Z1FX+Qgz8tJUijBLRdcpbFUElz+d1489On98=
github.com/adlio/schema v1.1.13/go.mod h1:L5Z7tw+7lRK1Fnpi/LT/ooCP1elkXn0krMWBQHUhEDE=
github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII=
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c=
+github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM=
+github.com/agnivade/levenshtein v1.1.0 h1:n6qGwyHG61v3ABce1rPVZklEYRT8NFpCMrpZdBUbYGM=
+github.com/agnivade/levenshtein v1.1.0/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo=
github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
@@ -111,6 +116,7 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk5
github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM=
github.com/allegro/bigcache v1.2.1 h1:hg1sY1raCwic3Vnsvje6TT7/pnZba83LeFck5NrFKSc=
github.com/allegro/bigcache v1.2.1/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM=
+github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ=
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ=
@@ -119,6 +125,8 @@ github.com/aokoli/goutils v1.1.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g
github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0=
github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
+github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q=
+github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE=
github.com/aristanetworks/fsnotify v1.4.2/go.mod h1:D/rtu7LpjYM8tRJphJ0hUBYpjai8SfX+aSNsWDTq/Ks=
github.com/aristanetworks/glog v0.0.0-20191112221043-67e8567f59f3/go.mod h1:KASm+qXFKs/xjSoWn30NrWBBvdTTQq+UjkhjEJHfSFA=
github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ=
@@ -276,6 +284,8 @@ github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUn
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y=
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw=
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
+github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g=
+github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA=
github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
@@ -478,9 +488,11 @@ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5m
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU=
+github.com/gorilla/context v0.0.0-20160226214623-1ea25387ff6f/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4=
github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q=
+github.com/gorilla/mux v1.6.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
@@ -684,14 +696,17 @@ github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOS
github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM=
github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM=
github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4=
+github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
github.com/lucasjones/reggen v0.0.0-20180717132126-cdb49ff09d77/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4=
github.com/lyft/protoc-gen-star v0.5.1/go.mod h1:9toiA3cC7z5uVbODF7kEQ91Xn7XNFkVUl+SrEe+ZORU=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls=
github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
+github.com/matryer/moq v0.0.0-20200106131100-75d0ddfc0007/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
+github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8=
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc=
@@ -699,6 +714,7 @@ github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HN
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-isatty v0.0.5-0.20180830101745-3fb116b82035/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
+github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-isatty v0.0.13 h1:qdl+GuBjcsKKDco5BsxPJlId98mSWNKqYA+Co0SC1yA=
@@ -733,6 +749,7 @@ github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eI
github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
+github.com/mitchellh/mapstructure v0.0.0-20180203102830-a4e142e9c047/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag=
@@ -760,7 +777,6 @@ github.com/multiformats/go-multibase v0.0.1/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/g
github.com/multiformats/go-multihash v0.0.1/go.mod h1:w/5tugSrLEbWqlcgJabL3oHFKTwfvkofsjW2Qa1ct4U=
github.com/multiformats/go-multihash v0.0.10 h1:lMoNbh2Ssd9PUF74Nz008KGzGPlfeV6wH3rit5IIGCM=
github.com/multiformats/go-multihash v0.0.10/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew=
-github.com/multiformats/go-varint v0.0.5/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU=
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
@@ -935,6 +951,7 @@ github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6So
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
+github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
github.com/rs/cors v1.8.0 h1:P2KMzcFwrPoSjkF1WLRPsp3UMLyql8L4v9hQpVeK5so=
github.com/rs/cors v1.8.0/go.mod h1:EBwu+T5AvHOcXwvZIkQFjUN6s8Czyqw12GL/Y0tUyRM=
@@ -958,10 +975,14 @@ github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KR
github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo=
github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
+github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
+github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU=
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
+github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
+github.com/shurcooL/vfsgen v0.0.0-20180121065927-ffb13db8def0/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
@@ -1024,6 +1045,7 @@ github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48=
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
+github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
@@ -1083,7 +1105,11 @@ github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
+github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ=
github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI=
+github.com/vektah/dataloaden v0.2.1-0.20190515034641-a19b9a6e7c9e/go.mod h1:/HUdMve7rvxZma+2ZELQeNh88+003LL7Pf/CZ089j8U=
+github.com/vektah/gqlparser/v2 v2.2.0 h1:bAc3slekAAJW6sZTi07aGq0OrfaCjj4jxARAaC7g2EM=
+github.com/vektah/gqlparser/v2 v2.2.0/go.mod h1:i3mQIGIrbK2PD1RrCeMTlVbkF2FJ6WkU1KJlJlC+3F4=
github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE=
github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU=
github.com/vmihailenco/msgpack/v5 v5.1.4/go.mod h1:C5gboKD0TJPqWDTVTtrQNfRbiBwHZGo8UTqP/9/XvLI=
@@ -1169,8 +1195,6 @@ golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9/go.mod h1:jdWPYTVW3xRLrWP
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
-golang.org/x/crypto v0.0.0-20210920023735-84f357641f63 h1:kETrAMYZq6WVGPa8IIixL0CaEcIUNi+1WX7grUoi3y8=
-golang.org/x/crypto v0.0.0-20210920023735-84f357641f63/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
@@ -1309,6 +1333,7 @@ golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5h
golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190219092855-153ac476189d/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -1406,6 +1431,7 @@ golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba h1:O8mE0/t419eoIwhTFpKVkHiT
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
@@ -1414,6 +1440,7 @@ golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
+golang.org/x/tools v0.0.0-20190515012406-7d7faa4812bd/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
@@ -1557,20 +1584,8 @@ google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6D
google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A=
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
-google.golang.org/genproto v0.0.0-20210920155426-26f343e4c215 h1:bdVWLCdfDvdxf+qXZp5iip6vl2zJGgzhkULcsAiBNmE=
-google.golang.org/genproto v0.0.0-20210920155426-26f343e4c215/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
-google.golang.org/genproto v0.0.0-20210921142501-181ce0d877f6 h1:2ncG/LajxmrclaZH+ppVi02rQxz4eXYJzGHdFN4Y9UA=
-google.golang.org/genproto v0.0.0-20210921142501-181ce0d877f6/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
-google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0 h1:5Tbluzus3QxoAJx4IefGt1W0HQZW4nuMrVk684jI74Q=
-google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
-google.golang.org/genproto v0.0.0-20210929214142-896c89f843d2 h1:G7kbolbig6UyfoRItVUeBGV/38VzxjAZYTavVGbYYss=
-google.golang.org/genproto v0.0.0-20210929214142-896c89f843d2/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
-google.golang.org/genproto v0.0.0-20210930144712-2e2e1008e8a3 h1:+F3FcO6LTrzNq5wp1Z6JtoBvnJzX6euyN70FoyMDXy4=
-google.golang.org/genproto v0.0.0-20210930144712-2e2e1008e8a3/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
-google.golang.org/genproto v0.0.0-20211001223012-bfb93cce50d9 h1:eF1wcrhdz56Vugf8qNX5dD93ItkrhothojQyHXqloe0=
-google.golang.org/genproto v0.0.0-20211001223012-bfb93cce50d9/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
-google.golang.org/genproto v0.0.0-20211011165927-a5fb3255271e h1:B3r2Cb5u7Od6/WGb95VHDMp99VU/fuqPYZb6VM8IozI=
-google.golang.org/genproto v0.0.0-20211011165927-a5fb3255271e/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20211005153810-c76a74d43a8e h1:Im71rbA1N3CbIag/PumYhQcNR8bLNmuOtRIyOnnLsT8=
+google.golang.org/genproto v0.0.0-20211005153810-c76a74d43a8e/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20211013025323-ce878158c4d4 h1:NBxB1XxiWpGqkPUiJ9PoBXkHV5A9+GohMOA+EmWoPbU=
google.golang.org/genproto v0.0.0-20211013025323-ce878158c4d4/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o=
@@ -1655,3 +1670,4 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
+sourcegraph.com/sourcegraph/appdash-data v0.0.0-20151005221446-73f23eafcf67/go.mod h1:L5q+DGLGOQFpo1snNEkLOJT2d1YTW66rWNzatr3He1k=
diff --git a/gql/README.md b/gql/README.md
new file mode 100644
index 00000000..a5d58818
--- /dev/null
+++ b/gql/README.md
@@ -0,0 +1,351 @@
+# Vulcanize dxns gql
+
+> Browser : http://localhost:9473 for gql
+
+## Start server
+
+```shell
+./build/ethermintd start --gql-playground --gql-server
+```
+
+Basic node status:
+
+```graphql
+{
+ getStatus {
+ version
+ node {
+ id
+ network
+ moniker
+ }
+ sync {
+ latest_block_height
+ catching_up
+ }
+ num_peers
+ peers {
+ is_outbound
+ remote_ip
+ }
+ disk_usage
+ }
+}
+```
+
+Full node status:
+
+```graphql
+{
+ getStatus {
+ version
+ node {
+ id
+ network
+ moniker
+ }
+ sync {
+ latest_block_hash
+ latest_block_time
+ latest_block_height
+ catching_up
+ }
+ validator {
+ address
+ voting_power
+ proposer_priority
+ }
+ validators {
+ address
+ voting_power
+ proposer_priority
+ }
+ num_peers
+ peers {
+ node {
+ id
+ network
+ moniker
+ }
+ is_outbound
+ remote_ip
+ }
+ disk_usage
+ }
+}
+```
+
+Get records by IDs.
+
+```graphql
+{
+ getRecordsByIds(ids: ["QmYDtNCKtTu6u6jaHaFAC5PWZXcj7fAmry6NoWwMaixFHz"]) {
+ id
+ names
+ bondId
+ createTime
+ expiryTime
+ owners
+ attributes {
+ key
+ value {
+ string
+ }
+ }
+ }
+}
+```
+
+Query records.
+
+```graphql
+{
+ queryRecords(attributes: [{ key: "type", value: { string: "wrn:bot" } }]) {
+ id
+ names
+ bondId
+ createTime
+ expiryTime
+ owners
+ attributes {
+ key
+ value {
+ string
+ }
+ }
+ }
+}
+```
+
+Get account details:
+
+```graphql
+{
+ getAccounts(addresses: ["cosmos1wh8vvd0ymc5nt37h29z8kk2g2ays45ct2qu094"]) {
+ address
+ pubKey
+ number
+ sequence
+ balance {
+ type
+ quantity
+ }
+ }
+}
+```
+
+Query bonds:
+
+```graphql
+{
+ queryBonds(
+ attributes: [
+ {
+ key: "owner"
+ value: { string: "cosmos1wh8vvd0ymc5nt37h29z8kk2g2ays45ct2qu094" }
+ }
+ ]
+ ) {
+ id
+ owner
+ balance {
+ type
+ quantity
+ }
+ }
+}
+```
+
+Get bonds by IDs.
+
+```graphql
+{
+ getBondsByIds(ids :
+ [
+ "1c2b677cb2a27c88cc6bf8acf675c94b69051125b40c4fd073153b10f046dd87",
+ "c3f7a78c5042d2003880962ba31ff3b01fcf5942960e0bc3ca331f816346a440"
+ ])
+ {
+ id
+ owner
+ balance{
+ type
+ quantity
+ }
+ }
+}
+```
+
+Query Bonds by Owner
+
+```graphql
+{
+ queryBondsByOwner(ownerAddresses: ["ethm1mfdjngh5jvjs9lqtt9a7y2hlgw8v3syh3hsqzk"])
+ {
+ owner
+ bonds{
+ id
+ owner
+ balance
+ {
+ type
+ quantity
+ }
+ }
+ }
+}
+```
+
+Query auctions by ids
+
+```graphql
+{
+ getAuctionsByIds(ids: ["be98f2073c246194276554eefdb4c95b682a35a0f06fbe619a6da57c10c93e90"]){
+ id
+ ownerAddress
+ createTime
+ minimumBid{
+ type
+ quantity
+ }
+ commitFee{
+ type
+ quantity
+ }
+ commitsEndTime
+ revealFee{
+ type
+ quantity
+ }
+ revealsEndTime
+ winnerBid{
+ type
+ quantity
+ }
+ winnerPrice{
+ type
+ quantity
+ }
+ winnerAddress
+ bids{
+ bidderAddress
+ commitHash
+ commitTime
+ commitFee{
+ type
+ quantity
+ }
+ revealFee{
+ type
+ quantity
+ }
+ revealTime
+ bidAmount{
+ type
+ quantity
+ }
+ status
+ }
+ }
+}
+```
+
+LookUp Authorities
+
+```graphql
+{
+ lookupAuthorities(names: []){
+ ownerAddress
+ ownerAddress
+ height
+ bondId
+ status
+ expiryTime
+ auction {
+ id
+ ownerAddress
+ createTime
+ minimumBid{
+ type
+ quantity
+ }
+ commitFee{
+ type
+ quantity
+ }
+ commitsEndTime
+ revealFee{
+ type
+ quantity
+ }
+ revealsEndTime
+ winnerBid{
+ type
+ quantity
+ }
+ winnerPrice{
+ type
+ quantity
+ }
+ winnerAddress
+ bids{
+ bidderAddress
+ commitHash
+ commitTime
+ commitFee{
+ type
+ quantity
+ }
+ revealFee{
+ type
+ quantity
+ }
+ revealTime
+ bidAmount{
+ type
+ quantity
+ }
+ status
+ }
+ }
+ }
+}
+```
+
+LookUp Names
+
+```graphql
+{
+ lookupNames(names: ["wrn://hello/test"]){
+ latest{
+ id
+ height
+ }
+ history{
+ id
+ height
+ }
+ }
+}
+```
+
+Resolve Names
+
+```graphql
+{
+ resolveNames(names: ["asd"]){
+ id
+ names
+ bondId
+ createTime
+ expiryTime
+ owners
+ attributes {
+ key
+ value {
+ string
+ }
+ }
+ }
+}
+```
\ No newline at end of file
diff --git a/gql/generated.go b/gql/generated.go
new file mode 100644
index 00000000..43e8f4da
--- /dev/null
+++ b/gql/generated.go
@@ -0,0 +1,8781 @@
+// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
+
+package gql
+
+import (
+ "bytes"
+ "context"
+ "errors"
+ "strconv"
+ "sync"
+ "sync/atomic"
+
+ "github.com/99designs/gqlgen/graphql"
+ "github.com/99designs/gqlgen/graphql/introspection"
+ gqlparser "github.com/vektah/gqlparser/v2"
+ "github.com/vektah/gqlparser/v2/ast"
+)
+
+// region ************************** generated!.gotpl **************************
+
+// NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
+func NewExecutableSchema(cfg Config) graphql.ExecutableSchema {
+ return &executableSchema{
+ resolvers: cfg.Resolvers,
+ directives: cfg.Directives,
+ complexity: cfg.Complexity,
+ }
+}
+
+type Config struct {
+ Resolvers ResolverRoot
+ Directives DirectiveRoot
+ Complexity ComplexityRoot
+}
+
+type ResolverRoot interface {
+ Query() QueryResolver
+}
+
+type DirectiveRoot struct {
+}
+
+type ComplexityRoot struct {
+ Account struct {
+ Address func(childComplexity int) int
+ Balance func(childComplexity int) int
+ Number func(childComplexity int) int
+ PubKey func(childComplexity int) int
+ Sequence func(childComplexity int) int
+ }
+
+ Auction struct {
+ Bids func(childComplexity int) int
+ CommitFee func(childComplexity int) int
+ CommitsEndTime func(childComplexity int) int
+ CreateTime func(childComplexity int) int
+ ID func(childComplexity int) int
+ MinimumBid func(childComplexity int) int
+ OwnerAddress func(childComplexity int) int
+ RevealFee func(childComplexity int) int
+ RevealsEndTime func(childComplexity int) int
+ Status func(childComplexity int) int
+ WinnerAddress func(childComplexity int) int
+ WinnerBid func(childComplexity int) int
+ WinnerPrice func(childComplexity int) int
+ }
+
+ AuctionBid struct {
+ BidAmount func(childComplexity int) int
+ BidderAddress func(childComplexity int) int
+ CommitFee func(childComplexity int) int
+ CommitHash func(childComplexity int) int
+ CommitTime func(childComplexity int) int
+ RevealFee func(childComplexity int) int
+ RevealTime func(childComplexity int) int
+ Status func(childComplexity int) int
+ }
+
+ AuthorityRecord struct {
+ Auction func(childComplexity int) int
+ BondID func(childComplexity int) int
+ ExpiryTime func(childComplexity int) int
+ Height func(childComplexity int) int
+ OwnerAddress func(childComplexity int) int
+ OwnerPublicKey func(childComplexity int) int
+ Status func(childComplexity int) int
+ }
+
+ Bond struct {
+ Balance func(childComplexity int) int
+ ID func(childComplexity int) int
+ Owner func(childComplexity int) int
+ }
+
+ Coin struct {
+ Quantity func(childComplexity int) int
+ Type func(childComplexity int) int
+ }
+
+ KeyValue struct {
+ Key func(childComplexity int) int
+ Value func(childComplexity int) int
+ }
+
+ NameRecord struct {
+ History func(childComplexity int) int
+ Latest func(childComplexity int) int
+ }
+
+ NameRecordEntry struct {
+ Height func(childComplexity int) int
+ ID func(childComplexity int) int
+ }
+
+ NodeInfo struct {
+ ID func(childComplexity int) int
+ Moniker func(childComplexity int) int
+ Network func(childComplexity int) int
+ }
+
+ OwnerBonds struct {
+ Bonds func(childComplexity int) int
+ Owner func(childComplexity int) int
+ }
+
+ PeerInfo struct {
+ IsOutbound func(childComplexity int) int
+ Node func(childComplexity int) int
+ RemoteIP func(childComplexity int) int
+ }
+
+ Query struct {
+ GetAccounts func(childComplexity int, addresses []string) int
+ GetAuctionsByIds func(childComplexity int, ids []string) int
+ GetBondsByIds func(childComplexity int, ids []string) int
+ GetRecordsByIds func(childComplexity int, ids []string) int
+ GetStatus func(childComplexity int) int
+ LookupAuthorities func(childComplexity int, names []string) int
+ LookupNames func(childComplexity int, names []string) int
+ QueryBonds func(childComplexity int, attributes []*KeyValueInput) int
+ QueryBondsByOwner func(childComplexity int, ownerAddresses []string) int
+ QueryRecords func(childComplexity int, attributes []*KeyValueInput, all *bool) int
+ ResolveNames func(childComplexity int, names []string) int
+ }
+
+ Record struct {
+ Attributes func(childComplexity int) int
+ BondID func(childComplexity int) int
+ CreateTime func(childComplexity int) int
+ ExpiryTime func(childComplexity int) int
+ ID func(childComplexity int) int
+ Names func(childComplexity int) int
+ Owners func(childComplexity int) int
+ References func(childComplexity int) int
+ }
+
+ Reference struct {
+ ID func(childComplexity int) int
+ }
+
+ Status struct {
+ DiskUsage func(childComplexity int) int
+ Node func(childComplexity int) int
+ NumPeers func(childComplexity int) int
+ Peers func(childComplexity int) int
+ Sync func(childComplexity int) int
+ Validator func(childComplexity int) int
+ Validators func(childComplexity int) int
+ Version func(childComplexity int) int
+ }
+
+ SyncInfo struct {
+ CatchingUp func(childComplexity int) int
+ LatestBlockHash func(childComplexity int) int
+ LatestBlockHeight func(childComplexity int) int
+ LatestBlockTime func(childComplexity int) int
+ }
+
+ ValidatorInfo struct {
+ Address func(childComplexity int) int
+ ProposerPriority func(childComplexity int) int
+ VotingPower func(childComplexity int) int
+ }
+
+ Value struct {
+ Boolean func(childComplexity int) int
+ Float func(childComplexity int) int
+ Int func(childComplexity int) int
+ JSON func(childComplexity int) int
+ Null func(childComplexity int) int
+ Reference func(childComplexity int) int
+ String func(childComplexity int) int
+ Values func(childComplexity int) int
+ }
+}
+
+type QueryResolver interface {
+ GetStatus(ctx context.Context) (*Status, error)
+ GetAccounts(ctx context.Context, addresses []string) ([]*Account, error)
+ GetBondsByIds(ctx context.Context, ids []string) ([]*Bond, error)
+ QueryBonds(ctx context.Context, attributes []*KeyValueInput) ([]*Bond, error)
+ QueryBondsByOwner(ctx context.Context, ownerAddresses []string) ([]*OwnerBonds, error)
+ GetRecordsByIds(ctx context.Context, ids []string) ([]*Record, error)
+ QueryRecords(ctx context.Context, attributes []*KeyValueInput, all *bool) ([]*Record, error)
+ LookupAuthorities(ctx context.Context, names []string) ([]*AuthorityRecord, error)
+ LookupNames(ctx context.Context, names []string) ([]*NameRecord, error)
+ ResolveNames(ctx context.Context, names []string) ([]*Record, error)
+ GetAuctionsByIds(ctx context.Context, ids []string) ([]*Auction, error)
+}
+
+type executableSchema struct {
+ resolvers ResolverRoot
+ directives DirectiveRoot
+ complexity ComplexityRoot
+}
+
+func (e *executableSchema) Schema() *ast.Schema {
+ return parsedSchema
+}
+
+func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) {
+ ec := executionContext{nil, e}
+ _ = ec
+ switch typeName + "." + field {
+
+ case "Account.address":
+ if e.complexity.Account.Address == nil {
+ break
+ }
+
+ return e.complexity.Account.Address(childComplexity), true
+
+ case "Account.balance":
+ if e.complexity.Account.Balance == nil {
+ break
+ }
+
+ return e.complexity.Account.Balance(childComplexity), true
+
+ case "Account.number":
+ if e.complexity.Account.Number == nil {
+ break
+ }
+
+ return e.complexity.Account.Number(childComplexity), true
+
+ case "Account.pubKey":
+ if e.complexity.Account.PubKey == nil {
+ break
+ }
+
+ return e.complexity.Account.PubKey(childComplexity), true
+
+ case "Account.sequence":
+ if e.complexity.Account.Sequence == nil {
+ break
+ }
+
+ return e.complexity.Account.Sequence(childComplexity), true
+
+ case "Auction.bids":
+ if e.complexity.Auction.Bids == nil {
+ break
+ }
+
+ return e.complexity.Auction.Bids(childComplexity), true
+
+ case "Auction.commitFee":
+ if e.complexity.Auction.CommitFee == nil {
+ break
+ }
+
+ return e.complexity.Auction.CommitFee(childComplexity), true
+
+ case "Auction.commitsEndTime":
+ if e.complexity.Auction.CommitsEndTime == nil {
+ break
+ }
+
+ return e.complexity.Auction.CommitsEndTime(childComplexity), true
+
+ case "Auction.createTime":
+ if e.complexity.Auction.CreateTime == nil {
+ break
+ }
+
+ return e.complexity.Auction.CreateTime(childComplexity), true
+
+ case "Auction.id":
+ if e.complexity.Auction.ID == nil {
+ break
+ }
+
+ return e.complexity.Auction.ID(childComplexity), true
+
+ case "Auction.minimumBid":
+ if e.complexity.Auction.MinimumBid == nil {
+ break
+ }
+
+ return e.complexity.Auction.MinimumBid(childComplexity), true
+
+ case "Auction.ownerAddress":
+ if e.complexity.Auction.OwnerAddress == nil {
+ break
+ }
+
+ return e.complexity.Auction.OwnerAddress(childComplexity), true
+
+ case "Auction.revealFee":
+ if e.complexity.Auction.RevealFee == nil {
+ break
+ }
+
+ return e.complexity.Auction.RevealFee(childComplexity), true
+
+ case "Auction.revealsEndTime":
+ if e.complexity.Auction.RevealsEndTime == nil {
+ break
+ }
+
+ return e.complexity.Auction.RevealsEndTime(childComplexity), true
+
+ case "Auction.status":
+ if e.complexity.Auction.Status == nil {
+ break
+ }
+
+ return e.complexity.Auction.Status(childComplexity), true
+
+ case "Auction.winnerAddress":
+ if e.complexity.Auction.WinnerAddress == nil {
+ break
+ }
+
+ return e.complexity.Auction.WinnerAddress(childComplexity), true
+
+ case "Auction.winnerBid":
+ if e.complexity.Auction.WinnerBid == nil {
+ break
+ }
+
+ return e.complexity.Auction.WinnerBid(childComplexity), true
+
+ case "Auction.winnerPrice":
+ if e.complexity.Auction.WinnerPrice == nil {
+ break
+ }
+
+ return e.complexity.Auction.WinnerPrice(childComplexity), true
+
+ case "AuctionBid.bidAmount":
+ if e.complexity.AuctionBid.BidAmount == nil {
+ break
+ }
+
+ return e.complexity.AuctionBid.BidAmount(childComplexity), true
+
+ case "AuctionBid.bidderAddress":
+ if e.complexity.AuctionBid.BidderAddress == nil {
+ break
+ }
+
+ return e.complexity.AuctionBid.BidderAddress(childComplexity), true
+
+ case "AuctionBid.commitFee":
+ if e.complexity.AuctionBid.CommitFee == nil {
+ break
+ }
+
+ return e.complexity.AuctionBid.CommitFee(childComplexity), true
+
+ case "AuctionBid.commitHash":
+ if e.complexity.AuctionBid.CommitHash == nil {
+ break
+ }
+
+ return e.complexity.AuctionBid.CommitHash(childComplexity), true
+
+ case "AuctionBid.commitTime":
+ if e.complexity.AuctionBid.CommitTime == nil {
+ break
+ }
+
+ return e.complexity.AuctionBid.CommitTime(childComplexity), true
+
+ case "AuctionBid.revealFee":
+ if e.complexity.AuctionBid.RevealFee == nil {
+ break
+ }
+
+ return e.complexity.AuctionBid.RevealFee(childComplexity), true
+
+ case "AuctionBid.revealTime":
+ if e.complexity.AuctionBid.RevealTime == nil {
+ break
+ }
+
+ return e.complexity.AuctionBid.RevealTime(childComplexity), true
+
+ case "AuctionBid.status":
+ if e.complexity.AuctionBid.Status == nil {
+ break
+ }
+
+ return e.complexity.AuctionBid.Status(childComplexity), true
+
+ case "AuthorityRecord.auction":
+ if e.complexity.AuthorityRecord.Auction == nil {
+ break
+ }
+
+ return e.complexity.AuthorityRecord.Auction(childComplexity), true
+
+ case "AuthorityRecord.bondId":
+ if e.complexity.AuthorityRecord.BondID == nil {
+ break
+ }
+
+ return e.complexity.AuthorityRecord.BondID(childComplexity), true
+
+ case "AuthorityRecord.expiryTime":
+ if e.complexity.AuthorityRecord.ExpiryTime == nil {
+ break
+ }
+
+ return e.complexity.AuthorityRecord.ExpiryTime(childComplexity), true
+
+ case "AuthorityRecord.height":
+ if e.complexity.AuthorityRecord.Height == nil {
+ break
+ }
+
+ return e.complexity.AuthorityRecord.Height(childComplexity), true
+
+ case "AuthorityRecord.ownerAddress":
+ if e.complexity.AuthorityRecord.OwnerAddress == nil {
+ break
+ }
+
+ return e.complexity.AuthorityRecord.OwnerAddress(childComplexity), true
+
+ case "AuthorityRecord.ownerPublicKey":
+ if e.complexity.AuthorityRecord.OwnerPublicKey == nil {
+ break
+ }
+
+ return e.complexity.AuthorityRecord.OwnerPublicKey(childComplexity), true
+
+ case "AuthorityRecord.status":
+ if e.complexity.AuthorityRecord.Status == nil {
+ break
+ }
+
+ return e.complexity.AuthorityRecord.Status(childComplexity), true
+
+ case "Bond.balance":
+ if e.complexity.Bond.Balance == nil {
+ break
+ }
+
+ return e.complexity.Bond.Balance(childComplexity), true
+
+ case "Bond.id":
+ if e.complexity.Bond.ID == nil {
+ break
+ }
+
+ return e.complexity.Bond.ID(childComplexity), true
+
+ case "Bond.owner":
+ if e.complexity.Bond.Owner == nil {
+ break
+ }
+
+ return e.complexity.Bond.Owner(childComplexity), true
+
+ case "Coin.quantity":
+ if e.complexity.Coin.Quantity == nil {
+ break
+ }
+
+ return e.complexity.Coin.Quantity(childComplexity), true
+
+ case "Coin.type":
+ if e.complexity.Coin.Type == nil {
+ break
+ }
+
+ return e.complexity.Coin.Type(childComplexity), true
+
+ case "KeyValue.key":
+ if e.complexity.KeyValue.Key == nil {
+ break
+ }
+
+ return e.complexity.KeyValue.Key(childComplexity), true
+
+ case "KeyValue.value":
+ if e.complexity.KeyValue.Value == nil {
+ break
+ }
+
+ return e.complexity.KeyValue.Value(childComplexity), true
+
+ case "NameRecord.history":
+ if e.complexity.NameRecord.History == nil {
+ break
+ }
+
+ return e.complexity.NameRecord.History(childComplexity), true
+
+ case "NameRecord.latest":
+ if e.complexity.NameRecord.Latest == nil {
+ break
+ }
+
+ return e.complexity.NameRecord.Latest(childComplexity), true
+
+ case "NameRecordEntry.height":
+ if e.complexity.NameRecordEntry.Height == nil {
+ break
+ }
+
+ return e.complexity.NameRecordEntry.Height(childComplexity), true
+
+ case "NameRecordEntry.id":
+ if e.complexity.NameRecordEntry.ID == nil {
+ break
+ }
+
+ return e.complexity.NameRecordEntry.ID(childComplexity), true
+
+ case "NodeInfo.id":
+ if e.complexity.NodeInfo.ID == nil {
+ break
+ }
+
+ return e.complexity.NodeInfo.ID(childComplexity), true
+
+ case "NodeInfo.moniker":
+ if e.complexity.NodeInfo.Moniker == nil {
+ break
+ }
+
+ return e.complexity.NodeInfo.Moniker(childComplexity), true
+
+ case "NodeInfo.network":
+ if e.complexity.NodeInfo.Network == nil {
+ break
+ }
+
+ return e.complexity.NodeInfo.Network(childComplexity), true
+
+ case "OwnerBonds.bonds":
+ if e.complexity.OwnerBonds.Bonds == nil {
+ break
+ }
+
+ return e.complexity.OwnerBonds.Bonds(childComplexity), true
+
+ case "OwnerBonds.owner":
+ if e.complexity.OwnerBonds.Owner == nil {
+ break
+ }
+
+ return e.complexity.OwnerBonds.Owner(childComplexity), true
+
+ case "PeerInfo.is_outbound":
+ if e.complexity.PeerInfo.IsOutbound == nil {
+ break
+ }
+
+ return e.complexity.PeerInfo.IsOutbound(childComplexity), true
+
+ case "PeerInfo.node":
+ if e.complexity.PeerInfo.Node == nil {
+ break
+ }
+
+ return e.complexity.PeerInfo.Node(childComplexity), true
+
+ case "PeerInfo.remote_ip":
+ if e.complexity.PeerInfo.RemoteIP == nil {
+ break
+ }
+
+ return e.complexity.PeerInfo.RemoteIP(childComplexity), true
+
+ case "Query.getAccounts":
+ if e.complexity.Query.GetAccounts == nil {
+ break
+ }
+
+ args, err := ec.field_Query_getAccounts_args(context.TODO(), rawArgs)
+ if err != nil {
+ return 0, false
+ }
+
+ return e.complexity.Query.GetAccounts(childComplexity, args["addresses"].([]string)), true
+
+ case "Query.getAuctionsByIds":
+ if e.complexity.Query.GetAuctionsByIds == nil {
+ break
+ }
+
+ args, err := ec.field_Query_getAuctionsByIds_args(context.TODO(), rawArgs)
+ if err != nil {
+ return 0, false
+ }
+
+ return e.complexity.Query.GetAuctionsByIds(childComplexity, args["ids"].([]string)), true
+
+ case "Query.getBondsByIds":
+ if e.complexity.Query.GetBondsByIds == nil {
+ break
+ }
+
+ args, err := ec.field_Query_getBondsByIds_args(context.TODO(), rawArgs)
+ if err != nil {
+ return 0, false
+ }
+
+ return e.complexity.Query.GetBondsByIds(childComplexity, args["ids"].([]string)), true
+
+ case "Query.getRecordsByIds":
+ if e.complexity.Query.GetRecordsByIds == nil {
+ break
+ }
+
+ args, err := ec.field_Query_getRecordsByIds_args(context.TODO(), rawArgs)
+ if err != nil {
+ return 0, false
+ }
+
+ return e.complexity.Query.GetRecordsByIds(childComplexity, args["ids"].([]string)), true
+
+ case "Query.getStatus":
+ if e.complexity.Query.GetStatus == nil {
+ break
+ }
+
+ return e.complexity.Query.GetStatus(childComplexity), true
+
+ case "Query.lookupAuthorities":
+ if e.complexity.Query.LookupAuthorities == nil {
+ break
+ }
+
+ args, err := ec.field_Query_lookupAuthorities_args(context.TODO(), rawArgs)
+ if err != nil {
+ return 0, false
+ }
+
+ return e.complexity.Query.LookupAuthorities(childComplexity, args["names"].([]string)), true
+
+ case "Query.lookupNames":
+ if e.complexity.Query.LookupNames == nil {
+ break
+ }
+
+ args, err := ec.field_Query_lookupNames_args(context.TODO(), rawArgs)
+ if err != nil {
+ return 0, false
+ }
+
+ return e.complexity.Query.LookupNames(childComplexity, args["names"].([]string)), true
+
+ case "Query.queryBonds":
+ if e.complexity.Query.QueryBonds == nil {
+ break
+ }
+
+ args, err := ec.field_Query_queryBonds_args(context.TODO(), rawArgs)
+ if err != nil {
+ return 0, false
+ }
+
+ return e.complexity.Query.QueryBonds(childComplexity, args["attributes"].([]*KeyValueInput)), true
+
+ case "Query.queryBondsByOwner":
+ if e.complexity.Query.QueryBondsByOwner == nil {
+ break
+ }
+
+ args, err := ec.field_Query_queryBondsByOwner_args(context.TODO(), rawArgs)
+ if err != nil {
+ return 0, false
+ }
+
+ return e.complexity.Query.QueryBondsByOwner(childComplexity, args["ownerAddresses"].([]string)), true
+
+ case "Query.queryRecords":
+ if e.complexity.Query.QueryRecords == nil {
+ break
+ }
+
+ args, err := ec.field_Query_queryRecords_args(context.TODO(), rawArgs)
+ if err != nil {
+ return 0, false
+ }
+
+ return e.complexity.Query.QueryRecords(childComplexity, args["attributes"].([]*KeyValueInput), args["all"].(*bool)), true
+
+ case "Query.resolveNames":
+ if e.complexity.Query.ResolveNames == nil {
+ break
+ }
+
+ args, err := ec.field_Query_resolveNames_args(context.TODO(), rawArgs)
+ if err != nil {
+ return 0, false
+ }
+
+ return e.complexity.Query.ResolveNames(childComplexity, args["names"].([]string)), true
+
+ case "Record.attributes":
+ if e.complexity.Record.Attributes == nil {
+ break
+ }
+
+ return e.complexity.Record.Attributes(childComplexity), true
+
+ case "Record.bondId":
+ if e.complexity.Record.BondID == nil {
+ break
+ }
+
+ return e.complexity.Record.BondID(childComplexity), true
+
+ case "Record.createTime":
+ if e.complexity.Record.CreateTime == nil {
+ break
+ }
+
+ return e.complexity.Record.CreateTime(childComplexity), true
+
+ case "Record.expiryTime":
+ if e.complexity.Record.ExpiryTime == nil {
+ break
+ }
+
+ return e.complexity.Record.ExpiryTime(childComplexity), true
+
+ case "Record.id":
+ if e.complexity.Record.ID == nil {
+ break
+ }
+
+ return e.complexity.Record.ID(childComplexity), true
+
+ case "Record.names":
+ if e.complexity.Record.Names == nil {
+ break
+ }
+
+ return e.complexity.Record.Names(childComplexity), true
+
+ case "Record.owners":
+ if e.complexity.Record.Owners == nil {
+ break
+ }
+
+ return e.complexity.Record.Owners(childComplexity), true
+
+ case "Record.references":
+ if e.complexity.Record.References == nil {
+ break
+ }
+
+ return e.complexity.Record.References(childComplexity), true
+
+ case "Reference.id":
+ if e.complexity.Reference.ID == nil {
+ break
+ }
+
+ return e.complexity.Reference.ID(childComplexity), true
+
+ case "Status.disk_usage":
+ if e.complexity.Status.DiskUsage == nil {
+ break
+ }
+
+ return e.complexity.Status.DiskUsage(childComplexity), true
+
+ case "Status.node":
+ if e.complexity.Status.Node == nil {
+ break
+ }
+
+ return e.complexity.Status.Node(childComplexity), true
+
+ case "Status.num_peers":
+ if e.complexity.Status.NumPeers == nil {
+ break
+ }
+
+ return e.complexity.Status.NumPeers(childComplexity), true
+
+ case "Status.peers":
+ if e.complexity.Status.Peers == nil {
+ break
+ }
+
+ return e.complexity.Status.Peers(childComplexity), true
+
+ case "Status.sync":
+ if e.complexity.Status.Sync == nil {
+ break
+ }
+
+ return e.complexity.Status.Sync(childComplexity), true
+
+ case "Status.validator":
+ if e.complexity.Status.Validator == nil {
+ break
+ }
+
+ return e.complexity.Status.Validator(childComplexity), true
+
+ case "Status.validators":
+ if e.complexity.Status.Validators == nil {
+ break
+ }
+
+ return e.complexity.Status.Validators(childComplexity), true
+
+ case "Status.version":
+ if e.complexity.Status.Version == nil {
+ break
+ }
+
+ return e.complexity.Status.Version(childComplexity), true
+
+ case "SyncInfo.catching_up":
+ if e.complexity.SyncInfo.CatchingUp == nil {
+ break
+ }
+
+ return e.complexity.SyncInfo.CatchingUp(childComplexity), true
+
+ case "SyncInfo.latest_block_hash":
+ if e.complexity.SyncInfo.LatestBlockHash == nil {
+ break
+ }
+
+ return e.complexity.SyncInfo.LatestBlockHash(childComplexity), true
+
+ case "SyncInfo.latest_block_height":
+ if e.complexity.SyncInfo.LatestBlockHeight == nil {
+ break
+ }
+
+ return e.complexity.SyncInfo.LatestBlockHeight(childComplexity), true
+
+ case "SyncInfo.latest_block_time":
+ if e.complexity.SyncInfo.LatestBlockTime == nil {
+ break
+ }
+
+ return e.complexity.SyncInfo.LatestBlockTime(childComplexity), true
+
+ case "ValidatorInfo.address":
+ if e.complexity.ValidatorInfo.Address == nil {
+ break
+ }
+
+ return e.complexity.ValidatorInfo.Address(childComplexity), true
+
+ case "ValidatorInfo.proposer_priority":
+ if e.complexity.ValidatorInfo.ProposerPriority == nil {
+ break
+ }
+
+ return e.complexity.ValidatorInfo.ProposerPriority(childComplexity), true
+
+ case "ValidatorInfo.voting_power":
+ if e.complexity.ValidatorInfo.VotingPower == nil {
+ break
+ }
+
+ return e.complexity.ValidatorInfo.VotingPower(childComplexity), true
+
+ case "Value.boolean":
+ if e.complexity.Value.Boolean == nil {
+ break
+ }
+
+ return e.complexity.Value.Boolean(childComplexity), true
+
+ case "Value.float":
+ if e.complexity.Value.Float == nil {
+ break
+ }
+
+ return e.complexity.Value.Float(childComplexity), true
+
+ case "Value.int":
+ if e.complexity.Value.Int == nil {
+ break
+ }
+
+ return e.complexity.Value.Int(childComplexity), true
+
+ case "Value.json":
+ if e.complexity.Value.JSON == nil {
+ break
+ }
+
+ return e.complexity.Value.JSON(childComplexity), true
+
+ case "Value.null":
+ if e.complexity.Value.Null == nil {
+ break
+ }
+
+ return e.complexity.Value.Null(childComplexity), true
+
+ case "Value.reference":
+ if e.complexity.Value.Reference == nil {
+ break
+ }
+
+ return e.complexity.Value.Reference(childComplexity), true
+
+ case "Value.string":
+ if e.complexity.Value.String == nil {
+ break
+ }
+
+ return e.complexity.Value.String(childComplexity), true
+
+ case "Value.values":
+ if e.complexity.Value.Values == nil {
+ break
+ }
+
+ return e.complexity.Value.Values(childComplexity), true
+
+ }
+ return 0, false
+}
+
+func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler {
+ rc := graphql.GetOperationContext(ctx)
+ ec := executionContext{rc, e}
+ first := true
+
+ switch rc.Operation.Operation {
+ case ast.Query:
+ return func(ctx context.Context) *graphql.Response {
+ if !first {
+ return nil
+ }
+ first = false
+ data := ec._Query(ctx, rc.Operation.SelectionSet)
+ var buf bytes.Buffer
+ data.MarshalGQL(&buf)
+
+ return &graphql.Response{
+ Data: buf.Bytes(),
+ }
+ }
+
+ default:
+ return graphql.OneShot(graphql.ErrorResponse(ctx, "unsupported GraphQL operation"))
+ }
+}
+
+type executionContext struct {
+ *graphql.OperationContext
+ *executableSchema
+}
+
+func (ec *executionContext) introspectSchema() (*introspection.Schema, error) {
+ if ec.DisableIntrospection {
+ return nil, errors.New("introspection disabled")
+ }
+ return introspection.WrapSchema(parsedSchema), nil
+}
+
+func (ec *executionContext) introspectType(name string) (*introspection.Type, error) {
+ if ec.DisableIntrospection {
+ return nil, errors.New("introspection disabled")
+ }
+ return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil
+}
+
+var sources = []*ast.Source{
+ {Name: "vulcanize/dxns/schema.graphql", Input: `# Reference to another record.
+type Reference {
+ id: String! # ID of linked record.
+}
+
+# Reference to another record.
+input ReferenceInput {
+ id: String!
+}
+
+# Bonds contain funds that are used to pay rent on record registration and renewal.
+type Bond {
+ id: String! # Primary key, auto-generated by the server.
+ owner: String! # Bond owner cosmos-sdk address.
+ balance: [Coin!] # Current balance for each coin type.
+}
+
+# OwnerBonds contains the bonds related the owner
+type OwnerBonds {
+ owner: String!
+ bonds: [Bond!]
+}
+
+# Mutations require payment in coins (e.g. 100wire).
+# Used by the wallet to get the account balance for display and mutations.
+type Coin {
+ type: String! # e.g. 'WIRE'
+ quantity: String! # e.g. 1000000
+}
+# Represents an account on the blockchain.
+# Mutations have to be signed by a particular account.
+type Account {
+ address: String! # Blockchain address.
+ pubKey: String # Public key.
+ number: String! # Account number.
+ sequence: String! # Sequence number used to prevent replays.
+ balance: [Coin!] # Current balance for each coin type.
+}
+
+# Value of a given type.
+type Value {
+ null: Boolean
+
+ int: Int
+ float: Float
+ string: String
+ boolean: Boolean
+ json: String
+
+ reference: Reference
+
+ values: [Value]
+}
+# Value of a given type used as input to queries.
+input ValueInput {
+ null: Boolean
+
+ int: Int
+ float: Float
+ string: String
+ boolean: Boolean
+
+ reference: ReferenceInput
+
+ values: [ValueInput]
+}
+
+# Key/value pair.
+type KeyValue {
+ key: String!
+ value: Value!
+}
+
+# Key/value pair for inputs.
+input KeyValueInput {
+ key: String!
+ value: ValueInput!
+}
+
+# Status information about a node (https://docs.tendermint.com/master/rpc/#/Info/status).
+type NodeInfo {
+ id: String! # Tendermint Node ID.
+ network: String! # Name of the network/blockchain.
+ moniker: String! # Name of the node.
+}
+
+# Node sync status.
+type SyncInfo {
+ latest_block_hash: String!
+ latest_block_height: String!
+ latest_block_time: String!
+ catching_up: Boolean!
+}
+
+# Validator set info (https://docs.tendermint.com/master/rpc/#/Info/validators).
+type ValidatorInfo {
+ address: String!
+ voting_power: String!
+ proposer_priority: String
+}
+
+# Network/peer info (https://docs.tendermint.com/master/rpc/#/Info/net_info).
+type PeerInfo {
+ node: NodeInfo!
+ is_outbound: Boolean!
+ remote_ip: String!
+}
+
+# Vulcanize DXNS status.
+type Status {
+ version: String!
+ node: NodeInfo!
+ sync: SyncInfo!
+ validator: ValidatorInfo
+ validators: [ValidatorInfo]!
+ num_peers: String!
+ peers: [PeerInfo]
+ disk_usage: String!
+}
+
+
+# An auction bid.
+type AuctionBid {
+ bidderAddress: String!
+ status: String!
+ commitHash: String!
+ commitTime: String!
+ commitFee: Coin!
+ revealTime: String!
+ revealFee: Coin!
+ bidAmount: Coin!
+}
+
+# A sealed-bid, 2nd price auction.
+type Auction {
+ id: String! # Auction ID.
+ status: String! # Auction status (commit, reveal, expired).
+ ownerAddress: String! # Auction owner time.
+ createTime: String! # Create time.
+ commitsEndTime: String! # Commit phase end time.
+ revealsEndTime: String! # Reveal phase end time.
+ commitFee: Coin! # Fee required to bid/participate in the auction.
+ revealFee: Coin! # Reveal fee (paid back to bidders only if they unseal/reveal the bid).
+ minimumBid: Coin! # Minimum bid amount.
+ winnerAddress: String! # Winner address.
+ winnerBid: Coin! # The winning bid amount.
+ winnerPrice: Coin! # The price that the winner actually pays (2nd highest bid).
+ bids: [AuctionBid] # Bids make in the auction.
+}
+
+
+# Record defines the basic properties of an entity in the graph database.
+type Record {
+ id: String! # Computed attribute: Multibase encoded content hash (https://github.com/multiformats/multibase).
+ names: [String!] # Names pointing to this CID (reverse lookup).
+
+ bondId: String! # Associated bond ID.
+ createTime: String! # Record create time.
+ expiryTime: String! # Record expiry time.
+
+ owners: [String!] # Addresses of record owners.
+ attributes: [KeyValue] # Record attributes.
+ references: [Record] # Record references.
+}
+
+# Name authority record.
+type AuthorityRecord {
+ ownerAddress: String! # Owner address.
+ ownerPublicKey: String! # Owner public key.
+ height: String! # Height at which record was created.
+ status: String! # Status (active, auction, expired).
+ bondId: String! # Associated bond ID.
+ expiryTime: String! # Authority expiry time.
+ auction: Auction # Authority auction.
+}
+
+# Name record entry, created at a particular height.
+type NameRecordEntry {
+ id: String! # Target record ID.
+ height: String! # Height at which record was created.
+}
+
+# Name record stores the latest and historical name -> record ID mappings.
+type NameRecord {
+ latest: NameRecordEntry! # Latest mame record entry.
+ history: [NameRecordEntry] # Historical name record entries.
+}
+
+type Query {
+ #
+ # Status API.
+ #
+ getStatus: Status!
+
+ # Get blockchain accounts.
+ getAccounts(
+ addresses: [String!]
+ ): [Account]
+
+ # Get bonds by IDs.
+ getBondsByIds(
+ ids: [String!]
+ ): [Bond]
+
+ # Query bonds.
+ queryBonds(
+ attributes: [KeyValueInput]
+ ): [Bond]
+
+ # Query bonds by owner.
+ queryBondsByOwner(
+ ownerAddresses: [String!]
+ ): [OwnerBonds]
+
+ #
+ # GraphDB API.
+ #
+
+ # Get records by IDs.
+ getRecordsByIds(
+ ids: [String!]
+ ): [Record]
+
+ # Query records.
+ queryRecords(
+ # Multiple attribute conditions are in a logical AND.
+ attributes: [KeyValueInput]
+
+ # Whether to query all records, not just named ones (false by default).
+ all: Boolean
+ ): [Record]
+
+ #
+ # Naming API.
+ #
+
+ # Lookup authority information.
+ lookupAuthorities(
+ names: [String!]
+ ): [AuthorityRecord]!
+
+ # Lookup name to record mapping information.
+ lookupNames(
+ names: [String!]
+ ): [NameRecord]!
+
+ # Resolve names to records.
+ resolveNames(
+ names: [String!]
+ ): [Record]!
+
+ #
+ # Auctions API.
+ #
+
+ # Get auctions by IDs.
+ getAuctionsByIds(
+ ids: [String!]
+ ): [Auction]
+}`, BuiltIn: false},
+}
+var parsedSchema = gqlparser.MustLoadSchema(sources...)
+
+// endregion ************************** generated!.gotpl **************************
+
+// region ***************************** args.gotpl *****************************
+
+func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+ var err error
+ args := map[string]interface{}{}
+ var arg0 string
+ if tmp, ok := rawArgs["name"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
+ arg0, err = ec.unmarshalNString2string(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["name"] = arg0
+ return args, nil
+}
+
+func (ec *executionContext) field_Query_getAccounts_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+ var err error
+ args := map[string]interface{}{}
+ var arg0 []string
+ if tmp, ok := rawArgs["addresses"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("addresses"))
+ arg0, err = ec.unmarshalOString2ᚕstringᚄ(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["addresses"] = arg0
+ return args, nil
+}
+
+func (ec *executionContext) field_Query_getAuctionsByIds_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+ var err error
+ args := map[string]interface{}{}
+ var arg0 []string
+ if tmp, ok := rawArgs["ids"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ids"))
+ arg0, err = ec.unmarshalOString2ᚕstringᚄ(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["ids"] = arg0
+ return args, nil
+}
+
+func (ec *executionContext) field_Query_getBondsByIds_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+ var err error
+ args := map[string]interface{}{}
+ var arg0 []string
+ if tmp, ok := rawArgs["ids"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ids"))
+ arg0, err = ec.unmarshalOString2ᚕstringᚄ(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["ids"] = arg0
+ return args, nil
+}
+
+func (ec *executionContext) field_Query_getRecordsByIds_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+ var err error
+ args := map[string]interface{}{}
+ var arg0 []string
+ if tmp, ok := rawArgs["ids"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ids"))
+ arg0, err = ec.unmarshalOString2ᚕstringᚄ(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["ids"] = arg0
+ return args, nil
+}
+
+func (ec *executionContext) field_Query_lookupAuthorities_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+ var err error
+ args := map[string]interface{}{}
+ var arg0 []string
+ if tmp, ok := rawArgs["names"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("names"))
+ arg0, err = ec.unmarshalOString2ᚕstringᚄ(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["names"] = arg0
+ return args, nil
+}
+
+func (ec *executionContext) field_Query_lookupNames_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+ var err error
+ args := map[string]interface{}{}
+ var arg0 []string
+ if tmp, ok := rawArgs["names"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("names"))
+ arg0, err = ec.unmarshalOString2ᚕstringᚄ(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["names"] = arg0
+ return args, nil
+}
+
+func (ec *executionContext) field_Query_queryBondsByOwner_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+ var err error
+ args := map[string]interface{}{}
+ var arg0 []string
+ if tmp, ok := rawArgs["ownerAddresses"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ownerAddresses"))
+ arg0, err = ec.unmarshalOString2ᚕstringᚄ(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["ownerAddresses"] = arg0
+ return args, nil
+}
+
+func (ec *executionContext) field_Query_queryBonds_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+ var err error
+ args := map[string]interface{}{}
+ var arg0 []*KeyValueInput
+ if tmp, ok := rawArgs["attributes"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("attributes"))
+ arg0, err = ec.unmarshalOKeyValueInput2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐKeyValueInput(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["attributes"] = arg0
+ return args, nil
+}
+
+func (ec *executionContext) field_Query_queryRecords_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+ var err error
+ args := map[string]interface{}{}
+ var arg0 []*KeyValueInput
+ if tmp, ok := rawArgs["attributes"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("attributes"))
+ arg0, err = ec.unmarshalOKeyValueInput2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐKeyValueInput(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["attributes"] = arg0
+ var arg1 *bool
+ if tmp, ok := rawArgs["all"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("all"))
+ arg1, err = ec.unmarshalOBoolean2ᚖbool(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["all"] = arg1
+ return args, nil
+}
+
+func (ec *executionContext) field_Query_resolveNames_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+ var err error
+ args := map[string]interface{}{}
+ var arg0 []string
+ if tmp, ok := rawArgs["names"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("names"))
+ arg0, err = ec.unmarshalOString2ᚕstringᚄ(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["names"] = arg0
+ return args, nil
+}
+
+func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+ var err error
+ args := map[string]interface{}{}
+ var arg0 bool
+ if tmp, ok := rawArgs["includeDeprecated"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated"))
+ arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["includeDeprecated"] = arg0
+ return args, nil
+}
+
+func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+ var err error
+ args := map[string]interface{}{}
+ var arg0 bool
+ if tmp, ok := rawArgs["includeDeprecated"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated"))
+ arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["includeDeprecated"] = arg0
+ return args, nil
+}
+
+// endregion ***************************** args.gotpl *****************************
+
+// region ************************** directives.gotpl **************************
+
+// endregion ************************** directives.gotpl **************************
+
+// region **************************** field.gotpl *****************************
+
+func (ec *executionContext) _Account_address(ctx context.Context, field graphql.CollectedField, obj *Account) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Account",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Address, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Account_pubKey(ctx context.Context, field graphql.CollectedField, obj *Account) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Account",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.PubKey, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Account_number(ctx context.Context, field graphql.CollectedField, obj *Account) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Account",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Number, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Account_sequence(ctx context.Context, field graphql.CollectedField, obj *Account) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Account",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Sequence, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Account_balance(ctx context.Context, field graphql.CollectedField, obj *Account) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Account",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Balance, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]*Coin)
+ fc.Result = res
+ return ec.marshalOCoin2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐCoinᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Auction_id(ctx context.Context, field graphql.CollectedField, obj *Auction) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Auction",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.ID, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Auction_status(ctx context.Context, field graphql.CollectedField, obj *Auction) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Auction",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Status, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Auction_ownerAddress(ctx context.Context, field graphql.CollectedField, obj *Auction) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Auction",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.OwnerAddress, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Auction_createTime(ctx context.Context, field graphql.CollectedField, obj *Auction) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Auction",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.CreateTime, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Auction_commitsEndTime(ctx context.Context, field graphql.CollectedField, obj *Auction) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Auction",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.CommitsEndTime, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Auction_revealsEndTime(ctx context.Context, field graphql.CollectedField, obj *Auction) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Auction",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.RevealsEndTime, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Auction_commitFee(ctx context.Context, field graphql.CollectedField, obj *Auction) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Auction",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.CommitFee, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*Coin)
+ fc.Result = res
+ return ec.marshalNCoin2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐCoin(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Auction_revealFee(ctx context.Context, field graphql.CollectedField, obj *Auction) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Auction",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.RevealFee, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*Coin)
+ fc.Result = res
+ return ec.marshalNCoin2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐCoin(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Auction_minimumBid(ctx context.Context, field graphql.CollectedField, obj *Auction) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Auction",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.MinimumBid, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*Coin)
+ fc.Result = res
+ return ec.marshalNCoin2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐCoin(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Auction_winnerAddress(ctx context.Context, field graphql.CollectedField, obj *Auction) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Auction",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.WinnerAddress, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Auction_winnerBid(ctx context.Context, field graphql.CollectedField, obj *Auction) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Auction",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.WinnerBid, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*Coin)
+ fc.Result = res
+ return ec.marshalNCoin2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐCoin(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Auction_winnerPrice(ctx context.Context, field graphql.CollectedField, obj *Auction) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Auction",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.WinnerPrice, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*Coin)
+ fc.Result = res
+ return ec.marshalNCoin2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐCoin(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Auction_bids(ctx context.Context, field graphql.CollectedField, obj *Auction) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Auction",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Bids, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]*AuctionBid)
+ fc.Result = res
+ return ec.marshalOAuctionBid2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐAuctionBid(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _AuctionBid_bidderAddress(ctx context.Context, field graphql.CollectedField, obj *AuctionBid) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "AuctionBid",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.BidderAddress, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _AuctionBid_status(ctx context.Context, field graphql.CollectedField, obj *AuctionBid) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "AuctionBid",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Status, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _AuctionBid_commitHash(ctx context.Context, field graphql.CollectedField, obj *AuctionBid) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "AuctionBid",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.CommitHash, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _AuctionBid_commitTime(ctx context.Context, field graphql.CollectedField, obj *AuctionBid) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "AuctionBid",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.CommitTime, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _AuctionBid_commitFee(ctx context.Context, field graphql.CollectedField, obj *AuctionBid) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "AuctionBid",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.CommitFee, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*Coin)
+ fc.Result = res
+ return ec.marshalNCoin2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐCoin(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _AuctionBid_revealTime(ctx context.Context, field graphql.CollectedField, obj *AuctionBid) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "AuctionBid",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.RevealTime, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _AuctionBid_revealFee(ctx context.Context, field graphql.CollectedField, obj *AuctionBid) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "AuctionBid",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.RevealFee, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*Coin)
+ fc.Result = res
+ return ec.marshalNCoin2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐCoin(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _AuctionBid_bidAmount(ctx context.Context, field graphql.CollectedField, obj *AuctionBid) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "AuctionBid",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.BidAmount, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*Coin)
+ fc.Result = res
+ return ec.marshalNCoin2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐCoin(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _AuthorityRecord_ownerAddress(ctx context.Context, field graphql.CollectedField, obj *AuthorityRecord) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "AuthorityRecord",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.OwnerAddress, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _AuthorityRecord_ownerPublicKey(ctx context.Context, field graphql.CollectedField, obj *AuthorityRecord) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "AuthorityRecord",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.OwnerPublicKey, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _AuthorityRecord_height(ctx context.Context, field graphql.CollectedField, obj *AuthorityRecord) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "AuthorityRecord",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Height, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _AuthorityRecord_status(ctx context.Context, field graphql.CollectedField, obj *AuthorityRecord) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "AuthorityRecord",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Status, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _AuthorityRecord_bondId(ctx context.Context, field graphql.CollectedField, obj *AuthorityRecord) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "AuthorityRecord",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.BondID, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _AuthorityRecord_expiryTime(ctx context.Context, field graphql.CollectedField, obj *AuthorityRecord) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "AuthorityRecord",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.ExpiryTime, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _AuthorityRecord_auction(ctx context.Context, field graphql.CollectedField, obj *AuthorityRecord) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "AuthorityRecord",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Auction, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*Auction)
+ fc.Result = res
+ return ec.marshalOAuction2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐAuction(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Bond_id(ctx context.Context, field graphql.CollectedField, obj *Bond) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Bond",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.ID, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Bond_owner(ctx context.Context, field graphql.CollectedField, obj *Bond) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Bond",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Owner, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Bond_balance(ctx context.Context, field graphql.CollectedField, obj *Bond) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Bond",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Balance, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]*Coin)
+ fc.Result = res
+ return ec.marshalOCoin2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐCoinᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Coin_type(ctx context.Context, field graphql.CollectedField, obj *Coin) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Coin",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Type, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Coin_quantity(ctx context.Context, field graphql.CollectedField, obj *Coin) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Coin",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Quantity, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _KeyValue_key(ctx context.Context, field graphql.CollectedField, obj *KeyValue) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "KeyValue",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Key, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _KeyValue_value(ctx context.Context, field graphql.CollectedField, obj *KeyValue) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "KeyValue",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Value, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*Value)
+ fc.Result = res
+ return ec.marshalNValue2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐValue(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _NameRecord_latest(ctx context.Context, field graphql.CollectedField, obj *NameRecord) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "NameRecord",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Latest, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*NameRecordEntry)
+ fc.Result = res
+ return ec.marshalNNameRecordEntry2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐNameRecordEntry(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _NameRecord_history(ctx context.Context, field graphql.CollectedField, obj *NameRecord) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "NameRecord",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.History, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]*NameRecordEntry)
+ fc.Result = res
+ return ec.marshalONameRecordEntry2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐNameRecordEntry(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _NameRecordEntry_id(ctx context.Context, field graphql.CollectedField, obj *NameRecordEntry) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "NameRecordEntry",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.ID, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _NameRecordEntry_height(ctx context.Context, field graphql.CollectedField, obj *NameRecordEntry) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "NameRecordEntry",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Height, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _NodeInfo_id(ctx context.Context, field graphql.CollectedField, obj *NodeInfo) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "NodeInfo",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.ID, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _NodeInfo_network(ctx context.Context, field graphql.CollectedField, obj *NodeInfo) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "NodeInfo",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Network, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _NodeInfo_moniker(ctx context.Context, field graphql.CollectedField, obj *NodeInfo) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "NodeInfo",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Moniker, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _OwnerBonds_owner(ctx context.Context, field graphql.CollectedField, obj *OwnerBonds) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "OwnerBonds",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Owner, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _OwnerBonds_bonds(ctx context.Context, field graphql.CollectedField, obj *OwnerBonds) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "OwnerBonds",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Bonds, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]*Bond)
+ fc.Result = res
+ return ec.marshalOBond2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐBondᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _PeerInfo_node(ctx context.Context, field graphql.CollectedField, obj *PeerInfo) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "PeerInfo",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Node, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*NodeInfo)
+ fc.Result = res
+ return ec.marshalNNodeInfo2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐNodeInfo(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _PeerInfo_is_outbound(ctx context.Context, field graphql.CollectedField, obj *PeerInfo) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "PeerInfo",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.IsOutbound, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(bool)
+ fc.Result = res
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _PeerInfo_remote_ip(ctx context.Context, field graphql.CollectedField, obj *PeerInfo) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "PeerInfo",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.RemoteIP, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Query_getStatus(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Query().GetStatus(rctx)
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*Status)
+ fc.Result = res
+ return ec.marshalNStatus2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐStatus(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Query_getAccounts(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ rawArgs := field.ArgumentMap(ec.Variables)
+ args, err := ec.field_Query_getAccounts_args(ctx, rawArgs)
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ fc.Args = args
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Query().GetAccounts(rctx, args["addresses"].([]string))
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]*Account)
+ fc.Result = res
+ return ec.marshalOAccount2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐAccount(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Query_getBondsByIds(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ rawArgs := field.ArgumentMap(ec.Variables)
+ args, err := ec.field_Query_getBondsByIds_args(ctx, rawArgs)
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ fc.Args = args
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Query().GetBondsByIds(rctx, args["ids"].([]string))
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]*Bond)
+ fc.Result = res
+ return ec.marshalOBond2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐBond(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Query_queryBonds(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ rawArgs := field.ArgumentMap(ec.Variables)
+ args, err := ec.field_Query_queryBonds_args(ctx, rawArgs)
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ fc.Args = args
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Query().QueryBonds(rctx, args["attributes"].([]*KeyValueInput))
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]*Bond)
+ fc.Result = res
+ return ec.marshalOBond2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐBond(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Query_queryBondsByOwner(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ rawArgs := field.ArgumentMap(ec.Variables)
+ args, err := ec.field_Query_queryBondsByOwner_args(ctx, rawArgs)
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ fc.Args = args
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Query().QueryBondsByOwner(rctx, args["ownerAddresses"].([]string))
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]*OwnerBonds)
+ fc.Result = res
+ return ec.marshalOOwnerBonds2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐOwnerBonds(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Query_getRecordsByIds(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ rawArgs := field.ArgumentMap(ec.Variables)
+ args, err := ec.field_Query_getRecordsByIds_args(ctx, rawArgs)
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ fc.Args = args
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Query().GetRecordsByIds(rctx, args["ids"].([]string))
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]*Record)
+ fc.Result = res
+ return ec.marshalORecord2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐRecord(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Query_queryRecords(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ rawArgs := field.ArgumentMap(ec.Variables)
+ args, err := ec.field_Query_queryRecords_args(ctx, rawArgs)
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ fc.Args = args
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Query().QueryRecords(rctx, args["attributes"].([]*KeyValueInput), args["all"].(*bool))
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]*Record)
+ fc.Result = res
+ return ec.marshalORecord2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐRecord(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Query_lookupAuthorities(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ rawArgs := field.ArgumentMap(ec.Variables)
+ args, err := ec.field_Query_lookupAuthorities_args(ctx, rawArgs)
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ fc.Args = args
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Query().LookupAuthorities(rctx, args["names"].([]string))
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]*AuthorityRecord)
+ fc.Result = res
+ return ec.marshalNAuthorityRecord2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐAuthorityRecord(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Query_lookupNames(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ rawArgs := field.ArgumentMap(ec.Variables)
+ args, err := ec.field_Query_lookupNames_args(ctx, rawArgs)
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ fc.Args = args
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Query().LookupNames(rctx, args["names"].([]string))
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]*NameRecord)
+ fc.Result = res
+ return ec.marshalNNameRecord2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐNameRecord(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Query_resolveNames(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ rawArgs := field.ArgumentMap(ec.Variables)
+ args, err := ec.field_Query_resolveNames_args(ctx, rawArgs)
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ fc.Args = args
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Query().ResolveNames(rctx, args["names"].([]string))
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]*Record)
+ fc.Result = res
+ return ec.marshalNRecord2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐRecord(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Query_getAuctionsByIds(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ rawArgs := field.ArgumentMap(ec.Variables)
+ args, err := ec.field_Query_getAuctionsByIds_args(ctx, rawArgs)
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ fc.Args = args
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Query().GetAuctionsByIds(rctx, args["ids"].([]string))
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]*Auction)
+ fc.Result = res
+ return ec.marshalOAuction2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐAuction(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ rawArgs := field.ArgumentMap(ec.Variables)
+ args, err := ec.field_Query___type_args(ctx, rawArgs)
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ fc.Args = args
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.introspectType(args["name"].(string))
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*introspection.Type)
+ fc.Result = res
+ return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.introspectSchema()
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*introspection.Schema)
+ fc.Result = res
+ return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Record_id(ctx context.Context, field graphql.CollectedField, obj *Record) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Record",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.ID, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Record_names(ctx context.Context, field graphql.CollectedField, obj *Record) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Record",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Names, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]string)
+ fc.Result = res
+ return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Record_bondId(ctx context.Context, field graphql.CollectedField, obj *Record) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Record",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.BondID, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Record_createTime(ctx context.Context, field graphql.CollectedField, obj *Record) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Record",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.CreateTime, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Record_expiryTime(ctx context.Context, field graphql.CollectedField, obj *Record) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Record",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.ExpiryTime, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Record_owners(ctx context.Context, field graphql.CollectedField, obj *Record) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Record",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Owners, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]string)
+ fc.Result = res
+ return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Record_attributes(ctx context.Context, field graphql.CollectedField, obj *Record) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Record",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Attributes, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]*KeyValue)
+ fc.Result = res
+ return ec.marshalOKeyValue2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐKeyValue(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Record_references(ctx context.Context, field graphql.CollectedField, obj *Record) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Record",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.References, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]*Record)
+ fc.Result = res
+ return ec.marshalORecord2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐRecord(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Reference_id(ctx context.Context, field graphql.CollectedField, obj *Reference) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Reference",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.ID, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Status_version(ctx context.Context, field graphql.CollectedField, obj *Status) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Status",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Version, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Status_node(ctx context.Context, field graphql.CollectedField, obj *Status) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Status",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Node, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*NodeInfo)
+ fc.Result = res
+ return ec.marshalNNodeInfo2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐNodeInfo(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Status_sync(ctx context.Context, field graphql.CollectedField, obj *Status) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Status",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Sync, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*SyncInfo)
+ fc.Result = res
+ return ec.marshalNSyncInfo2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐSyncInfo(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Status_validator(ctx context.Context, field graphql.CollectedField, obj *Status) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Status",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Validator, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*ValidatorInfo)
+ fc.Result = res
+ return ec.marshalOValidatorInfo2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐValidatorInfo(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Status_validators(ctx context.Context, field graphql.CollectedField, obj *Status) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Status",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Validators, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]*ValidatorInfo)
+ fc.Result = res
+ return ec.marshalNValidatorInfo2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐValidatorInfo(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Status_num_peers(ctx context.Context, field graphql.CollectedField, obj *Status) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Status",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.NumPeers, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Status_peers(ctx context.Context, field graphql.CollectedField, obj *Status) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Status",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Peers, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]*PeerInfo)
+ fc.Result = res
+ return ec.marshalOPeerInfo2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐPeerInfo(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Status_disk_usage(ctx context.Context, field graphql.CollectedField, obj *Status) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Status",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.DiskUsage, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _SyncInfo_latest_block_hash(ctx context.Context, field graphql.CollectedField, obj *SyncInfo) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "SyncInfo",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.LatestBlockHash, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _SyncInfo_latest_block_height(ctx context.Context, field graphql.CollectedField, obj *SyncInfo) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "SyncInfo",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.LatestBlockHeight, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _SyncInfo_latest_block_time(ctx context.Context, field graphql.CollectedField, obj *SyncInfo) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "SyncInfo",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.LatestBlockTime, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _SyncInfo_catching_up(ctx context.Context, field graphql.CollectedField, obj *SyncInfo) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "SyncInfo",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.CatchingUp, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(bool)
+ fc.Result = res
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _ValidatorInfo_address(ctx context.Context, field graphql.CollectedField, obj *ValidatorInfo) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "ValidatorInfo",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Address, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _ValidatorInfo_voting_power(ctx context.Context, field graphql.CollectedField, obj *ValidatorInfo) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "ValidatorInfo",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.VotingPower, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _ValidatorInfo_proposer_priority(ctx context.Context, field graphql.CollectedField, obj *ValidatorInfo) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "ValidatorInfo",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.ProposerPriority, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Value_null(ctx context.Context, field graphql.CollectedField, obj *Value) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Value",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Null, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*bool)
+ fc.Result = res
+ return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Value_int(ctx context.Context, field graphql.CollectedField, obj *Value) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Value",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Int, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*int)
+ fc.Result = res
+ return ec.marshalOInt2ᚖint(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Value_float(ctx context.Context, field graphql.CollectedField, obj *Value) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Value",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Float, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*float64)
+ fc.Result = res
+ return ec.marshalOFloat2ᚖfloat64(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Value_string(ctx context.Context, field graphql.CollectedField, obj *Value) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Value",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.String, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Value_boolean(ctx context.Context, field graphql.CollectedField, obj *Value) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Value",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Boolean, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*bool)
+ fc.Result = res
+ return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Value_json(ctx context.Context, field graphql.CollectedField, obj *Value) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Value",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.JSON, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Value_reference(ctx context.Context, field graphql.CollectedField, obj *Value) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Value",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Reference, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*Reference)
+ fc.Result = res
+ return ec.marshalOReference2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐReference(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) _Value_values(ctx context.Context, field graphql.CollectedField, obj *Value) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "Value",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Values, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]*Value)
+ fc.Result = res
+ return ec.marshalOValue2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐValue(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "__Directive",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Name, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "__Directive",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Description, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalOString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "__Directive",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Locations, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]string)
+ fc.Result = res
+ return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "__Directive",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Args, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]introspection.InputValue)
+ fc.Result = res
+ return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "__Directive",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.IsRepeatable, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(bool)
+ fc.Result = res
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "__EnumValue",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Name, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "__EnumValue",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Description, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalOString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "__EnumValue",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.IsDeprecated(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(bool)
+ fc.Result = res
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "__EnumValue",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.DeprecationReason(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "__Field",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Name, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "__Field",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Description, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalOString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "__Field",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Args, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]introspection.InputValue)
+ fc.Result = res
+ return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "__Field",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Type, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*introspection.Type)
+ fc.Result = res
+ return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "__Field",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.IsDeprecated(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(bool)
+ fc.Result = res
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "__Field",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.DeprecationReason(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "__InputValue",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Name, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "__InputValue",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Description, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalOString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "__InputValue",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Type, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*introspection.Type)
+ fc.Result = res
+ return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "__InputValue",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.DefaultValue, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "__Schema",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Types(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]introspection.Type)
+ fc.Result = res
+ return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "__Schema",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.QueryType(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*introspection.Type)
+ fc.Result = res
+ return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "__Schema",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.MutationType(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*introspection.Type)
+ fc.Result = res
+ return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "__Schema",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.SubscriptionType(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*introspection.Type)
+ fc.Result = res
+ return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "__Schema",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Directives(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]introspection.Directive)
+ fc.Result = res
+ return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "__Type",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Kind(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalN__TypeKind2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "__Type",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Name(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "__Type",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Description(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalOString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "__Type",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ rawArgs := field.ArgumentMap(ec.Variables)
+ args, err := ec.field___Type_fields_args(ctx, rawArgs)
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ fc.Args = args
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Fields(args["includeDeprecated"].(bool)), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]introspection.Field)
+ fc.Result = res
+ return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "__Type",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Interfaces(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]introspection.Type)
+ fc.Result = res
+ return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "__Type",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.PossibleTypes(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]introspection.Type)
+ fc.Result = res
+ return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "__Type",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ rawArgs := field.ArgumentMap(ec.Variables)
+ args, err := ec.field___Type_enumValues_args(ctx, rawArgs)
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ fc.Args = args
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.EnumValues(args["includeDeprecated"].(bool)), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]introspection.EnumValue)
+ fc.Result = res
+ return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "__Type",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.InputFields(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]introspection.InputValue)
+ fc.Result = res
+ return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ fc := &graphql.FieldContext{
+ Object: "__Type",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
+ }
+
+ ctx = graphql.WithFieldContext(ctx, fc)
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.OfType(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*introspection.Type)
+ fc.Result = res
+ return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
+}
+
+// endregion **************************** field.gotpl *****************************
+
+// region **************************** input.gotpl *****************************
+
+func (ec *executionContext) unmarshalInputKeyValueInput(ctx context.Context, obj interface{}) (KeyValueInput, error) {
+ var it KeyValueInput
+ asMap := map[string]interface{}{}
+ for k, v := range obj.(map[string]interface{}) {
+ asMap[k] = v
+ }
+
+ for k, v := range asMap {
+ switch k {
+ case "key":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key"))
+ it.Key, err = ec.unmarshalNString2string(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "value":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value"))
+ it.Value, err = ec.unmarshalNValueInput2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐValueInput(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ }
+ }
+
+ return it, nil
+}
+
+func (ec *executionContext) unmarshalInputReferenceInput(ctx context.Context, obj interface{}) (ReferenceInput, error) {
+ var it ReferenceInput
+ asMap := map[string]interface{}{}
+ for k, v := range obj.(map[string]interface{}) {
+ asMap[k] = v
+ }
+
+ for k, v := range asMap {
+ switch k {
+ case "id":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
+ it.ID, err = ec.unmarshalNString2string(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ }
+ }
+
+ return it, nil
+}
+
+func (ec *executionContext) unmarshalInputValueInput(ctx context.Context, obj interface{}) (ValueInput, error) {
+ var it ValueInput
+ asMap := map[string]interface{}{}
+ for k, v := range obj.(map[string]interface{}) {
+ asMap[k] = v
+ }
+
+ for k, v := range asMap {
+ switch k {
+ case "null":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("null"))
+ it.Null, err = ec.unmarshalOBoolean2ᚖbool(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "int":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("int"))
+ it.Int, err = ec.unmarshalOInt2ᚖint(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "float":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("float"))
+ it.Float, err = ec.unmarshalOFloat2ᚖfloat64(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "string":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("string"))
+ it.String, err = ec.unmarshalOString2ᚖstring(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "boolean":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("boolean"))
+ it.Boolean, err = ec.unmarshalOBoolean2ᚖbool(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "reference":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("reference"))
+ it.Reference, err = ec.unmarshalOReferenceInput2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐReferenceInput(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "values":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("values"))
+ it.Values, err = ec.unmarshalOValueInput2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐValueInput(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ }
+ }
+
+ return it, nil
+}
+
+// endregion **************************** input.gotpl *****************************
+
+// region ************************** interface.gotpl ***************************
+
+// endregion ************************** interface.gotpl ***************************
+
+// region **************************** object.gotpl ****************************
+
+var accountImplementors = []string{"Account"}
+
+func (ec *executionContext) _Account(ctx context.Context, sel ast.SelectionSet, obj *Account) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, accountImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("Account")
+ case "address":
+ out.Values[i] = ec._Account_address(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "pubKey":
+ out.Values[i] = ec._Account_pubKey(ctx, field, obj)
+ case "number":
+ out.Values[i] = ec._Account_number(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "sequence":
+ out.Values[i] = ec._Account_sequence(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "balance":
+ out.Values[i] = ec._Account_balance(ctx, field, obj)
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var auctionImplementors = []string{"Auction"}
+
+func (ec *executionContext) _Auction(ctx context.Context, sel ast.SelectionSet, obj *Auction) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, auctionImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("Auction")
+ case "id":
+ out.Values[i] = ec._Auction_id(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "status":
+ out.Values[i] = ec._Auction_status(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "ownerAddress":
+ out.Values[i] = ec._Auction_ownerAddress(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "createTime":
+ out.Values[i] = ec._Auction_createTime(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "commitsEndTime":
+ out.Values[i] = ec._Auction_commitsEndTime(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "revealsEndTime":
+ out.Values[i] = ec._Auction_revealsEndTime(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "commitFee":
+ out.Values[i] = ec._Auction_commitFee(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "revealFee":
+ out.Values[i] = ec._Auction_revealFee(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "minimumBid":
+ out.Values[i] = ec._Auction_minimumBid(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "winnerAddress":
+ out.Values[i] = ec._Auction_winnerAddress(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "winnerBid":
+ out.Values[i] = ec._Auction_winnerBid(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "winnerPrice":
+ out.Values[i] = ec._Auction_winnerPrice(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "bids":
+ out.Values[i] = ec._Auction_bids(ctx, field, obj)
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var auctionBidImplementors = []string{"AuctionBid"}
+
+func (ec *executionContext) _AuctionBid(ctx context.Context, sel ast.SelectionSet, obj *AuctionBid) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, auctionBidImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("AuctionBid")
+ case "bidderAddress":
+ out.Values[i] = ec._AuctionBid_bidderAddress(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "status":
+ out.Values[i] = ec._AuctionBid_status(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "commitHash":
+ out.Values[i] = ec._AuctionBid_commitHash(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "commitTime":
+ out.Values[i] = ec._AuctionBid_commitTime(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "commitFee":
+ out.Values[i] = ec._AuctionBid_commitFee(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "revealTime":
+ out.Values[i] = ec._AuctionBid_revealTime(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "revealFee":
+ out.Values[i] = ec._AuctionBid_revealFee(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "bidAmount":
+ out.Values[i] = ec._AuctionBid_bidAmount(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var authorityRecordImplementors = []string{"AuthorityRecord"}
+
+func (ec *executionContext) _AuthorityRecord(ctx context.Context, sel ast.SelectionSet, obj *AuthorityRecord) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, authorityRecordImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("AuthorityRecord")
+ case "ownerAddress":
+ out.Values[i] = ec._AuthorityRecord_ownerAddress(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "ownerPublicKey":
+ out.Values[i] = ec._AuthorityRecord_ownerPublicKey(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "height":
+ out.Values[i] = ec._AuthorityRecord_height(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "status":
+ out.Values[i] = ec._AuthorityRecord_status(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "bondId":
+ out.Values[i] = ec._AuthorityRecord_bondId(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "expiryTime":
+ out.Values[i] = ec._AuthorityRecord_expiryTime(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "auction":
+ out.Values[i] = ec._AuthorityRecord_auction(ctx, field, obj)
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var bondImplementors = []string{"Bond"}
+
+func (ec *executionContext) _Bond(ctx context.Context, sel ast.SelectionSet, obj *Bond) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, bondImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("Bond")
+ case "id":
+ out.Values[i] = ec._Bond_id(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "owner":
+ out.Values[i] = ec._Bond_owner(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "balance":
+ out.Values[i] = ec._Bond_balance(ctx, field, obj)
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var coinImplementors = []string{"Coin"}
+
+func (ec *executionContext) _Coin(ctx context.Context, sel ast.SelectionSet, obj *Coin) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, coinImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("Coin")
+ case "type":
+ out.Values[i] = ec._Coin_type(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "quantity":
+ out.Values[i] = ec._Coin_quantity(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var keyValueImplementors = []string{"KeyValue"}
+
+func (ec *executionContext) _KeyValue(ctx context.Context, sel ast.SelectionSet, obj *KeyValue) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, keyValueImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("KeyValue")
+ case "key":
+ out.Values[i] = ec._KeyValue_key(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "value":
+ out.Values[i] = ec._KeyValue_value(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var nameRecordImplementors = []string{"NameRecord"}
+
+func (ec *executionContext) _NameRecord(ctx context.Context, sel ast.SelectionSet, obj *NameRecord) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, nameRecordImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("NameRecord")
+ case "latest":
+ out.Values[i] = ec._NameRecord_latest(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "history":
+ out.Values[i] = ec._NameRecord_history(ctx, field, obj)
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var nameRecordEntryImplementors = []string{"NameRecordEntry"}
+
+func (ec *executionContext) _NameRecordEntry(ctx context.Context, sel ast.SelectionSet, obj *NameRecordEntry) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, nameRecordEntryImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("NameRecordEntry")
+ case "id":
+ out.Values[i] = ec._NameRecordEntry_id(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "height":
+ out.Values[i] = ec._NameRecordEntry_height(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var nodeInfoImplementors = []string{"NodeInfo"}
+
+func (ec *executionContext) _NodeInfo(ctx context.Context, sel ast.SelectionSet, obj *NodeInfo) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, nodeInfoImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("NodeInfo")
+ case "id":
+ out.Values[i] = ec._NodeInfo_id(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "network":
+ out.Values[i] = ec._NodeInfo_network(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "moniker":
+ out.Values[i] = ec._NodeInfo_moniker(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var ownerBondsImplementors = []string{"OwnerBonds"}
+
+func (ec *executionContext) _OwnerBonds(ctx context.Context, sel ast.SelectionSet, obj *OwnerBonds) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, ownerBondsImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("OwnerBonds")
+ case "owner":
+ out.Values[i] = ec._OwnerBonds_owner(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "bonds":
+ out.Values[i] = ec._OwnerBonds_bonds(ctx, field, obj)
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var peerInfoImplementors = []string{"PeerInfo"}
+
+func (ec *executionContext) _PeerInfo(ctx context.Context, sel ast.SelectionSet, obj *PeerInfo) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, peerInfoImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("PeerInfo")
+ case "node":
+ out.Values[i] = ec._PeerInfo_node(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "is_outbound":
+ out.Values[i] = ec._PeerInfo_is_outbound(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "remote_ip":
+ out.Values[i] = ec._PeerInfo_remote_ip(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var queryImplementors = []string{"Query"}
+
+func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors)
+
+ ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
+ Object: "Query",
+ })
+
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("Query")
+ case "getStatus":
+ field := field
+ out.Concurrently(i, func() (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Query_getStatus(ctx, field)
+ if res == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ return res
+ })
+ case "getAccounts":
+ field := field
+ out.Concurrently(i, func() (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Query_getAccounts(ctx, field)
+ return res
+ })
+ case "getBondsByIds":
+ field := field
+ out.Concurrently(i, func() (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Query_getBondsByIds(ctx, field)
+ return res
+ })
+ case "queryBonds":
+ field := field
+ out.Concurrently(i, func() (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Query_queryBonds(ctx, field)
+ return res
+ })
+ case "queryBondsByOwner":
+ field := field
+ out.Concurrently(i, func() (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Query_queryBondsByOwner(ctx, field)
+ return res
+ })
+ case "getRecordsByIds":
+ field := field
+ out.Concurrently(i, func() (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Query_getRecordsByIds(ctx, field)
+ return res
+ })
+ case "queryRecords":
+ field := field
+ out.Concurrently(i, func() (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Query_queryRecords(ctx, field)
+ return res
+ })
+ case "lookupAuthorities":
+ field := field
+ out.Concurrently(i, func() (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Query_lookupAuthorities(ctx, field)
+ if res == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ return res
+ })
+ case "lookupNames":
+ field := field
+ out.Concurrently(i, func() (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Query_lookupNames(ctx, field)
+ if res == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ return res
+ })
+ case "resolveNames":
+ field := field
+ out.Concurrently(i, func() (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Query_resolveNames(ctx, field)
+ if res == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ return res
+ })
+ case "getAuctionsByIds":
+ field := field
+ out.Concurrently(i, func() (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Query_getAuctionsByIds(ctx, field)
+ return res
+ })
+ case "__type":
+ out.Values[i] = ec._Query___type(ctx, field)
+ case "__schema":
+ out.Values[i] = ec._Query___schema(ctx, field)
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var recordImplementors = []string{"Record"}
+
+func (ec *executionContext) _Record(ctx context.Context, sel ast.SelectionSet, obj *Record) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, recordImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("Record")
+ case "id":
+ out.Values[i] = ec._Record_id(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "names":
+ out.Values[i] = ec._Record_names(ctx, field, obj)
+ case "bondId":
+ out.Values[i] = ec._Record_bondId(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "createTime":
+ out.Values[i] = ec._Record_createTime(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "expiryTime":
+ out.Values[i] = ec._Record_expiryTime(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "owners":
+ out.Values[i] = ec._Record_owners(ctx, field, obj)
+ case "attributes":
+ out.Values[i] = ec._Record_attributes(ctx, field, obj)
+ case "references":
+ out.Values[i] = ec._Record_references(ctx, field, obj)
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var referenceImplementors = []string{"Reference"}
+
+func (ec *executionContext) _Reference(ctx context.Context, sel ast.SelectionSet, obj *Reference) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, referenceImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("Reference")
+ case "id":
+ out.Values[i] = ec._Reference_id(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var statusImplementors = []string{"Status"}
+
+func (ec *executionContext) _Status(ctx context.Context, sel ast.SelectionSet, obj *Status) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, statusImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("Status")
+ case "version":
+ out.Values[i] = ec._Status_version(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "node":
+ out.Values[i] = ec._Status_node(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "sync":
+ out.Values[i] = ec._Status_sync(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "validator":
+ out.Values[i] = ec._Status_validator(ctx, field, obj)
+ case "validators":
+ out.Values[i] = ec._Status_validators(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "num_peers":
+ out.Values[i] = ec._Status_num_peers(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "peers":
+ out.Values[i] = ec._Status_peers(ctx, field, obj)
+ case "disk_usage":
+ out.Values[i] = ec._Status_disk_usage(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var syncInfoImplementors = []string{"SyncInfo"}
+
+func (ec *executionContext) _SyncInfo(ctx context.Context, sel ast.SelectionSet, obj *SyncInfo) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, syncInfoImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("SyncInfo")
+ case "latest_block_hash":
+ out.Values[i] = ec._SyncInfo_latest_block_hash(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "latest_block_height":
+ out.Values[i] = ec._SyncInfo_latest_block_height(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "latest_block_time":
+ out.Values[i] = ec._SyncInfo_latest_block_time(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "catching_up":
+ out.Values[i] = ec._SyncInfo_catching_up(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var validatorInfoImplementors = []string{"ValidatorInfo"}
+
+func (ec *executionContext) _ValidatorInfo(ctx context.Context, sel ast.SelectionSet, obj *ValidatorInfo) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, validatorInfoImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("ValidatorInfo")
+ case "address":
+ out.Values[i] = ec._ValidatorInfo_address(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "voting_power":
+ out.Values[i] = ec._ValidatorInfo_voting_power(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "proposer_priority":
+ out.Values[i] = ec._ValidatorInfo_proposer_priority(ctx, field, obj)
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var valueImplementors = []string{"Value"}
+
+func (ec *executionContext) _Value(ctx context.Context, sel ast.SelectionSet, obj *Value) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, valueImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("Value")
+ case "null":
+ out.Values[i] = ec._Value_null(ctx, field, obj)
+ case "int":
+ out.Values[i] = ec._Value_int(ctx, field, obj)
+ case "float":
+ out.Values[i] = ec._Value_float(ctx, field, obj)
+ case "string":
+ out.Values[i] = ec._Value_string(ctx, field, obj)
+ case "boolean":
+ out.Values[i] = ec._Value_boolean(ctx, field, obj)
+ case "json":
+ out.Values[i] = ec._Value_json(ctx, field, obj)
+ case "reference":
+ out.Values[i] = ec._Value_reference(ctx, field, obj)
+ case "values":
+ out.Values[i] = ec._Value_values(ctx, field, obj)
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var __DirectiveImplementors = []string{"__Directive"}
+
+func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("__Directive")
+ case "name":
+ out.Values[i] = ec.___Directive_name(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "description":
+ out.Values[i] = ec.___Directive_description(ctx, field, obj)
+ case "locations":
+ out.Values[i] = ec.___Directive_locations(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "args":
+ out.Values[i] = ec.___Directive_args(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "isRepeatable":
+ out.Values[i] = ec.___Directive_isRepeatable(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var __EnumValueImplementors = []string{"__EnumValue"}
+
+func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("__EnumValue")
+ case "name":
+ out.Values[i] = ec.___EnumValue_name(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "description":
+ out.Values[i] = ec.___EnumValue_description(ctx, field, obj)
+ case "isDeprecated":
+ out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "deprecationReason":
+ out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj)
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var __FieldImplementors = []string{"__Field"}
+
+func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("__Field")
+ case "name":
+ out.Values[i] = ec.___Field_name(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "description":
+ out.Values[i] = ec.___Field_description(ctx, field, obj)
+ case "args":
+ out.Values[i] = ec.___Field_args(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "type":
+ out.Values[i] = ec.___Field_type(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "isDeprecated":
+ out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "deprecationReason":
+ out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj)
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var __InputValueImplementors = []string{"__InputValue"}
+
+func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("__InputValue")
+ case "name":
+ out.Values[i] = ec.___InputValue_name(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "description":
+ out.Values[i] = ec.___InputValue_description(ctx, field, obj)
+ case "type":
+ out.Values[i] = ec.___InputValue_type(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "defaultValue":
+ out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj)
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var __SchemaImplementors = []string{"__Schema"}
+
+func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("__Schema")
+ case "types":
+ out.Values[i] = ec.___Schema_types(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "queryType":
+ out.Values[i] = ec.___Schema_queryType(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "mutationType":
+ out.Values[i] = ec.___Schema_mutationType(ctx, field, obj)
+ case "subscriptionType":
+ out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj)
+ case "directives":
+ out.Values[i] = ec.___Schema_directives(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var __TypeImplementors = []string{"__Type"}
+
+func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("__Type")
+ case "kind":
+ out.Values[i] = ec.___Type_kind(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "name":
+ out.Values[i] = ec.___Type_name(ctx, field, obj)
+ case "description":
+ out.Values[i] = ec.___Type_description(ctx, field, obj)
+ case "fields":
+ out.Values[i] = ec.___Type_fields(ctx, field, obj)
+ case "interfaces":
+ out.Values[i] = ec.___Type_interfaces(ctx, field, obj)
+ case "possibleTypes":
+ out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj)
+ case "enumValues":
+ out.Values[i] = ec.___Type_enumValues(ctx, field, obj)
+ case "inputFields":
+ out.Values[i] = ec.___Type_inputFields(ctx, field, obj)
+ case "ofType":
+ out.Values[i] = ec.___Type_ofType(ctx, field, obj)
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+// endregion **************************** object.gotpl ****************************
+
+// region ***************************** type.gotpl *****************************
+
+func (ec *executionContext) marshalNAuthorityRecord2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐAuthorityRecord(ctx context.Context, sel ast.SelectionSet, v []*AuthorityRecord) graphql.Marshaler {
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalOAuthorityRecord2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐAuthorityRecord(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ return ret
+}
+
+func (ec *executionContext) marshalNBond2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐBond(ctx context.Context, sel ast.SelectionSet, v *Bond) graphql.Marshaler {
+ if v == nil {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ return ec._Bond(ctx, sel, v)
+}
+
+func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) {
+ res, err := graphql.UnmarshalBoolean(v)
+ return res, graphql.ErrorOnPath(ctx, err)
+}
+
+func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler {
+ res := graphql.MarshalBoolean(v)
+ if res == graphql.Null {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ }
+ return res
+}
+
+func (ec *executionContext) marshalNCoin2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐCoin(ctx context.Context, sel ast.SelectionSet, v *Coin) graphql.Marshaler {
+ if v == nil {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ return ec._Coin(ctx, sel, v)
+}
+
+func (ec *executionContext) marshalNNameRecord2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐNameRecord(ctx context.Context, sel ast.SelectionSet, v []*NameRecord) graphql.Marshaler {
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalONameRecord2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐNameRecord(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ return ret
+}
+
+func (ec *executionContext) marshalNNameRecordEntry2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐNameRecordEntry(ctx context.Context, sel ast.SelectionSet, v *NameRecordEntry) graphql.Marshaler {
+ if v == nil {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ return ec._NameRecordEntry(ctx, sel, v)
+}
+
+func (ec *executionContext) marshalNNodeInfo2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐNodeInfo(ctx context.Context, sel ast.SelectionSet, v *NodeInfo) graphql.Marshaler {
+ if v == nil {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ return ec._NodeInfo(ctx, sel, v)
+}
+
+func (ec *executionContext) marshalNRecord2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐRecord(ctx context.Context, sel ast.SelectionSet, v []*Record) graphql.Marshaler {
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalORecord2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐRecord(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ return ret
+}
+
+func (ec *executionContext) marshalNStatus2githubᚗcomᚋtharsisᚋethermintᚋgqlᚐStatus(ctx context.Context, sel ast.SelectionSet, v Status) graphql.Marshaler {
+ return ec._Status(ctx, sel, &v)
+}
+
+func (ec *executionContext) marshalNStatus2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐStatus(ctx context.Context, sel ast.SelectionSet, v *Status) graphql.Marshaler {
+ if v == nil {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ return ec._Status(ctx, sel, v)
+}
+
+func (ec *executionContext) unmarshalNString2string(ctx context.Context, v interface{}) (string, error) {
+ res, err := graphql.UnmarshalString(v)
+ return res, graphql.ErrorOnPath(ctx, err)
+}
+
+func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
+ res := graphql.MarshalString(v)
+ if res == graphql.Null {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ }
+ return res
+}
+
+func (ec *executionContext) marshalNSyncInfo2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐSyncInfo(ctx context.Context, sel ast.SelectionSet, v *SyncInfo) graphql.Marshaler {
+ if v == nil {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ return ec._SyncInfo(ctx, sel, v)
+}
+
+func (ec *executionContext) marshalNValidatorInfo2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐValidatorInfo(ctx context.Context, sel ast.SelectionSet, v []*ValidatorInfo) graphql.Marshaler {
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalOValidatorInfo2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐValidatorInfo(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ return ret
+}
+
+func (ec *executionContext) marshalNValue2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐValue(ctx context.Context, sel ast.SelectionSet, v *Value) graphql.Marshaler {
+ if v == nil {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ return ec._Value(ctx, sel, v)
+}
+
+func (ec *executionContext) unmarshalNValueInput2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐValueInput(ctx context.Context, v interface{}) (*ValueInput, error) {
+ res, err := ec.unmarshalInputValueInput(ctx, v)
+ return &res, graphql.ErrorOnPath(ctx, err)
+}
+
+func (ec *executionContext) marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler {
+ return ec.___Directive(ctx, sel, &v)
+}
+
+func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Directive) graphql.Marshaler {
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ for _, e := range ret {
+ if e == graphql.Null {
+ return graphql.Null
+ }
+ }
+
+ return ret
+}
+
+func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Context, v interface{}) (string, error) {
+ res, err := graphql.UnmarshalString(v)
+ return res, graphql.ErrorOnPath(ctx, err)
+}
+
+func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
+ res := graphql.MarshalString(v)
+ if res == graphql.Null {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ }
+ return res
+}
+
+func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) {
+ var vSlice []interface{}
+ if v != nil {
+ if tmp1, ok := v.([]interface{}); ok {
+ vSlice = tmp1
+ } else {
+ vSlice = []interface{}{v}
+ }
+ }
+ var err error
+ res := make([]string, len(vSlice))
+ for i := range vSlice {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
+ res[i], err = ec.unmarshalN__DirectiveLocation2string(ctx, vSlice[i])
+ if err != nil {
+ return nil, err
+ }
+ }
+ return res, nil
+}
+
+func (ec *executionContext) marshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler {
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalN__DirectiveLocation2string(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ for _, e := range ret {
+ if e == graphql.Null {
+ return graphql.Null
+ }
+ }
+
+ return ret
+}
+
+func (ec *executionContext) marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx context.Context, sel ast.SelectionSet, v introspection.EnumValue) graphql.Marshaler {
+ return ec.___EnumValue(ctx, sel, &v)
+}
+
+func (ec *executionContext) marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx context.Context, sel ast.SelectionSet, v introspection.Field) graphql.Marshaler {
+ return ec.___Field(ctx, sel, &v)
+}
+
+func (ec *executionContext) marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx context.Context, sel ast.SelectionSet, v introspection.InputValue) graphql.Marshaler {
+ return ec.___InputValue(ctx, sel, &v)
+}
+
+func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler {
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ for _, e := range ret {
+ if e == graphql.Null {
+ return graphql.Null
+ }
+ }
+
+ return ret
+}
+
+func (ec *executionContext) marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler {
+ return ec.___Type(ctx, sel, &v)
+}
+
+func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler {
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ for _, e := range ret {
+ if e == graphql.Null {
+ return graphql.Null
+ }
+ }
+
+ return ret
+}
+
+func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler {
+ if v == nil {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ return ec.___Type(ctx, sel, v)
+}
+
+func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v interface{}) (string, error) {
+ res, err := graphql.UnmarshalString(v)
+ return res, graphql.ErrorOnPath(ctx, err)
+}
+
+func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
+ res := graphql.MarshalString(v)
+ if res == graphql.Null {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ }
+ return res
+}
+
+func (ec *executionContext) marshalOAccount2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐAccount(ctx context.Context, sel ast.SelectionSet, v []*Account) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalOAccount2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐAccount(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ return ret
+}
+
+func (ec *executionContext) marshalOAccount2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐAccount(ctx context.Context, sel ast.SelectionSet, v *Account) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ return ec._Account(ctx, sel, v)
+}
+
+func (ec *executionContext) marshalOAuction2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐAuction(ctx context.Context, sel ast.SelectionSet, v []*Auction) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalOAuction2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐAuction(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ return ret
+}
+
+func (ec *executionContext) marshalOAuction2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐAuction(ctx context.Context, sel ast.SelectionSet, v *Auction) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ return ec._Auction(ctx, sel, v)
+}
+
+func (ec *executionContext) marshalOAuctionBid2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐAuctionBid(ctx context.Context, sel ast.SelectionSet, v []*AuctionBid) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalOAuctionBid2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐAuctionBid(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ return ret
+}
+
+func (ec *executionContext) marshalOAuctionBid2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐAuctionBid(ctx context.Context, sel ast.SelectionSet, v *AuctionBid) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ return ec._AuctionBid(ctx, sel, v)
+}
+
+func (ec *executionContext) marshalOAuthorityRecord2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐAuthorityRecord(ctx context.Context, sel ast.SelectionSet, v *AuthorityRecord) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ return ec._AuthorityRecord(ctx, sel, v)
+}
+
+func (ec *executionContext) marshalOBond2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐBond(ctx context.Context, sel ast.SelectionSet, v []*Bond) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalOBond2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐBond(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ return ret
+}
+
+func (ec *executionContext) marshalOBond2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐBondᚄ(ctx context.Context, sel ast.SelectionSet, v []*Bond) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalNBond2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐBond(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ for _, e := range ret {
+ if e == graphql.Null {
+ return graphql.Null
+ }
+ }
+
+ return ret
+}
+
+func (ec *executionContext) marshalOBond2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐBond(ctx context.Context, sel ast.SelectionSet, v *Bond) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ return ec._Bond(ctx, sel, v)
+}
+
+func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) {
+ res, err := graphql.UnmarshalBoolean(v)
+ return res, graphql.ErrorOnPath(ctx, err)
+}
+
+func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler {
+ return graphql.MarshalBoolean(v)
+}
+
+func (ec *executionContext) unmarshalOBoolean2ᚖbool(ctx context.Context, v interface{}) (*bool, error) {
+ if v == nil {
+ return nil, nil
+ }
+ res, err := graphql.UnmarshalBoolean(v)
+ return &res, graphql.ErrorOnPath(ctx, err)
+}
+
+func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ return graphql.MarshalBoolean(*v)
+}
+
+func (ec *executionContext) marshalOCoin2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐCoinᚄ(ctx context.Context, sel ast.SelectionSet, v []*Coin) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalNCoin2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐCoin(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ for _, e := range ret {
+ if e == graphql.Null {
+ return graphql.Null
+ }
+ }
+
+ return ret
+}
+
+func (ec *executionContext) unmarshalOFloat2ᚖfloat64(ctx context.Context, v interface{}) (*float64, error) {
+ if v == nil {
+ return nil, nil
+ }
+ res, err := graphql.UnmarshalFloat(v)
+ return &res, graphql.ErrorOnPath(ctx, err)
+}
+
+func (ec *executionContext) marshalOFloat2ᚖfloat64(ctx context.Context, sel ast.SelectionSet, v *float64) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ return graphql.MarshalFloat(*v)
+}
+
+func (ec *executionContext) unmarshalOInt2ᚖint(ctx context.Context, v interface{}) (*int, error) {
+ if v == nil {
+ return nil, nil
+ }
+ res, err := graphql.UnmarshalInt(v)
+ return &res, graphql.ErrorOnPath(ctx, err)
+}
+
+func (ec *executionContext) marshalOInt2ᚖint(ctx context.Context, sel ast.SelectionSet, v *int) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ return graphql.MarshalInt(*v)
+}
+
+func (ec *executionContext) marshalOKeyValue2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐKeyValue(ctx context.Context, sel ast.SelectionSet, v []*KeyValue) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalOKeyValue2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐKeyValue(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ return ret
+}
+
+func (ec *executionContext) marshalOKeyValue2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐKeyValue(ctx context.Context, sel ast.SelectionSet, v *KeyValue) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ return ec._KeyValue(ctx, sel, v)
+}
+
+func (ec *executionContext) unmarshalOKeyValueInput2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐKeyValueInput(ctx context.Context, v interface{}) ([]*KeyValueInput, error) {
+ if v == nil {
+ return nil, nil
+ }
+ var vSlice []interface{}
+ if v != nil {
+ if tmp1, ok := v.([]interface{}); ok {
+ vSlice = tmp1
+ } else {
+ vSlice = []interface{}{v}
+ }
+ }
+ var err error
+ res := make([]*KeyValueInput, len(vSlice))
+ for i := range vSlice {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
+ res[i], err = ec.unmarshalOKeyValueInput2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐKeyValueInput(ctx, vSlice[i])
+ if err != nil {
+ return nil, err
+ }
+ }
+ return res, nil
+}
+
+func (ec *executionContext) unmarshalOKeyValueInput2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐKeyValueInput(ctx context.Context, v interface{}) (*KeyValueInput, error) {
+ if v == nil {
+ return nil, nil
+ }
+ res, err := ec.unmarshalInputKeyValueInput(ctx, v)
+ return &res, graphql.ErrorOnPath(ctx, err)
+}
+
+func (ec *executionContext) marshalONameRecord2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐNameRecord(ctx context.Context, sel ast.SelectionSet, v *NameRecord) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ return ec._NameRecord(ctx, sel, v)
+}
+
+func (ec *executionContext) marshalONameRecordEntry2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐNameRecordEntry(ctx context.Context, sel ast.SelectionSet, v []*NameRecordEntry) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalONameRecordEntry2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐNameRecordEntry(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ return ret
+}
+
+func (ec *executionContext) marshalONameRecordEntry2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐNameRecordEntry(ctx context.Context, sel ast.SelectionSet, v *NameRecordEntry) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ return ec._NameRecordEntry(ctx, sel, v)
+}
+
+func (ec *executionContext) marshalOOwnerBonds2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐOwnerBonds(ctx context.Context, sel ast.SelectionSet, v []*OwnerBonds) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalOOwnerBonds2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐOwnerBonds(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ return ret
+}
+
+func (ec *executionContext) marshalOOwnerBonds2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐOwnerBonds(ctx context.Context, sel ast.SelectionSet, v *OwnerBonds) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ return ec._OwnerBonds(ctx, sel, v)
+}
+
+func (ec *executionContext) marshalOPeerInfo2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐPeerInfo(ctx context.Context, sel ast.SelectionSet, v []*PeerInfo) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalOPeerInfo2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐPeerInfo(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ return ret
+}
+
+func (ec *executionContext) marshalOPeerInfo2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐPeerInfo(ctx context.Context, sel ast.SelectionSet, v *PeerInfo) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ return ec._PeerInfo(ctx, sel, v)
+}
+
+func (ec *executionContext) marshalORecord2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐRecord(ctx context.Context, sel ast.SelectionSet, v []*Record) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalORecord2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐRecord(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ return ret
+}
+
+func (ec *executionContext) marshalORecord2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐRecord(ctx context.Context, sel ast.SelectionSet, v *Record) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ return ec._Record(ctx, sel, v)
+}
+
+func (ec *executionContext) marshalOReference2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐReference(ctx context.Context, sel ast.SelectionSet, v *Reference) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ return ec._Reference(ctx, sel, v)
+}
+
+func (ec *executionContext) unmarshalOReferenceInput2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐReferenceInput(ctx context.Context, v interface{}) (*ReferenceInput, error) {
+ if v == nil {
+ return nil, nil
+ }
+ res, err := ec.unmarshalInputReferenceInput(ctx, v)
+ return &res, graphql.ErrorOnPath(ctx, err)
+}
+
+func (ec *executionContext) unmarshalOString2string(ctx context.Context, v interface{}) (string, error) {
+ res, err := graphql.UnmarshalString(v)
+ return res, graphql.ErrorOnPath(ctx, err)
+}
+
+func (ec *executionContext) marshalOString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
+ return graphql.MarshalString(v)
+}
+
+func (ec *executionContext) unmarshalOString2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) {
+ if v == nil {
+ return nil, nil
+ }
+ var vSlice []interface{}
+ if v != nil {
+ if tmp1, ok := v.([]interface{}); ok {
+ vSlice = tmp1
+ } else {
+ vSlice = []interface{}{v}
+ }
+ }
+ var err error
+ res := make([]string, len(vSlice))
+ for i := range vSlice {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
+ res[i], err = ec.unmarshalNString2string(ctx, vSlice[i])
+ if err != nil {
+ return nil, err
+ }
+ }
+ return res, nil
+}
+
+func (ec *executionContext) marshalOString2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ ret := make(graphql.Array, len(v))
+ for i := range v {
+ ret[i] = ec.marshalNString2string(ctx, sel, v[i])
+ }
+
+ for _, e := range ret {
+ if e == graphql.Null {
+ return graphql.Null
+ }
+ }
+
+ return ret
+}
+
+func (ec *executionContext) unmarshalOString2ᚖstring(ctx context.Context, v interface{}) (*string, error) {
+ if v == nil {
+ return nil, nil
+ }
+ res, err := graphql.UnmarshalString(v)
+ return &res, graphql.ErrorOnPath(ctx, err)
+}
+
+func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ return graphql.MarshalString(*v)
+}
+
+func (ec *executionContext) marshalOValidatorInfo2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐValidatorInfo(ctx context.Context, sel ast.SelectionSet, v *ValidatorInfo) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ return ec._ValidatorInfo(ctx, sel, v)
+}
+
+func (ec *executionContext) marshalOValue2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐValue(ctx context.Context, sel ast.SelectionSet, v []*Value) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalOValue2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐValue(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ return ret
+}
+
+func (ec *executionContext) marshalOValue2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐValue(ctx context.Context, sel ast.SelectionSet, v *Value) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ return ec._Value(ctx, sel, v)
+}
+
+func (ec *executionContext) unmarshalOValueInput2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐValueInput(ctx context.Context, v interface{}) ([]*ValueInput, error) {
+ if v == nil {
+ return nil, nil
+ }
+ var vSlice []interface{}
+ if v != nil {
+ if tmp1, ok := v.([]interface{}); ok {
+ vSlice = tmp1
+ } else {
+ vSlice = []interface{}{v}
+ }
+ }
+ var err error
+ res := make([]*ValueInput, len(vSlice))
+ for i := range vSlice {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
+ res[i], err = ec.unmarshalOValueInput2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐValueInput(ctx, vSlice[i])
+ if err != nil {
+ return nil, err
+ }
+ }
+ return res, nil
+}
+
+func (ec *executionContext) unmarshalOValueInput2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐValueInput(ctx context.Context, v interface{}) (*ValueInput, error) {
+ if v == nil {
+ return nil, nil
+ }
+ res, err := ec.unmarshalInputValueInput(ctx, v)
+ return &res, graphql.ErrorOnPath(ctx, err)
+}
+
+func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ for _, e := range ret {
+ if e == graphql.Null {
+ return graphql.Null
+ }
+ }
+
+ return ret
+}
+
+func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Field) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ for _, e := range ret {
+ if e == graphql.Null {
+ return graphql.Null
+ }
+ }
+
+ return ret
+}
+
+func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ for _, e := range ret {
+ if e == graphql.Null {
+ return graphql.Null
+ }
+ }
+
+ return ret
+}
+
+func (ec *executionContext) marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v *introspection.Schema) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ return ec.___Schema(ctx, sel, v)
+}
+
+func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ for _, e := range ret {
+ if e == graphql.Null {
+ return graphql.Null
+ }
+ }
+
+ return ret
+}
+
+func (ec *executionContext) marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ return ec.___Type(ctx, sel, v)
+}
+
+// endregion ***************************** type.gotpl *****************************
diff --git a/gql/gqlgen.yml b/gql/gqlgen.yml
new file mode 100644
index 00000000..2354079b
--- /dev/null
+++ b/gql/gqlgen.yml
@@ -0,0 +1,14 @@
+# .gqlgen.yml example
+#
+# Refer to https://gqlgen.com/config/
+# for detailed .gqlgen.yml documentation.
+
+schema:
+ - vulcanize/dxns/*.graphql
+exec:
+ filename: generated.go
+model:
+ filename: models_gen.go
+resolver:
+ filename: resolver.go
+ type: Resolver
\ No newline at end of file
diff --git a/gql/models_gen.go b/gql/models_gen.go
new file mode 100644
index 00000000..4fcef293
--- /dev/null
+++ b/gql/models_gen.go
@@ -0,0 +1,160 @@
+// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
+
+package gql
+
+type Account struct {
+ Address string `json:"address"`
+ PubKey *string `json:"pubKey"`
+ Number string `json:"number"`
+ Sequence string `json:"sequence"`
+ Balance []*Coin `json:"balance"`
+}
+
+type Auction struct {
+ ID string `json:"id"`
+ Status string `json:"status"`
+ OwnerAddress string `json:"ownerAddress"`
+ CreateTime string `json:"createTime"`
+ CommitsEndTime string `json:"commitsEndTime"`
+ RevealsEndTime string `json:"revealsEndTime"`
+ CommitFee *Coin `json:"commitFee"`
+ RevealFee *Coin `json:"revealFee"`
+ MinimumBid *Coin `json:"minimumBid"`
+ WinnerAddress string `json:"winnerAddress"`
+ WinnerBid *Coin `json:"winnerBid"`
+ WinnerPrice *Coin `json:"winnerPrice"`
+ Bids []*AuctionBid `json:"bids"`
+}
+
+type AuctionBid struct {
+ BidderAddress string `json:"bidderAddress"`
+ Status string `json:"status"`
+ CommitHash string `json:"commitHash"`
+ CommitTime string `json:"commitTime"`
+ CommitFee *Coin `json:"commitFee"`
+ RevealTime string `json:"revealTime"`
+ RevealFee *Coin `json:"revealFee"`
+ BidAmount *Coin `json:"bidAmount"`
+}
+
+type AuthorityRecord struct {
+ OwnerAddress string `json:"ownerAddress"`
+ OwnerPublicKey string `json:"ownerPublicKey"`
+ Height string `json:"height"`
+ Status string `json:"status"`
+ BondID string `json:"bondId"`
+ ExpiryTime string `json:"expiryTime"`
+ Auction *Auction `json:"auction"`
+}
+
+type Bond struct {
+ ID string `json:"id"`
+ Owner string `json:"owner"`
+ Balance []*Coin `json:"balance"`
+}
+
+type Coin struct {
+ Type string `json:"type"`
+ Quantity string `json:"quantity"`
+}
+
+type KeyValue struct {
+ Key string `json:"key"`
+ Value *Value `json:"value"`
+}
+
+type KeyValueInput struct {
+ Key string `json:"key"`
+ Value *ValueInput `json:"value"`
+}
+
+type NameRecord struct {
+ Latest *NameRecordEntry `json:"latest"`
+ History []*NameRecordEntry `json:"history"`
+}
+
+type NameRecordEntry struct {
+ ID string `json:"id"`
+ Height string `json:"height"`
+}
+
+type NodeInfo struct {
+ ID string `json:"id"`
+ Network string `json:"network"`
+ Moniker string `json:"moniker"`
+}
+
+type OwnerBonds struct {
+ Owner string `json:"owner"`
+ Bonds []*Bond `json:"bonds"`
+}
+
+type PeerInfo struct {
+ Node *NodeInfo `json:"node"`
+ IsOutbound bool `json:"is_outbound"`
+ RemoteIP string `json:"remote_ip"`
+}
+
+type Record struct {
+ ID string `json:"id"`
+ Names []string `json:"names"`
+ BondID string `json:"bondId"`
+ CreateTime string `json:"createTime"`
+ ExpiryTime string `json:"expiryTime"`
+ Owners []string `json:"owners"`
+ Attributes []*KeyValue `json:"attributes"`
+ References []*Record `json:"references"`
+}
+
+type Reference struct {
+ ID string `json:"id"`
+}
+
+type ReferenceInput struct {
+ ID string `json:"id"`
+}
+
+type Status struct {
+ Version string `json:"version"`
+ Node *NodeInfo `json:"node"`
+ Sync *SyncInfo `json:"sync"`
+ Validator *ValidatorInfo `json:"validator"`
+ Validators []*ValidatorInfo `json:"validators"`
+ NumPeers string `json:"num_peers"`
+ Peers []*PeerInfo `json:"peers"`
+ DiskUsage string `json:"disk_usage"`
+}
+
+type SyncInfo struct {
+ LatestBlockHash string `json:"latest_block_hash"`
+ LatestBlockHeight string `json:"latest_block_height"`
+ LatestBlockTime string `json:"latest_block_time"`
+ CatchingUp bool `json:"catching_up"`
+}
+
+type ValidatorInfo struct {
+ Address string `json:"address"`
+ VotingPower string `json:"voting_power"`
+ ProposerPriority *string `json:"proposer_priority"`
+}
+
+type Value struct {
+ Null *bool `json:"null"`
+ Int *int `json:"int"`
+ Float *float64 `json:"float"`
+ String *string `json:"string"`
+ Boolean *bool `json:"boolean"`
+ JSON *string `json:"json"`
+ Reference *Reference `json:"reference"`
+ Values []*Value `json:"values"`
+}
+
+type ValueInput struct {
+ Null *bool `json:"null"`
+ Int *int `json:"int"`
+ Float *float64 `json:"float"`
+ String *string `json:"string"`
+ Boolean *bool `json:"boolean"`
+ Reference *ReferenceInput `json:"reference"`
+ Values []*ValueInput `json:"values"`
+}
diff --git a/gql/resolver.go b/gql/resolver.go
new file mode 100644
index 00000000..63dbf209
--- /dev/null
+++ b/gql/resolver.go
@@ -0,0 +1,335 @@
+package gql
+
+import (
+ "context"
+ "encoding/base64"
+ "github.com/cosmos/cosmos-sdk/client"
+ authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
+ banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
+ auctiontypes "github.com/tharsis/ethermint/x/auction/types"
+ bondtypes "github.com/tharsis/ethermint/x/bond/types"
+ nstypes "github.com/tharsis/ethermint/x/nameservice/types"
+ "strconv"
+)
+
+// DefaultLogNumLines is the number of log lines to tail by default.
+const DefaultLogNumLines = 50
+
+// MaxLogNumLines is the max number of log lines that can be tailed.
+const MaxLogNumLines = 1000
+
+type Resolver struct {
+ ctx client.Context
+ logFile string
+}
+
+// Query is the entry point to query execution.
+func (r *Resolver) Query() QueryResolver {
+ return &queryResolver{r}
+}
+
+type queryResolver struct{ *Resolver }
+
+func (q queryResolver) LookupAuthorities(ctx context.Context, names []string) ([]*AuthorityRecord, error) {
+ nsQueryClient := nstypes.NewQueryClient(q.ctx)
+ auctionQueryClient := auctiontypes.NewQueryClient(q.ctx)
+ var gqlResponse []*AuthorityRecord
+
+ for _, name := range names {
+ res, err := nsQueryClient.Whois(context.Background(), &nstypes.QueryWhoisRequest{Name: name})
+ if err != nil {
+ return nil, err
+ }
+
+ nameAuthority := res.GetNameAuthority()
+ gqlNameAuthorityRecord, err := GetGQLNameAuthorityRecord(&nameAuthority)
+ if err != nil {
+ return nil, err
+ }
+
+ if nameAuthority.AuctionId == "" {
+ auctionResp, err := auctionQueryClient.GetAuction(context.Background(), &auctiontypes.AuctionRequest{Id: nameAuthority.GetAuctionId()})
+ if err != nil {
+ return nil, err
+ }
+ bidsResp, err := auctionQueryClient.GetBids(context.Background(), &auctiontypes.BidsRequest{AuctionId: nameAuthority.GetAuctionId()})
+ if err != nil {
+ return nil, err
+ }
+
+ gqlAuctionRecord, err := GetGQLAuction(auctionResp.GetAuction(), bidsResp.GetBids())
+ if err != nil {
+ return nil, err
+ }
+
+ gqlNameAuthorityRecord.Auction = gqlAuctionRecord
+ }
+
+ gqlResponse = append(gqlResponse, gqlNameAuthorityRecord)
+ }
+
+ return gqlResponse, nil
+}
+
+func (q queryResolver) ResolveNames(ctx context.Context, names []string) ([]*Record, error) {
+ nsQueryClient := nstypes.NewQueryClient(q.ctx)
+ var gqlResponse []*Record
+ for _, name := range names {
+ res, err := nsQueryClient.ResolveWrn(context.Background(), &nstypes.QueryResolveWrn{Wrn: name})
+ if err != nil {
+ return nil, err
+ }
+
+ gqlRecord, err := getGQLRecord(context.Background(), q, *res.GetRecord())
+ if err != nil {
+ return nil, err
+ }
+
+ gqlResponse = append(gqlResponse, gqlRecord)
+ }
+
+ return gqlResponse, nil
+}
+
+func (q queryResolver) LookupNames(ctx context.Context, names []string) ([]*NameRecord, error) {
+ nsQueryClient := nstypes.NewQueryClient(q.ctx)
+ var gqlResponse []*NameRecord
+
+ for _, name := range names {
+ res, err := nsQueryClient.LookupWrn(context.Background(), &nstypes.QueryLookupWrn{Wrn: name})
+ if err != nil {
+ return nil, err
+ }
+
+ gqlRecord, err := getGQLNameRecord(res.GetName())
+ if err != nil {
+ return nil, err
+ }
+
+ gqlResponse = append(gqlResponse, gqlRecord)
+ }
+
+ return gqlResponse, nil
+}
+
+func (q queryResolver) QueryRecords(ctx context.Context, attributes []*KeyValueInput, all *bool) ([]*Record, error) {
+ nsQueryClient := nstypes.NewQueryClient(q.ctx)
+ res, err := nsQueryClient.ListRecords(context.Background(), &nstypes.QueryListRecordsRequest{})
+ if err != nil {
+ return nil, err
+ }
+
+ records := res.GetRecords()
+ gqlResponse := make([]*Record, len(records))
+
+ for i, record := range records {
+ gqlRecord, err := getGQLRecord(context.Background(), q, record)
+ if err != nil {
+ return nil, err
+ }
+ gqlResponse[i] = gqlRecord
+ }
+
+ return gqlResponse, nil
+
+}
+
+func (q queryResolver) GetRecordsByIds(ctx context.Context, ids []string) ([]*Record, error) {
+ nsQueryClient := nstypes.NewQueryClient(q.ctx)
+ gqlResponse := make([]*Record, len(ids))
+
+ for i, id := range ids {
+ res, err := nsQueryClient.GetRecord(context.Background(), &nstypes.QueryRecordByIdRequest{Id: id})
+ if err != nil {
+ return nil, err
+ }
+ record, err := getGQLRecord(context.Background(), q, res.GetRecord())
+ if err != nil {
+ return nil, err
+ }
+ gqlResponse[i] = record
+ }
+
+ return gqlResponse, nil
+}
+
+func (q queryResolver) GetStatus(ctx context.Context) (*Status, error) {
+ nodeInfo, syncInfo, validatorInfo, err := getStatusInfo(q.ctx)
+ if err != nil {
+ return nil, err
+ }
+
+ numPeers, peers, err := getNetInfo(q.ctx)
+ if err != nil {
+ return nil, err
+ }
+
+ validatorSet, err := getValidatorSet(q.ctx)
+ if err != nil {
+ return nil, err
+ }
+
+ diskUsage, err := GetDiskUsage(NodeDataPath)
+ if err != nil {
+ return nil, err
+ }
+
+ return &Status{
+ Version: NameServiceVersion,
+ Node: nodeInfo,
+ Sync: syncInfo,
+ Validator: validatorInfo,
+ Validators: validatorSet,
+ NumPeers: numPeers,
+ Peers: peers,
+ DiskUsage: diskUsage,
+ }, nil
+}
+
+func (q queryResolver) GetAccounts(ctx context.Context, addresses []string) ([]*Account, error) {
+ accounts := make([]*Account, len(addresses))
+ for index, address := range addresses {
+ account, err := q.GetAccount(ctx, address)
+ if err != nil {
+ return nil, err
+ }
+ accounts[index] = account
+ }
+ return accounts, nil
+}
+
+func (q queryResolver) GetAccount(ctx context.Context, address string) (*Account, error) {
+ authQueryClient := authtypes.NewQueryClient(q.ctx)
+ accountResponse, err := authQueryClient.Account(ctx, &authtypes.QueryAccountRequest{Address: address})
+ if err != nil {
+ return nil, err
+ }
+ var account authtypes.AccountI
+ err = q.ctx.Codec.UnpackAny(accountResponse.GetAccount(), &account)
+ if err != nil {
+ return nil, err
+ }
+ var pubKey *string
+ if account.GetPubKey() != nil {
+ pubKeyStr := base64.StdEncoding.EncodeToString(account.GetPubKey().Bytes())
+ pubKey = &pubKeyStr
+ }
+
+ // Get the account balance
+ bankQueryClient := banktypes.NewQueryClient(q.ctx)
+ balance, err := bankQueryClient.AllBalances(ctx, &banktypes.QueryAllBalancesRequest{Address: address})
+
+ accNum := strconv.FormatUint(account.GetAccountNumber(), 10)
+ seq := strconv.FormatUint(account.GetSequence(), 10)
+
+ return &Account{
+ Address: address,
+ Number: accNum,
+ Sequence: seq,
+ PubKey: pubKey,
+ Balance: getGQLCoins(balance.GetBalances()),
+ }, nil
+}
+
+func (q queryResolver) GetBondsByIds(ctx context.Context, ids []string) ([]*Bond, error) {
+ bonds := make([]*Bond, len(ids))
+ for index, id := range ids {
+ bondObj, err := q.GetBond(ctx, id)
+ if err != nil {
+ return nil, err
+ }
+ bonds[index] = bondObj
+ }
+
+ return bonds, nil
+}
+
+func (q *queryResolver) GetBond(ctx context.Context, id string) (*Bond, error) {
+ bondQueryClient := bondtypes.NewQueryClient(q.ctx)
+ bondResp, err := bondQueryClient.GetBondById(context.Background(), &bondtypes.QueryGetBondByIdRequest{Id: id})
+ if err != nil {
+ return nil, err
+ }
+
+ bond := bondResp.GetBond()
+ if bond == nil {
+ return nil, nil
+ }
+ return getGQLBond(bondResp.GetBond())
+}
+
+func (q queryResolver) QueryBonds(ctx context.Context, attributes []*KeyValueInput) ([]*Bond, error) {
+ bondQueryClient := bondtypes.NewQueryClient(q.ctx)
+ bonds, err := bondQueryClient.Bonds(context.Background(), &bondtypes.QueryGetBondsRequest{})
+ if err != nil {
+ return nil, err
+ }
+
+ gqlResponse := make([]*Bond, len(bonds.GetBonds()))
+ for i, bondObj := range bonds.GetBonds() {
+ gqlBond, err := getGQLBond(bondObj)
+ if err != nil {
+ return nil, err
+ }
+ gqlResponse[i] = gqlBond
+ }
+
+ return gqlResponse, nil
+}
+
+// QueryBondsByOwner will return bonds by owner
+func (q queryResolver) QueryBondsByOwner(ctx context.Context, ownerAddresses []string) ([]*OwnerBonds, error) {
+ ownerBonds := make([]*OwnerBonds, len(ownerAddresses))
+ for index, ownerAddress := range ownerAddresses {
+ bondsObj, err := q.GetBondsByOwner(ctx, ownerAddress)
+ if err != nil {
+ return nil, err
+ }
+ ownerBonds[index] = bondsObj
+ }
+
+ return ownerBonds, nil
+}
+
+func (q queryResolver) GetBondsByOwner(ctx context.Context, address string) (*OwnerBonds, error) {
+ bondQueryClient := bondtypes.NewQueryClient(q.ctx)
+ bondResp, err := bondQueryClient.GetBondsByOwner(context.Background(), &bondtypes.QueryGetBondsByOwnerRequest{Owner: address})
+ if err != nil {
+ return nil, err
+ }
+
+ ownerBonds := make([]*Bond, len(bondResp.GetBonds()))
+ for i, bond := range bondResp.GetBonds() {
+ bondObj, err := getGQLBond(&bond)
+ if err != nil {
+ return nil, err
+ }
+ ownerBonds[i] = bondObj
+ }
+
+ return &OwnerBonds{Bonds: ownerBonds, Owner: address}, nil
+}
+
+func (q queryResolver) GetAuctionsByIds(ctx context.Context, ids []string) ([]*Auction, error) {
+ auctionQueryClient := auctiontypes.NewQueryClient(q.ctx)
+ gqlAuctionResponse := make([]*Auction, len(ids))
+ for i, id := range ids {
+ auctionObj, err := auctionQueryClient.GetAuction(context.Background(), &auctiontypes.AuctionRequest{Id: id})
+ if err != nil {
+ return nil, err
+ }
+ bidsObj, err := auctionQueryClient.GetBids(context.Background(), &auctiontypes.BidsRequest{AuctionId: id})
+ if err != nil {
+ return nil, err
+ }
+
+ gqlAuction, err := GetGQLAuction(auctionObj.GetAuction(), bidsObj.GetBids())
+ if err != nil {
+ return nil, err
+ }
+
+ gqlAuctionResponse[i] = gqlAuction
+ }
+
+ return gqlAuctionResponse, nil
+}
diff --git a/gql/server.go b/gql/server.go
new file mode 100644
index 00000000..3429f254
--- /dev/null
+++ b/gql/server.go
@@ -0,0 +1,44 @@
+package gql
+
+import (
+ "fmt"
+ "github.com/99designs/gqlgen/graphql/handler"
+ "github.com/99designs/gqlgen/graphql/playground"
+ "github.com/cosmos/cosmos-sdk/client"
+ "github.com/ethereum/go-ethereum/log"
+ "github.com/spf13/viper"
+ "net/http"
+)
+
+// Server configures and starts the GQL server.
+func Server(ctx client.Context) {
+ if !viper.GetBool("gql-server") {
+ return
+ }
+ logFile := viper.GetString("log-file")
+
+ port := viper.GetString("gql-port")
+
+ srv := handler.NewDefaultServer(NewExecutableSchema(Config{Resolvers: &Resolver{
+ ctx: ctx,
+ logFile: logFile,
+ }}))
+
+ http.Handle("/", playground.Handler("GraphQL playground", "/api"))
+
+ if viper.GetBool("gql-playground") {
+ apiBase := viper.GetString("gql-playground-api-base")
+
+ http.Handle("/webui", playground.Handler("GraphQL playground", apiBase+"/api"))
+ http.Handle("/console", playground.Handler("GraphQL playground", apiBase+"/graphql"))
+ }
+
+ http.Handle("/api", srv)
+ http.Handle("/graphql", srv)
+
+ log.Info("Connect to GraphQL playground", "url", fmt.Sprintf("http://localhost:%s", port))
+ err := http.ListenAndServe(":"+port, nil)
+ if err != nil {
+ panic(err)
+ }
+}
diff --git a/gql/status.go b/gql/status.go
new file mode 100644
index 00000000..b774a0fc
--- /dev/null
+++ b/gql/status.go
@@ -0,0 +1,99 @@
+package gql
+
+import (
+ "context"
+ "github.com/cosmos/cosmos-sdk/client"
+ "os"
+ "os/exec"
+ "strconv"
+ "strings"
+)
+
+// NodeDataPath is the path to the ethermintd data folder.
+var NodeDataPath = os.ExpandEnv("$HOME/.ethermintd/data")
+
+func getStatusInfo(client client.Context) (*NodeInfo, *SyncInfo, *ValidatorInfo, error) {
+ nodeClient, err := client.GetNode()
+ if err != nil {
+ return nil, nil, nil, err
+ }
+ nodeStatus, err := nodeClient.Status(context.Background())
+ if err != nil {
+ return nil, nil, nil, err
+ }
+
+ return &NodeInfo{
+ ID: string(nodeStatus.NodeInfo.ID()),
+ Network: nodeStatus.NodeInfo.Network,
+ Moniker: nodeStatus.NodeInfo.Moniker,
+ }, &SyncInfo{
+ LatestBlockHash: nodeStatus.SyncInfo.LatestBlockHash.String(),
+ LatestBlockHeight: strconv.FormatInt(nodeStatus.SyncInfo.LatestBlockHeight, 10),
+ LatestBlockTime: nodeStatus.SyncInfo.LatestBlockTime.String(),
+ CatchingUp: nodeStatus.SyncInfo.CatchingUp,
+ }, &ValidatorInfo{
+ Address: nodeStatus.ValidatorInfo.Address.String(),
+ VotingPower: strconv.FormatInt(nodeStatus.ValidatorInfo.VotingPower, 10),
+ ProposerPriority: nil,
+ }, nil
+}
+
+func getNetInfo(client client.Context) (string, []*PeerInfo, error) {
+ nodeClient, err := client.GetNode()
+ if err != nil {
+ return "", nil, err
+ }
+ netInfo, err := nodeClient.NetInfo(context.Background())
+ if err != nil {
+ return "", nil, err
+ }
+
+ peers := netInfo.Peers
+ peersInfo := make([]*PeerInfo, len(peers))
+ for index, peer := range peers {
+ peersInfo[index] = &PeerInfo{
+ Node: &NodeInfo{
+ ID: string(peer.NodeInfo.ID()),
+ Moniker: peer.NodeInfo.Moniker,
+ Network: peer.NodeInfo.Network,
+ },
+ IsOutbound: peer.IsOutbound,
+ RemoteIP: peer.RemoteIP,
+ }
+ }
+
+ return strconv.FormatInt(int64(netInfo.NPeers), 10), peersInfo, nil
+}
+
+func getValidatorSet(client client.Context) ([]*ValidatorInfo, error) {
+ nodeClient, err := client.GetNode()
+ if err != nil {
+ return nil, err
+ }
+ res, err := nodeClient.Validators(context.Background(), nil, nil, nil)
+ if err != nil {
+ return nil, err
+ }
+
+ validatorSet := make([]*ValidatorInfo, len(res.Validators))
+ for index, validator := range res.Validators {
+ proposerPriority := strconv.FormatInt(validator.ProposerPriority, 10)
+ validatorSet[index] = &ValidatorInfo{
+ Address: validator.Address.String(),
+ VotingPower: strconv.FormatInt(validator.VotingPower, 10),
+ ProposerPriority: &proposerPriority,
+ }
+ }
+
+ return validatorSet, nil
+}
+
+// GetDiskUsage returns disk usage for the given path.
+func GetDiskUsage(dirPath string) (string, error) {
+ out, err := exec.Command("du", "-sh", dirPath).Output()
+ if err != nil {
+ return "", err
+ }
+
+ return strings.Fields(string(out))[0], nil
+}
diff --git a/gql/util.go b/gql/util.go
new file mode 100644
index 00000000..4f76e42c
--- /dev/null
+++ b/gql/util.go
@@ -0,0 +1,267 @@
+package gql
+
+import (
+ "context"
+ "encoding/json"
+ sdk "github.com/cosmos/cosmos-sdk/types"
+ auctiontypes "github.com/tharsis/ethermint/x/auction/types"
+ bondtypes "github.com/tharsis/ethermint/x/bond/types"
+ nstypes "github.com/tharsis/ethermint/x/nameservice/types"
+ "reflect"
+ "strconv"
+)
+
+// OwnerAttributeName denotes the owner attribute name for a bond.
+const OwnerAttributeName = "owner"
+
+// BondIDAttributeName denotes the record bond ID.
+const BondIDAttributeName = "bondId"
+
+// ExpiryTimeAttributeName denotes the record expiry time.
+const ExpiryTimeAttributeName = "expiryTime"
+
+func getGQLCoin(coin sdk.Coin) *Coin {
+ gqlCoin := Coin{
+ Type: coin.Denom,
+ Quantity: strconv.FormatInt(coin.Amount.Int64(), 10),
+ }
+
+ return &gqlCoin
+}
+
+func getGQLCoins(coins sdk.Coins) []*Coin {
+ gqlCoins := make([]*Coin, len(coins))
+ for index, coin := range coins {
+ gqlCoins[index] = getGQLCoin(coin)
+ }
+
+ return gqlCoins
+}
+func GetGQLNameAuthorityRecord(record *nstypes.NameAuthority) (*AuthorityRecord, error) {
+ if record == nil {
+ return nil, nil
+ }
+
+ return &AuthorityRecord{
+ OwnerAddress: record.OwnerAddress,
+ OwnerPublicKey: record.OwnerPublicKey,
+ Height: strconv.FormatUint(record.Height, 10),
+ Status: record.Status,
+ BondID: record.GetBondId(),
+ ExpiryTime: record.GetExpiryTime().String(),
+ }, nil
+}
+
+func getGQLRecord(ctx context.Context, resolver QueryResolver, record nstypes.Record) (*Record, error) {
+ // Nil record.
+ if record.Deleted {
+ return nil, nil
+ }
+
+ recordType := record.ToRecordType()
+ attributes, err := getAttributes(&recordType)
+ if err != nil {
+ return nil, err
+ }
+
+ references, err := getReferences(ctx, resolver, &recordType)
+ if err != nil {
+ return nil, err
+ }
+
+ return &Record{
+ ID: record.Id,
+ BondID: record.GetBondId(),
+ CreateTime: record.GetCreateTime().String(),
+ ExpiryTime: record.GetExpiryTime().String(),
+ Owners: record.GetOwners(),
+ Attributes: attributes,
+ References: references,
+ }, nil
+}
+
+func getGQLNameRecord(record *nstypes.NameRecord) (*NameRecord, error) {
+ if record == nil {
+ return nil, nil
+ }
+
+ records := make([]*NameRecordEntry, len(record.History))
+ for index, entry := range record.History {
+ records[index] = getNameRecordEntry(entry)
+ }
+
+ return &NameRecord{
+ Latest: getNameRecordEntry(record.Latest),
+ History: records,
+ }, nil
+}
+
+func getNameRecordEntry(record *nstypes.NameRecordEntry) *NameRecordEntry {
+ return &NameRecordEntry{
+ ID: record.Id,
+ Height: strconv.FormatUint(record.Height, 10),
+ }
+}
+
+func getGQLBond(bondObj *bondtypes.Bond) (*Bond, error) {
+ // Nil record.
+ if bondObj == nil {
+ return nil, nil
+ }
+
+ return &Bond{
+ ID: bondObj.Id,
+ Owner: bondObj.Owner,
+ Balance: getGQLCoins(bondObj.Balance),
+ }, nil
+}
+
+func matchBondOnAttributes(bondObj *bondtypes.Bond, attributes []*KeyValueInput) bool {
+ for _, attr := range attributes {
+ switch attr.Key {
+ case OwnerAttributeName:
+ {
+ if attr.Value.String == nil || bondObj.Owner != *attr.Value.String {
+ return false
+ }
+ }
+ default:
+ {
+ // Only attributes explicitly listed in the switch are queryable.
+ return false
+ }
+ }
+ }
+
+ return true
+}
+
+func getAuctionBid(bid *auctiontypes.Bid) *AuctionBid {
+ return &AuctionBid{
+ BidderAddress: bid.BidderAddress,
+ Status: bid.Status,
+ CommitHash: bid.CommitHash,
+ CommitTime: bid.GetCommitTime(),
+ RevealTime: bid.GetRevealTime(),
+ CommitFee: getGQLCoin(bid.CommitFee),
+ RevealFee: getGQLCoin(bid.RevealFee),
+ BidAmount: getGQLCoin(bid.BidAmount),
+ }
+}
+
+func GetGQLAuction(auction *auctiontypes.Auction, bids []*auctiontypes.Bid) (*Auction, error) {
+ if auction == nil {
+ return nil, nil
+ }
+
+ gqlAuction := Auction{
+ ID: auction.Id,
+ Status: auction.Status,
+ OwnerAddress: auction.OwnerAddress,
+ CreateTime: auction.GetCreateTime(),
+ CommitsEndTime: auction.GetCommitsEndTime(),
+ RevealsEndTime: auction.GetRevealsEndTime(),
+ CommitFee: getGQLCoin(auction.CommitFee),
+ RevealFee: getGQLCoin(auction.RevealFee),
+ MinimumBid: getGQLCoin(auction.MinimumBid),
+ WinnerAddress: auction.WinnerAddress,
+ WinnerBid: getGQLCoin(auction.WinningBid),
+ WinnerPrice: getGQLCoin(auction.WinningPrice),
+ }
+
+ auctionBids := make([]*AuctionBid, len(bids))
+ for index, entry := range bids {
+ auctionBids[index] = getAuctionBid(entry)
+ }
+
+ gqlAuction.Bids = auctionBids
+
+ return &gqlAuction, nil
+}
+
+func getReferences(ctx context.Context, resolver QueryResolver, r *nstypes.RecordType) ([]*Record, error) {
+ var ids []string
+
+ for _, value := range r.Attributes {
+ switch value.(type) {
+ case interface{}:
+ if obj, ok := value.(map[string]interface{}); ok {
+ if _, ok := obj["/"]; ok && len(obj) == 1 {
+ if _, ok := obj["/"].(string); ok {
+ ids = append(ids, obj["/"].(string))
+ }
+ }
+ }
+ }
+ }
+
+ return resolver.GetRecordsByIds(ctx, ids)
+}
+
+func getAttributes(r *nstypes.RecordType) ([]*KeyValue, error) {
+ return mapToKeyValuePairs(r.Attributes)
+}
+
+func mapToKeyValuePairs(attrs map[string]interface{}) ([]*KeyValue, error) {
+ var kvPairs []*KeyValue
+
+ trueVal := true
+ falseVal := false
+
+ for key, value := range attrs {
+ kvPair := &KeyValue{
+ Key: key,
+ Value: &Value{},
+ }
+
+ switch val := value.(type) {
+ case nil:
+ kvPair.Value.Null = &trueVal
+ case int:
+ kvPair.Value.Int = &val
+ case float64:
+ kvPair.Value.Float = &val
+ case string:
+ kvPair.Value.String = &val
+ case bool:
+ kvPair.Value.Boolean = &val
+ case interface{}:
+ if obj, ok := value.(map[string]interface{}); ok {
+ if _, ok := obj["/"]; ok && len(obj) == 1 {
+ if _, ok := obj["/"].(string); ok {
+ kvPair.Value.Reference = &Reference{
+ ID: obj["/"].(string),
+ }
+ }
+ } else {
+ bytes, err := json.Marshal(obj)
+ if err != nil {
+ return nil, err
+ }
+
+ jsonStr := string(bytes)
+ kvPair.Value.JSON = &jsonStr
+ }
+ }
+ }
+
+ if kvPair.Value.Null == nil {
+ kvPair.Value.Null = &falseVal
+ }
+
+ valueType := reflect.ValueOf(value)
+ if valueType.Kind() == reflect.Slice {
+ bytes, err := json.Marshal(value)
+ if err != nil {
+ return nil, err
+ }
+
+ jsonStr := string(bytes)
+ kvPair.Value.JSON = &jsonStr
+ }
+
+ kvPairs = append(kvPairs, kvPair)
+ }
+
+ return kvPairs, nil
+}
diff --git a/gql/version.go b/gql/version.go
new file mode 100644
index 00000000..9eedc530
--- /dev/null
+++ b/gql/version.go
@@ -0,0 +1,4 @@
+package gql
+
+// NameServiceVersion is the registry API version.
+const NameServiceVersion = "0.3.0"
diff --git a/gql/vulcanize/dxns/schema.graphql b/gql/vulcanize/dxns/schema.graphql
new file mode 100644
index 00000000..b167c659
--- /dev/null
+++ b/gql/vulcanize/dxns/schema.graphql
@@ -0,0 +1,260 @@
+# Reference to another record.
+type Reference {
+ id: String! # ID of linked record.
+}
+
+# Reference to another record.
+input ReferenceInput {
+ id: String!
+}
+
+# Bonds contain funds that are used to pay rent on record registration and renewal.
+type Bond {
+ id: String! # Primary key, auto-generated by the server.
+ owner: String! # Bond owner cosmos-sdk address.
+ balance: [Coin!] # Current balance for each coin type.
+}
+
+# OwnerBonds contains the bonds related the owner
+type OwnerBonds {
+ owner: String!
+ bonds: [Bond!]
+}
+
+# Mutations require payment in coins (e.g. 100wire).
+# Used by the wallet to get the account balance for display and mutations.
+type Coin {
+ type: String! # e.g. 'WIRE'
+ quantity: String! # e.g. 1000000
+}
+# Represents an account on the blockchain.
+# Mutations have to be signed by a particular account.
+type Account {
+ address: String! # Blockchain address.
+ pubKey: String # Public key.
+ number: String! # Account number.
+ sequence: String! # Sequence number used to prevent replays.
+ balance: [Coin!] # Current balance for each coin type.
+}
+
+# Value of a given type.
+type Value {
+ null: Boolean
+
+ int: Int
+ float: Float
+ string: String
+ boolean: Boolean
+ json: String
+
+ reference: Reference
+
+ values: [Value]
+}
+# Value of a given type used as input to queries.
+input ValueInput {
+ null: Boolean
+
+ int: Int
+ float: Float
+ string: String
+ boolean: Boolean
+
+ reference: ReferenceInput
+
+ values: [ValueInput]
+}
+
+# Key/value pair.
+type KeyValue {
+ key: String!
+ value: Value!
+}
+
+# Key/value pair for inputs.
+input KeyValueInput {
+ key: String!
+ value: ValueInput!
+}
+
+# Status information about a node (https://docs.tendermint.com/master/rpc/#/Info/status).
+type NodeInfo {
+ id: String! # Tendermint Node ID.
+ network: String! # Name of the network/blockchain.
+ moniker: String! # Name of the node.
+}
+
+# Node sync status.
+type SyncInfo {
+ latest_block_hash: String!
+ latest_block_height: String!
+ latest_block_time: String!
+ catching_up: Boolean!
+}
+
+# Validator set info (https://docs.tendermint.com/master/rpc/#/Info/validators).
+type ValidatorInfo {
+ address: String!
+ voting_power: String!
+ proposer_priority: String
+}
+
+# Network/peer info (https://docs.tendermint.com/master/rpc/#/Info/net_info).
+type PeerInfo {
+ node: NodeInfo!
+ is_outbound: Boolean!
+ remote_ip: String!
+}
+
+# Vulcanize DXNS status.
+type Status {
+ version: String!
+ node: NodeInfo!
+ sync: SyncInfo!
+ validator: ValidatorInfo
+ validators: [ValidatorInfo]!
+ num_peers: String!
+ peers: [PeerInfo]
+ disk_usage: String!
+}
+
+
+# An auction bid.
+type AuctionBid {
+ bidderAddress: String!
+ status: String!
+ commitHash: String!
+ commitTime: String!
+ commitFee: Coin!
+ revealTime: String!
+ revealFee: Coin!
+ bidAmount: Coin!
+}
+
+# A sealed-bid, 2nd price auction.
+type Auction {
+ id: String! # Auction ID.
+ status: String! # Auction status (commit, reveal, expired).
+ ownerAddress: String! # Auction owner time.
+ createTime: String! # Create time.
+ commitsEndTime: String! # Commit phase end time.
+ revealsEndTime: String! # Reveal phase end time.
+ commitFee: Coin! # Fee required to bid/participate in the auction.
+ revealFee: Coin! # Reveal fee (paid back to bidders only if they unseal/reveal the bid).
+ minimumBid: Coin! # Minimum bid amount.
+ winnerAddress: String! # Winner address.
+ winnerBid: Coin! # The winning bid amount.
+ winnerPrice: Coin! # The price that the winner actually pays (2nd highest bid).
+ bids: [AuctionBid] # Bids make in the auction.
+}
+
+
+# Record defines the basic properties of an entity in the graph database.
+type Record {
+ id: String! # Computed attribute: Multibase encoded content hash (https://github.com/multiformats/multibase).
+ names: [String!] # Names pointing to this CID (reverse lookup).
+
+ bondId: String! # Associated bond ID.
+ createTime: String! # Record create time.
+ expiryTime: String! # Record expiry time.
+
+ owners: [String!] # Addresses of record owners.
+ attributes: [KeyValue] # Record attributes.
+ references: [Record] # Record references.
+}
+
+# Name authority record.
+type AuthorityRecord {
+ ownerAddress: String! # Owner address.
+ ownerPublicKey: String! # Owner public key.
+ height: String! # Height at which record was created.
+ status: String! # Status (active, auction, expired).
+ bondId: String! # Associated bond ID.
+ expiryTime: String! # Authority expiry time.
+ auction: Auction # Authority auction.
+}
+
+# Name record entry, created at a particular height.
+type NameRecordEntry {
+ id: String! # Target record ID.
+ height: String! # Height at which record was created.
+}
+
+# Name record stores the latest and historical name -> record ID mappings.
+type NameRecord {
+ latest: NameRecordEntry! # Latest mame record entry.
+ history: [NameRecordEntry] # Historical name record entries.
+}
+
+type Query {
+ #
+ # Status API.
+ #
+ getStatus: Status!
+
+ # Get blockchain accounts.
+ getAccounts(
+ addresses: [String!]
+ ): [Account]
+
+ # Get bonds by IDs.
+ getBondsByIds(
+ ids: [String!]
+ ): [Bond]
+
+ # Query bonds.
+ queryBonds(
+ attributes: [KeyValueInput]
+ ): [Bond]
+
+ # Query bonds by owner.
+ queryBondsByOwner(
+ ownerAddresses: [String!]
+ ): [OwnerBonds]
+
+ #
+ # GraphDB API.
+ #
+
+ # Get records by IDs.
+ getRecordsByIds(
+ ids: [String!]
+ ): [Record]
+
+ # Query records.
+ queryRecords(
+ # Multiple attribute conditions are in a logical AND.
+ attributes: [KeyValueInput]
+
+ # Whether to query all records, not just named ones (false by default).
+ all: Boolean
+ ): [Record]
+
+ #
+ # Naming API.
+ #
+
+ # Lookup authority information.
+ lookupAuthorities(
+ names: [String!]
+ ): [AuthorityRecord]!
+
+ # Lookup name to record mapping information.
+ lookupNames(
+ names: [String!]
+ ): [NameRecord]!
+
+ # Resolve names to records.
+ resolveNames(
+ names: [String!]
+ ): [Record]!
+
+ #
+ # Auctions API.
+ #
+
+ # Get auctions by IDs.
+ getAuctionsByIds(
+ ids: [String!]
+ ): [Auction]
+}
\ No newline at end of file
diff --git a/proto/vulcanize/auction/v1beta1/genesis.proto b/proto/vulcanize/auction/v1beta1/genesis.proto
index 0b49ba63..9a50e3f3 100644
--- a/proto/vulcanize/auction/v1beta1/genesis.proto
+++ b/proto/vulcanize/auction/v1beta1/genesis.proto
@@ -8,8 +8,8 @@ option go_package = "github.com/tharsis/ethermint/x/auction/types";
// GenesisState defines the genesis state of the auction module
message GenesisState {
- Params params = 1 [(gogoproto.nullable) = false];
- repeated Auction auctions = 2 [
- (gogoproto.moretags) = "json:\"bonds\" yaml:\"bonds\""
- ];
+ Params params = 1 [(gogoproto.nullable) = false];
+ repeated Auction auctions = 2 [
+ (gogoproto.moretags) = "json:\"bonds\" yaml:\"bonds\""
+ ];
}
diff --git a/proto/vulcanize/auction/v1beta1/query.proto b/proto/vulcanize/auction/v1beta1/query.proto
index 78c544ad..6ef39d2b 100644
--- a/proto/vulcanize/auction/v1beta1/query.proto
+++ b/proto/vulcanize/auction/v1beta1/query.proto
@@ -11,78 +11,78 @@ option go_package = "github.com/tharsis/ethermint/x/auction/types";
// AuctionsRequest is the format for querying all the auctions
message AuctionsRequest {
- // pagination defines an optional pagination info for the next request
- cosmos.base.query.v1beta1.PageRequest pagination = 1;
+ // pagination defines an optional pagination info for the next request
+ cosmos.base.query.v1beta1.PageRequest pagination = 1;
}
// AuctionsResponse returns the list of all auctions
message AuctionsResponse {
- // List of auctions
- Auctions auctions = 1;
- // pagination defines an optional pagination info for the next request
- cosmos.base.query.v1beta1.PageRequest pagination = 2;
+ // List of auctions
+ Auctions auctions = 1;
+ // pagination defines an optional pagination info for the next request
+ cosmos.base.query.v1beta1.PageRequest pagination = 2;
}
// AuctionRequest is the format for querying a specific auction
message AuctionRequest {
- // Auction ID
- string id = 1;
+ // Auction ID
+ string id = 1;
}
// AuctionResponse returns the details of the queried auction
message AuctionResponse {
- // Auction details
- Auction auction = 1;
+ // Auction details
+ Auction auction = 1;
}
// BidRequest is the format for querying a specific bid in an auction
message BidRequest {
- // Auction ID
- string auction_id = 1;
- // Bidder address
- string bidder = 2;
+ // Auction ID
+ string auction_id = 1;
+ // Bidder address
+ string bidder = 2;
}
// BidResponse returns the details of the queried bid
message BidResponse {
- // Bid details
- Bid bid = 1;
+ // Bid details
+ Bid bid = 1;
}
// BidsRequest is the format for querying all bids in an auction
message BidsRequest {
- // Auction ID
- string auction_id = 1;
+ // Auction ID
+ string auction_id = 1;
}
// BidsResponse returns details of all bids in an auction
message BidsResponse {
- // List of bids in the auction
- repeated Bid bids = 1;
+ // List of bids in the auction
+ repeated Bid bids = 1;
}
// AuctionsByBidderRequest is the format for querying all auctions containing a bidder address
message AuctionsByBidderRequest {
- // Address of the bidder
- string bidder_address = 1;
+ // Address of the bidder
+ string bidder_address = 1;
}
// AuctionsByBidderResponse returns all auctions containing a bidder
message AuctionsByBidderResponse {
- // List of auctions
- Auctions auctions = 1;
+ // List of auctions
+ Auctions auctions = 1;
}
// AuctionsByOwnerRequest is the format for querying all auctions created by an owner
message AuctionsByOwnerRequest {
- // Address of the owner
- string owner_address = 1;
+ // Address of the owner
+ string owner_address = 1;
}
// AuctionsByOwnerResponse returns all auctions created by an owner
message AuctionsByOwnerResponse {
- // List of auctions
- Auctions auctions = 1;
+ // List of auctions
+ Auctions auctions = 1;
}
// QueryParamsRequest is the format to query the parameters of the auction module
@@ -91,7 +91,7 @@ message QueryParamsRequest {
// QueryParamsResponse returns parameters of the auction module
message QueryParamsResponse {
- Params params = 1;
+ Params params = 1;
}
// BalanceRequest is the format to fetch all balances
@@ -99,51 +99,51 @@ message BalanceRequest {
}
message BalanceResponse {
- // Set of all balances within the auction
- repeated cosmos.base.v1beta1.Coin balance = 1 [
- (gogoproto.nullable) = false
- ];
+ // Set of all balances within the auction
+ repeated cosmos.base.v1beta1.Coin balance = 1 [
+ (gogoproto.nullable) = false
+ ];
}
// Query defines the gRPC querier interface for the auction module
service Query {
- // Auctions queries all auctions
- rpc Auctions(AuctionsRequest) returns (AuctionsResponse) {
- option (google.api.http).get = "/vulcanize/auction/v1beta1/auctions";
- }
+ // Auctions queries all auctions
+ rpc Auctions(AuctionsRequest) returns (AuctionsResponse) {
+ option (google.api.http).get = "/vulcanize/auction/v1beta1/auctions";
+ }
- // GetAuction queries an auction
- rpc GetAuction(AuctionRequest) returns (AuctionResponse) {
- option (google.api.http).get = "/vulcanize/auction/v1beta1/auctions/{id}";
- }
-
- // GetBid queries an auction bid
- rpc GetBid(BidRequest) returns (BidResponse) {
- option (google.api.http).get = "/vulcanize/auction/v1beta1/bids/{auction_id}/{bidder}";
- }
+ // GetAuction queries an auction
+ rpc GetAuction(AuctionRequest) returns (AuctionResponse) {
+ option (google.api.http).get = "/vulcanize/auction/v1beta1/auctions/{id}";
+ }
- // GetBids queries all auction bids
- rpc GetBids(BidsRequest) returns (BidsResponse) {
- option (google.api.http).get = "/vulcanize/auction/v1beta1/bids/{auction_id}";
- }
+ // GetBid queries an auction bid
+ rpc GetBid(BidRequest) returns (BidResponse) {
+ option (google.api.http).get = "/vulcanize/auction/v1beta1/bids/{auction_id}/{bidder}";
+ }
- // AuctionsByBidder queries auctions by bidder
- rpc AuctionsByBidder(AuctionsByBidderRequest) returns (AuctionsByBidderResponse) {
- option (google.api.http).get = "/vulcanize/auction/v1beta1/by-bidder/{bidder_address}";
- }
+ // GetBids queries all auction bids
+ rpc GetBids(BidsRequest) returns (BidsResponse) {
+ option (google.api.http).get = "/vulcanize/auction/v1beta1/bids/{auction_id}";
+ }
- // AuctionsByOwner queries auctions by owner
- rpc AuctionsByOwner(AuctionsByOwnerRequest) returns (AuctionsByOwnerResponse) {
- option (google.api.http).get = "/vulcanize/auction/v1beta1/by-owner/{owner_address}";
- }
+ // AuctionsByBidder queries auctions by bidder
+ rpc AuctionsByBidder(AuctionsByBidderRequest) returns (AuctionsByBidderResponse) {
+ option (google.api.http).get = "/vulcanize/auction/v1beta1/by-bidder/{bidder_address}";
+ }
- // QueryParams implements the params query command
- rpc QueryParams(QueryParamsRequest) returns (QueryParamsResponse) {
- option (google.api.http).get = "/vulcanize/auction/v1beta1/params";
- }
+ // AuctionsByOwner queries auctions by owner
+ rpc AuctionsByOwner(AuctionsByOwnerRequest) returns (AuctionsByOwnerResponse) {
+ option (google.api.http).get = "/vulcanize/auction/v1beta1/by-owner/{owner_address}";
+ }
- // Balance queries the auction module account balance
- rpc Balance(BalanceRequest) returns (BalanceResponse) {
- option (google.api.http).get = "/vulcanize/auction/v1beta1/balance";
- }
+ // QueryParams implements the params query command
+ rpc QueryParams(QueryParamsRequest) returns (QueryParamsResponse) {
+ option (google.api.http).get = "/vulcanize/auction/v1beta1/params";
+ }
+
+ // Balance queries the auction module account balance
+ rpc Balance(BalanceRequest) returns (BalanceResponse) {
+ option (google.api.http).get = "/vulcanize/auction/v1beta1/balance";
+ }
}
diff --git a/proto/vulcanize/auction/v1beta1/tx.proto b/proto/vulcanize/auction/v1beta1/tx.proto
index 6904b420..9602dece 100644
--- a/proto/vulcanize/auction/v1beta1/tx.proto
+++ b/proto/vulcanize/auction/v1beta1/tx.proto
@@ -10,113 +10,113 @@ option go_package = "github.com/tharsis/ethermint/x/auction/types";
// MsgCreateAuction defines a create auction message
message MsgCreateAuction {
- option (gogoproto.goproto_getters) = false;
-
- // Duration of the commits phase in seconds
- google.protobuf.Duration commits_duration = 1 [
- (gogoproto.nullable) = false,
- (gogoproto.stdduration) = true,
- (gogoproto.moretags) = "json:\"commits_duration\" yaml:\"commits_duration\""
- ];
- // Duration of the reveals phase in seconds
- google.protobuf.Duration reveals_duration = 2 [
- (gogoproto.nullable) = false,
- (gogoproto.stdduration) = true,
- (gogoproto.moretags) = "json:\"reveals_duration\" yaml:\"reveals_duration\""
- ];
- // Commit fees
- cosmos.base.v1beta1.Coin commit_fee = 3 [
- (gogoproto.nullable) = false,
- (gogoproto.moretags) = "json:\"commit_fee\" yaml:\"commit_fee\""
- ];
- // Reveal fees
- cosmos.base.v1beta1.Coin reveal_fee = 4 [
- (gogoproto.nullable) = false,
- (gogoproto.moretags) = "json:\"reveal_fee\" yaml:\"reveal_fee\""
- ];
- // Minimum acceptable bid amount
- cosmos.base.v1beta1.Coin minimum_bid = 5 [
- (gogoproto.nullable) = false,
- (gogoproto.moretags) = "json:\"minimum_bid\" yaml:\"minimum_bid\""
- ];
- // Address of the signer
- string signer = 6 [
- (gogoproto.moretags) = "json:\"signer\" yaml:\"signer\""
- ];
+ option (gogoproto.goproto_getters) = false;
+
+ // Duration of the commits phase in seconds
+ google.protobuf.Duration commits_duration = 1 [
+ (gogoproto.nullable) = false,
+ (gogoproto.stdduration) = true,
+ (gogoproto.moretags) = "json:\"commits_duration\" yaml:\"commits_duration\""
+ ];
+ // Duration of the reveals phase in seconds
+ google.protobuf.Duration reveals_duration = 2 [
+ (gogoproto.nullable) = false,
+ (gogoproto.stdduration) = true,
+ (gogoproto.moretags) = "json:\"reveals_duration\" yaml:\"reveals_duration\""
+ ];
+ // Commit fees
+ cosmos.base.v1beta1.Coin commit_fee = 3 [
+ (gogoproto.nullable) = false,
+ (gogoproto.moretags) = "json:\"commit_fee\" yaml:\"commit_fee\""
+ ];
+ // Reveal fees
+ cosmos.base.v1beta1.Coin reveal_fee = 4 [
+ (gogoproto.nullable) = false,
+ (gogoproto.moretags) = "json:\"reveal_fee\" yaml:\"reveal_fee\""
+ ];
+ // Minimum acceptable bid amount
+ cosmos.base.v1beta1.Coin minimum_bid = 5 [
+ (gogoproto.nullable) = false,
+ (gogoproto.moretags) = "json:\"minimum_bid\" yaml:\"minimum_bid\""
+ ];
+ // Address of the signer
+ string signer = 6 [
+ (gogoproto.moretags) = "json:\"signer\" yaml:\"signer\""
+ ];
}
// MsgCreateAuctionResponse returns the details of the created auction
message MsgCreateAuctionResponse {
- option (gogoproto.goproto_getters) = false;
- // Auction details
- Auction auction = 1 [
- (gogoproto.moretags) = "json:\"auction\" yaml:\"auction\""
- ];
+ option (gogoproto.goproto_getters) = false;
+ // Auction details
+ Auction auction = 1 [
+ (gogoproto.moretags) = "json:\"auction\" yaml:\"auction\""
+ ];
}
// CommitBid defines the message to commit a bid
message MsgCommitBid {
- option (gogoproto.goproto_getters) = false;
+ option (gogoproto.goproto_getters) = false;
- // Auction ID
- string auction_id = 1 [
- (gogoproto.moretags) = "json:\"auction_id\" yaml:\"auction_id\""
- ];
- // Commit Hash
- string commit_hash = 2 [
- (gogoproto.moretags) = "json:\"commit_hash\" yaml:\"commit_hash\""
- ];
- // Address of the signer
- string signer = 3 [
- (gogoproto.moretags) = "json:\"signer\" yaml:\"signer\""
- ];
+ // Auction ID
+ string auction_id = 1 [
+ (gogoproto.moretags) = "json:\"auction_id\" yaml:\"auction_id\""
+ ];
+ // Commit Hash
+ string commit_hash = 2 [
+ (gogoproto.moretags) = "json:\"commit_hash\" yaml:\"commit_hash\""
+ ];
+ // Address of the signer
+ string signer = 3 [
+ (gogoproto.moretags) = "json:\"signer\" yaml:\"signer\""
+ ];
}
// RevealBid defines the message to reveal a bid
message MsgRevealBid {
- option (gogoproto.goproto_getters) = false;
+ option (gogoproto.goproto_getters) = false;
- // Auction ID
- string auction_id = 1 [
- (gogoproto.moretags) = "json:\"auction_id\" yaml:\"auction_id\""
- ];
- // Commit Hash
- string reveal = 2 [
- (gogoproto.moretags) = "json:\"reveal\" yaml:\"reveal\""
- ];
- // Address of the signer
- string signer = 3 [
- (gogoproto.moretags) = "json:\"signer\" yaml:\"signer\""
- ];
+ // Auction ID
+ string auction_id = 1 [
+ (gogoproto.moretags) = "json:\"auction_id\" yaml:\"auction_id\""
+ ];
+ // Commit Hash
+ string reveal = 2 [
+ (gogoproto.moretags) = "json:\"reveal\" yaml:\"reveal\""
+ ];
+ // Address of the signer
+ string signer = 3 [
+ (gogoproto.moretags) = "json:\"signer\" yaml:\"signer\""
+ ];
}
// MsgCommitBidResponse returns the state of the auction after the bid creation
message MsgCommitBidResponse {
- option (gogoproto.goproto_getters) = false;
- // Auction details
- Bid bid = 1 [
- (gogoproto.moretags) = "json:\"bid\" yaml:\"bid\""
- ];
+ option (gogoproto.goproto_getters) = false;
+ // Auction details
+ Bid bid = 1 [
+ (gogoproto.moretags) = "json:\"bid\" yaml:\"bid\""
+ ];
}
// MsgRevealBidResponse returns the state of the auction after the bid reveal
message MsgRevealBidResponse {
- option (gogoproto.goproto_getters) = false;
- // Auction details
- Auction auction = 1 [
- (gogoproto.moretags) = "json:\"auction\" yaml:\"auction\""
- ];
+ option (gogoproto.goproto_getters) = false;
+ // Auction details
+ Auction auction = 1 [
+ (gogoproto.moretags) = "json:\"auction\" yaml:\"auction\""
+ ];
}
// Tx defines the gRPC tx interface
service Msg {
- // CreateAuction is the command for creating an auction
- rpc CreateAuction(MsgCreateAuction) returns (MsgCreateAuctionResponse);
+ // CreateAuction is the command for creating an auction
+ rpc CreateAuction(MsgCreateAuction) returns (MsgCreateAuctionResponse);
- // CommitBid is the command for committing a bid
- rpc CommitBid(MsgCommitBid) returns (MsgCommitBidResponse);
+ // CommitBid is the command for committing a bid
+ rpc CommitBid(MsgCommitBid) returns (MsgCommitBidResponse);
- //RevealBid is the command for revealing a bid
- rpc RevealBid(MsgRevealBid) returns (MsgRevealBidResponse);
+ //RevealBid is the command for revealing a bid
+ rpc RevealBid(MsgRevealBid) returns (MsgRevealBidResponse);
}
diff --git a/proto/vulcanize/auction/v1beta1/types.proto b/proto/vulcanize/auction/v1beta1/types.proto
index d02ced6e..4ec5462f 100644
--- a/proto/vulcanize/auction/v1beta1/types.proto
+++ b/proto/vulcanize/auction/v1beta1/types.proto
@@ -10,126 +10,126 @@ option go_package = "github.com/tharsis/ethermint/x/auction/types";
// Params defines the auction module parameters
message Params {
- option (gogoproto.goproto_stringer) = false;
+ option (gogoproto.goproto_stringer) = false;
- // Duration of the commits phase in seconds
- google.protobuf.Duration commits_duration = 1 [
- (gogoproto.nullable) = false,
- (gogoproto.stdduration) = true,
- (gogoproto.moretags) = "json:\"commits_duration\" yaml:\"commits_duration\""
- ];
- // Duration of the reveals phase in seconds
- google.protobuf.Duration reveals_duration = 2 [
- (gogoproto.nullable) = false,
- (gogoproto.stdduration) = true,
- (gogoproto.moretags) = "json:\"reveals_duration\" yaml:\"reveals_duration\""
- ];
- // Commit fees
- cosmos.base.v1beta1.Coin commit_fee = 3 [
- (gogoproto.nullable) = false,
- (gogoproto.moretags) = "json:\"commit_fee\" yaml:\"commit_fee\""
- ];
- // Reveal fees
- cosmos.base.v1beta1.Coin reveal_fee = 4 [
- (gogoproto.nullable) = false,
- (gogoproto.moretags) = "json:\"reveal_fee\" yaml:\"reveal_fee\""
- ];
- // Minimum acceptable bid amount
- cosmos.base.v1beta1.Coin minimum_bid = 5 [
- (gogoproto.nullable) = false,
- (gogoproto.moretags) = "json:\"minimum_bid\" yaml:\"minimum_bid\""
- ];
+ // Duration of the commits phase in seconds
+ google.protobuf.Duration commits_duration = 1 [
+ (gogoproto.nullable) = false,
+ (gogoproto.stdduration) = true,
+ (gogoproto.moretags) = "json:\"commits_duration\" yaml:\"commits_duration\""
+ ];
+ // Duration of the reveals phase in seconds
+ google.protobuf.Duration reveals_duration = 2 [
+ (gogoproto.nullable) = false,
+ (gogoproto.stdduration) = true,
+ (gogoproto.moretags) = "json:\"reveals_duration\" yaml:\"reveals_duration\""
+ ];
+ // Commit fees
+ cosmos.base.v1beta1.Coin commit_fee = 3 [
+ (gogoproto.nullable) = false,
+ (gogoproto.moretags) = "json:\"commit_fee\" yaml:\"commit_fee\""
+ ];
+ // Reveal fees
+ cosmos.base.v1beta1.Coin reveal_fee = 4 [
+ (gogoproto.nullable) = false,
+ (gogoproto.moretags) = "json:\"reveal_fee\" yaml:\"reveal_fee\""
+ ];
+ // Minimum acceptable bid amount
+ cosmos.base.v1beta1.Coin minimum_bid = 5 [
+ (gogoproto.nullable) = false,
+ (gogoproto.moretags) = "json:\"minimum_bid\" yaml:\"minimum_bid\""
+ ];
}
// Auction represents a sealed-bid on-chain auction
message Auction {
- option (gogoproto.goproto_getters) = false;
+ option (gogoproto.goproto_getters) = false;
- string id = 1;
- string status = 2;
- // Address of the creator of the auction
- string owner_address = 3;
- // Timestamp at which the auction was created
- google.protobuf.Timestamp create_time = 4 [
- (gogoproto.stdtime) = true,
- (gogoproto.nullable) = false,
- (gogoproto.moretags) = "json:\"create_time\" yaml:\"create_time\""
- ];
- // Timestamp at which the commits phase concluded
- google.protobuf.Timestamp commits_end_time = 5 [
- (gogoproto.stdtime) = true,
- (gogoproto.nullable) = false,
- (gogoproto.moretags) = "json:\"commits_end_time\" yaml:\"commits_end_time\""
- ];
- // Timestamp at which the reveals phase concluded
- google.protobuf.Timestamp reveals_end_time = 6 [
- (gogoproto.stdtime) = true,
- (gogoproto.nullable) = false,
- (gogoproto.moretags) = "json:\"reveals_end_time\" yaml:\"reveals_end_time\""
- ];
- // Commit and reveal fees must both be paid when committing a bid
- // Reveal fee is returned only if the bid is revealed
- cosmos.base.v1beta1.Coin commit_fee = 7 [
- (gogoproto.nullable) = false,
- (gogoproto.moretags) = "json:\"commit_fee\" yaml:\"commit_fee\""
- ];
- cosmos.base.v1beta1.Coin reveal_fee = 8 [
- (gogoproto.nullable) = false,
- (gogoproto.moretags) = "json:\"reveal_fee\" yaml:\"reveal_fee\""
- ];
- // Minimum acceptable bid amount for a valid commit
- cosmos.base.v1beta1.Coin minimum_bid = 9 [
- (gogoproto.nullable) = false,
- (gogoproto.moretags) = "json:\"minimum_bid\" yaml:\"minimum_bid\""
- ];
- // Address of the winner
- string winner_address = 10;
- // Winning bid, i.e., the highest bid
- cosmos.base.v1beta1.Coin winning_bid = 11 [
- (gogoproto.nullable) = false,
- (gogoproto.moretags) = "json:\"winning_bid\" yaml:\"winning_bid\""
- ];
- // Amount the winner pays, i.e. the second highest auction
- cosmos.base.v1beta1.Coin winning_price = 12 [
- (gogoproto.nullable) = false,
- (gogoproto.moretags) = "json:\"winning_price\" yaml:\"winning_price\""
- ];
+ string id = 1;
+ string status = 2;
+ // Address of the creator of the auction
+ string owner_address = 3;
+ // Timestamp at which the auction was created
+ google.protobuf.Timestamp create_time = 4 [
+ (gogoproto.stdtime) = true,
+ (gogoproto.nullable) = false,
+ (gogoproto.moretags) = "json:\"create_time\" yaml:\"create_time\""
+ ];
+ // Timestamp at which the commits phase concluded
+ google.protobuf.Timestamp commits_end_time = 5 [
+ (gogoproto.stdtime) = true,
+ (gogoproto.nullable) = false,
+ (gogoproto.moretags) = "json:\"commits_end_time\" yaml:\"commits_end_time\""
+ ];
+ // Timestamp at which the reveals phase concluded
+ google.protobuf.Timestamp reveals_end_time = 6 [
+ (gogoproto.stdtime) = true,
+ (gogoproto.nullable) = false,
+ (gogoproto.moretags) = "json:\"reveals_end_time\" yaml:\"reveals_end_time\""
+ ];
+ // Commit and reveal fees must both be paid when committing a bid
+ // Reveal fee is returned only if the bid is revealed
+ cosmos.base.v1beta1.Coin commit_fee = 7 [
+ (gogoproto.nullable) = false,
+ (gogoproto.moretags) = "json:\"commit_fee\" yaml:\"commit_fee\""
+ ];
+ cosmos.base.v1beta1.Coin reveal_fee = 8 [
+ (gogoproto.nullable) = false,
+ (gogoproto.moretags) = "json:\"reveal_fee\" yaml:\"reveal_fee\""
+ ];
+ // Minimum acceptable bid amount for a valid commit
+ cosmos.base.v1beta1.Coin minimum_bid = 9 [
+ (gogoproto.nullable) = false,
+ (gogoproto.moretags) = "json:\"minimum_bid\" yaml:\"minimum_bid\""
+ ];
+ // Address of the winner
+ string winner_address = 10;
+ // Winning bid, i.e., the highest bid
+ cosmos.base.v1beta1.Coin winning_bid = 11 [
+ (gogoproto.nullable) = false,
+ (gogoproto.moretags) = "json:\"winning_bid\" yaml:\"winning_bid\""
+ ];
+ // Amount the winner pays, i.e. the second highest auction
+ cosmos.base.v1beta1.Coin winning_price = 12 [
+ (gogoproto.nullable) = false,
+ (gogoproto.moretags) = "json:\"winning_price\" yaml:\"winning_price\""
+ ];
}
message Auctions {
- option (gogoproto.goproto_getters) = false;
+ option (gogoproto.goproto_getters) = false;
- repeated Auction auctions = 1 [(gogoproto.nullable) = false];
+ repeated Auction auctions = 1 [(gogoproto.nullable) = false];
}
// Bid represents a sealed bid (commit) made during the auction
message Bid {
- option (gogoproto.goproto_getters) = false;
+ option (gogoproto.goproto_getters) = false;
- string auction_id = 1;
- string bidder_address = 2;
- string status = 3;
- string commit_hash = 4;
- google.protobuf.Timestamp commit_time = 5 [
- (gogoproto.stdtime) = true,
- (gogoproto.nullable) = false,
- (gogoproto.moretags) = "json:\"commit_time\" yaml:\"commit_time\""
- ];
- cosmos.base.v1beta1.Coin commit_fee = 6 [
- (gogoproto.nullable) = false,
- (gogoproto.moretags) = "json:\"commit_fee\" yaml:\"commit_fee\""
- ];
- google.protobuf.Timestamp reveal_time = 7 [
- (gogoproto.stdtime) = true,
- (gogoproto.nullable) = false,
- (gogoproto.moretags) = "json:\"reveal_time\" yaml:\"reveal_time\""
- ];
- cosmos.base.v1beta1.Coin reveal_fee = 8 [
- (gogoproto.nullable) = false,
- (gogoproto.moretags) = "json:\"reveal_fee\" yaml:\"reveal_fee\""
- ];
- cosmos.base.v1beta1.Coin bid_amount = 9 [
- (gogoproto.nullable) = false,
- (gogoproto.moretags) = "json:\"bid_amount\" yaml:\"bid_amount\""
- ];;
+ string auction_id = 1;
+ string bidder_address = 2;
+ string status = 3;
+ string commit_hash = 4;
+ google.protobuf.Timestamp commit_time = 5 [
+ (gogoproto.stdtime) = true,
+ (gogoproto.nullable) = false,
+ (gogoproto.moretags) = "json:\"commit_time\" yaml:\"commit_time\""
+ ];
+ cosmos.base.v1beta1.Coin commit_fee = 6 [
+ (gogoproto.nullable) = false,
+ (gogoproto.moretags) = "json:\"commit_fee\" yaml:\"commit_fee\""
+ ];
+ google.protobuf.Timestamp reveal_time = 7 [
+ (gogoproto.stdtime) = true,
+ (gogoproto.nullable) = false,
+ (gogoproto.moretags) = "json:\"reveal_time\" yaml:\"reveal_time\""
+ ];
+ cosmos.base.v1beta1.Coin reveal_fee = 8 [
+ (gogoproto.nullable) = false,
+ (gogoproto.moretags) = "json:\"reveal_fee\" yaml:\"reveal_fee\""
+ ];
+ cosmos.base.v1beta1.Coin bid_amount = 9 [
+ (gogoproto.nullable) = false,
+ (gogoproto.moretags) = "json:\"bid_amount\" yaml:\"bid_amount\""
+ ];;
}
diff --git a/server/flags/flags.go b/server/flags/flags.go
index 710e3e3e..96814bcf 100644
--- a/server/flags/flags.go
+++ b/server/flags/flags.go
@@ -69,3 +69,15 @@ func AddTxFlags(cmd *cobra.Command) *cobra.Command {
cmd.MarkFlagRequired(flags.FlagChainID)
return cmd
}
+
+// AddGQLFlags adds gql flags for
+func AddGQLFlags(cmd *cobra.Command) *cobra.Command {
+ // Add flags for GQL server.
+ cmd.PersistentFlags().Bool("gql-server", false, "Start GQL server.")
+ cmd.PersistentFlags().Bool("gql-playground", false, "Enable GQL playground.")
+ cmd.PersistentFlags().String("gql-playground-api-base", "", "GQL API base path to use in GQL playground.")
+ cmd.PersistentFlags().String("gql-port", "9473", "Port to use for the GQL server.")
+ cmd.PersistentFlags().String("log-file", "", "File to tail for GQL 'getLogs' API.")
+
+ return cmd
+}
diff --git a/server/start.go b/server/start.go
index 627f2c55..9fd407a0 100644
--- a/server/start.go
+++ b/server/start.go
@@ -3,6 +3,7 @@ package server
import (
"context"
"fmt"
+ "github.com/tharsis/ethermint/gql"
"io"
"net/http"
"os"
@@ -400,6 +401,9 @@ func startInProcess(ctx *server.Context, clientCtx client.Context, appCreator ty
}
}
+ // Start the GQL Server
+ go gql.Server(clientCtx)
+
defer func() {
if tmNode.IsRunning() {
_ = tmNode.Stop()
diff --git a/x/auction/README.md b/x/auction/README.md
index 75f1a4a7..00a856c8 100644
--- a/x/auction/README.md
+++ b/x/auction/README.md
@@ -3,6 +3,7 @@
## Build the Chain
The following command builds the Ethermint daemon and places the binary in the `build` directory
+
```
make build
@@ -13,28 +14,29 @@ make build
The following steps need to be followed only before running the chain for the first time.
1. Add the root key:
- ```
- ./build/ethermintd keys add root
- ```
- Keep a note of the keyring passphrase if you set it.
+ ```
+ ./build/ethermintd keys add root
+ ```
+ Keep a note of the keyring passphrase if you set it.
2. Init the chain:
- ```
- ./build/ethermintd init test-moniker --chain-id ethermint_9000-1
- ```
+ ```
+ ./build/ethermintd init test-moniker --chain-id ethermint_9000-1
+ ```
3. Add genesis account:
- ```
- ./build/ethermintd add-genesis-account $(./build/ethermintd keys show root -a) 1000000000000000000aphoton,1000000000000000000stake
- ```
+ ```
+ ./build/ethermintd add-genesis-account $(./build/ethermintd keys show root -a) 1000000000000000000aphoton,1000000000000000000stake
+ ```
4. Make a genesis tx:
- ```
- ./build/ethermintd gentx root 1000000000000000000stake --chain-id ethermint_9000-1
- ```
+ ```
+ ./build/ethermintd gentx root 1000000000000000000stake --chain-id ethermint_9000-1
+ ```
5. Collect gentxs:
- ```
- ./build/ethermintd collect-gentxs
- ```
+ ```
+ ./build/ethermintd collect-gentxs
+ ```
The chain can now be started using:
+
```
./build/ethermintd start
```
@@ -42,6 +44,7 @@ The chain can now be started using:
## Querying the Params
The following command will dislay the default params for the `auction` module:
+
```
# ./build/ethermintd q auction params -o json | jq
@@ -292,4 +295,4 @@ auctions:
balance:
- amount: "20"
denom: aphoton
-```
+```
\ No newline at end of file
diff --git a/x/bond/keeper/keeper.go b/x/bond/keeper/keeper.go
index 3732bb19..e1c785bf 100644
--- a/x/bond/keeper/keeper.go
+++ b/x/bond/keeper/keeper.go
@@ -78,6 +78,27 @@ func (bondID BondID) Generate() string {
return hex.EncodeToString(hasher.Sum(nil))
}
+// MatchBonds - get all matching bonds.
+func (k Keeper) MatchBonds(ctx sdk.Context, matchFn func(*types.Bond) bool) []*types.Bond {
+ var bonds []*types.Bond
+
+ store := ctx.KVStore(k.storeKey)
+ itr := sdk.KVStorePrefixIterator(store, prefixIDToBondIndex)
+ defer itr.Close()
+ for ; itr.Valid(); itr.Next() {
+ bz := store.Get(itr.Key())
+ if bz != nil {
+ var obj types.Bond
+ k.cdc.MustUnmarshal(bz, &obj)
+ if matchFn(&obj) {
+ bonds = append(bonds, &obj)
+ }
+ }
+ }
+
+ return bonds
+}
+
// CreateBond creates a new bond.
func (k Keeper) CreateBond(ctx sdk.Context, ownerAddress sdk.AccAddress, coins sdk.Coins) (*types.Bond, error) {
// Check if account has funds.