diff --git a/gql/vulcanize/chiba-clonk/schema.graphql b/gql/cerc-io/laconicd/schema.graphql similarity index 87% rename from gql/vulcanize/chiba-clonk/schema.graphql rename to gql/cerc-io/laconicd/schema.graphql index b47b5512..d090c8c6 100644 --- a/gql/vulcanize/chiba-clonk/schema.graphql +++ b/gql/cerc-io/laconicd/schema.graphql @@ -1,12 +1,5 @@ # Reference to another record. -type Reference { - id: String! # ID of linked record. -} - -# Reference to another record. -input ReferenceInput { - id: String! -} +scalar Link # Bonds contain funds that are used to pay rent on record registration and renewal. type Bond { @@ -37,44 +30,71 @@ type Account { balance: [Coin!] # Current balance for each coin type. } -# Value of a given type. -type Value { - null: Boolean +# Value describes a DAG-JSON compatible value. +union Value = + BooleanValue + | IntValue + | FloatValue + | StringValue + | BytesValue + | LinkValue + | ArrayValue + | MapValue - int: Int - float: Float - string: String - boolean: Boolean - json: String - - reference: Reference - - values: [Value] +type BooleanValue { + value: Boolean! } -# Value of a given type used as input to queries. -input ValueInput { - null: Boolean - int: Int - float: Float - string: String - boolean: Boolean +type IntValue { + value: Int! +} - reference: ReferenceInput +type FloatValue { + value: Float! +} - values: [ValueInput] +type StringValue { + value: String! +} + +type BytesValue { + value: String! +} + +type ArrayValue { + value: [Value]! +} + +type LinkValue { + value: Link! +} + +type MapValue { + value: [Attribute!]! } # Key/value pair. -type KeyValue { +type Attribute { key: String! - value: Value! + value: Value +} + +# Value of a given type used as input to queries. +# Note: GQL doesn't allow union input types. +input ValueInput { + int: Int + float: Float + string: String + boolean: Boolean + link: Link + array: [ValueInput] + map: [KeyValueInput!] } # Key/value pair for inputs. input KeyValueInput { key: String! - value: ValueInput! + value: ValueInput } # Status information about a node (https://docs.tendermint.com/master/rpc/#/Info/status). @@ -155,7 +175,7 @@ type Record { createTime: String! # Record create time. expiryTime: String! # Record expiry time. owners: [String!] # Addresses of record owners. - attributes: [KeyValue] # Record attributes. + attributes: [Attribute!] # Record attributes. references: [Record] # Record references. } @@ -195,7 +215,7 @@ type Query { getBondsByIds(ids: [String!]): [Bond] # Query bonds. - queryBonds(attributes: [KeyValueInput]): [Bond] + queryBonds(attributes: [KeyValueInput!]): [Bond] # Query bonds by owner. queryBondsByOwner(ownerAddresses: [String!]): [OwnerBonds] @@ -210,7 +230,7 @@ type Query { # Query records. queryRecords( # Multiple attribute conditions are in a logical AND. - attributes: [KeyValueInput] + attributes: [KeyValueInput!] # Whether to query all records, not just named ones (false by default). all: Boolean diff --git a/gql/generated.go b/gql/generated.go index 8e030164..f87895be 100644 --- a/gql/generated.go +++ b/gql/generated.go @@ -5,7 +5,9 @@ package gql import ( "bytes" "context" + "embed" "errors" + "fmt" "strconv" "sync" "sync/atomic" @@ -49,6 +51,15 @@ type ComplexityRoot struct { Sequence func(childComplexity int) int } + ArrayValue struct { + Value func(childComplexity int) int + } + + Attribute struct { + Key func(childComplexity int) int + Value func(childComplexity int) int + } + Auction struct { Bids func(childComplexity int) int CommitFee func(childComplexity int) int @@ -92,13 +103,32 @@ type ComplexityRoot struct { Owner func(childComplexity int) int } + BooleanValue struct { + Value func(childComplexity int) int + } + + BytesValue struct { + Value func(childComplexity int) int + } + Coin struct { Quantity func(childComplexity int) int Type func(childComplexity int) int } - KeyValue struct { - Key func(childComplexity int) int + FloatValue struct { + Value func(childComplexity int) int + } + + IntValue struct { + Value func(childComplexity int) int + } + + LinkValue struct { + Value func(childComplexity int) int + } + + MapValue struct { Value func(childComplexity int) int } @@ -154,10 +184,6 @@ type ComplexityRoot struct { References func(childComplexity int) int } - Reference struct { - ID func(childComplexity int) int - } - Status struct { DiskUsage func(childComplexity int) int Node func(childComplexity int) int @@ -169,6 +195,10 @@ type ComplexityRoot struct { Version func(childComplexity int) int } + StringValue struct { + Value func(childComplexity int) int + } + SyncInfo struct { CatchingUp func(childComplexity int) int LatestBlockHash func(childComplexity int) int @@ -181,17 +211,6 @@ type ComplexityRoot struct { 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 { @@ -258,6 +277,27 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Account.Sequence(childComplexity), true + case "ArrayValue.value": + if e.complexity.ArrayValue.Value == nil { + break + } + + return e.complexity.ArrayValue.Value(childComplexity), true + + case "Attribute.key": + if e.complexity.Attribute.Key == nil { + break + } + + return e.complexity.Attribute.Key(childComplexity), true + + case "Attribute.value": + if e.complexity.Attribute.Value == nil { + break + } + + return e.complexity.Attribute.Value(childComplexity), true + case "Auction.bids": if e.complexity.Auction.Bids == nil { break @@ -475,6 +515,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Bond.Owner(childComplexity), true + case "BooleanValue.value": + if e.complexity.BooleanValue.Value == nil { + break + } + + return e.complexity.BooleanValue.Value(childComplexity), true + + case "BytesValue.value": + if e.complexity.BytesValue.Value == nil { + break + } + + return e.complexity.BytesValue.Value(childComplexity), true + case "Coin.quantity": if e.complexity.Coin.Quantity == nil { break @@ -489,19 +543,33 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Coin.Type(childComplexity), true - case "KeyValue.key": - if e.complexity.KeyValue.Key == nil { + case "FloatValue.value": + if e.complexity.FloatValue.Value == nil { break } - return e.complexity.KeyValue.Key(childComplexity), true + return e.complexity.FloatValue.Value(childComplexity), true - case "KeyValue.value": - if e.complexity.KeyValue.Value == nil { + case "IntValue.value": + if e.complexity.IntValue.Value == nil { break } - return e.complexity.KeyValue.Value(childComplexity), true + return e.complexity.IntValue.Value(childComplexity), true + + case "LinkValue.value": + if e.complexity.LinkValue.Value == nil { + break + } + + return e.complexity.LinkValue.Value(childComplexity), true + + case "MapValue.value": + if e.complexity.MapValue.Value == nil { + break + } + + return e.complexity.MapValue.Value(childComplexity), true case "NameRecord.history": if e.complexity.NameRecord.History == nil { @@ -770,13 +838,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in 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 @@ -833,6 +894,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Status.Version(childComplexity), true + case "StringValue.value": + if e.complexity.StringValue.Value == nil { + break + } + + return e.complexity.StringValue.Value(childComplexity), true + case "SyncInfo.catching_up": if e.complexity.SyncInfo.CatchingUp == nil { break @@ -882,62 +950,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in 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 } @@ -945,6 +957,10 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { rc := graphql.GetOperationContext(ctx) ec := executionContext{rc, e} + inputUnmarshalMap := graphql.BuildUnmarshalerMap( + ec.unmarshalInputKeyValueInput, + ec.unmarshalInputValueInput, + ) first := true switch rc.Operation.Operation { @@ -954,6 +970,7 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { return nil } first = false + ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap) data := ec._Query(ctx, rc.Operation.SelectionSet) var buf bytes.Buffer data.MarshalGQL(&buf) @@ -987,267 +1004,19 @@ func (ec *executionContext) introspectType(name string) (*introspection.Type, er return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil } +//go:embed "cerc-io/laconicd/schema.graphql" +var sourcesFS embed.FS + +func sourceData(filename string) string { + data, err := sourcesFS.ReadFile(filename) + if err != nil { + panic(fmt.Sprintf("codegen problem: %s not available", filename)) + } + return string(data) +} + var sources = []*ast.Source{ - {Name: "vulcanize/chiba-clonk/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 chiba-clonk 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}, + {Name: "cerc-io/laconicd/schema.graphql", Input: sourceData("cerc-io/laconicd/schema.graphql"), BuiltIn: false}, } var parsedSchema = gqlparser.MustLoadSchema(sources...) @@ -1381,7 +1150,7 @@ func (ec *executionContext) field_Query_queryBonds_args(ctx context.Context, raw 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) + arg0, err = ec.unmarshalOKeyValueInput2ᚕᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐKeyValueInputᚄ(ctx, tmp) if err != nil { return nil, err } @@ -1396,7 +1165,7 @@ func (ec *executionContext) field_Query_queryRecords_args(ctx context.Context, r 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) + arg0, err = ec.unmarshalOKeyValueInput2ᚕᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐKeyValueInputᚄ(ctx, tmp) if err != nil { return nil, err } @@ -1468,21 +1237,17 @@ func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArg // region **************************** field.gotpl ***************************** func (ec *executionContext) _Account_address(ctx context.Context, field graphql.CollectedField, obj *Account) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Account_address(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -1502,22 +1267,31 @@ func (ec *executionContext) _Account_address(ctx context.Context, field graphql. return ec.marshalNString2string(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Account_address(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Account", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Account_pubKey(ctx context.Context, field graphql.CollectedField, obj *Account) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Account_pubKey(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -1534,22 +1308,31 @@ func (ec *executionContext) _Account_pubKey(ctx context.Context, field graphql.C return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Account_pubKey(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Account", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Account_number(ctx context.Context, field graphql.CollectedField, obj *Account) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Account_number(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -1569,22 +1352,31 @@ func (ec *executionContext) _Account_number(ctx context.Context, field graphql.C return ec.marshalNString2string(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Account_number(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Account", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Account_sequence(ctx context.Context, field graphql.CollectedField, obj *Account) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Account_sequence(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -1604,22 +1396,31 @@ func (ec *executionContext) _Account_sequence(ctx context.Context, field graphql 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{ +func (ec *executionContext) fieldContext_Account_sequence(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Account", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Account_balance(ctx context.Context, field graphql.CollectedField, obj *Account) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Account_balance(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Balance, nil @@ -1633,28 +1434,43 @@ func (ec *executionContext) _Account_balance(ctx context.Context, field graphql. } res := resTmp.([]*Coin) fc.Result = res - return ec.marshalOCoin2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐCoinᚄ(ctx, field.Selections, res) + return ec.marshalOCoin2ᚕᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐCoinᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Auction_id(ctx context.Context, field graphql.CollectedField, obj *Auction) (ret graphql.Marshaler) { +func (ec *executionContext) fieldContext_Account_balance(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Account", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "type": + return ec.fieldContext_Coin_type(ctx, field) + case "quantity": + return ec.fieldContext_Coin_quantity(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Coin", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _ArrayValue_value(ctx context.Context, field graphql.CollectedField, obj *ArrayValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ArrayValue_value(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 + return obj.Value, nil }) if err != nil { ec.Error(ctx, err) @@ -1666,1138 +1482,36 @@ func (ec *executionContext) _Auction_id(ctx context.Context, field graphql.Colle } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]Value) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNValue2ᚕgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐValue(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", +func (ec *executionContext) fieldContext_ArrayValue_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "ArrayValue", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Value does not have child fields") + }, } + return fc, nil +} - 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 - }) +func (ec *executionContext) _Attribute_key(ctx context.Context, field graphql.CollectedField, obj *Attribute) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Attribute_key(ctx, field) 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) { + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -2817,22 +1531,31 @@ func (ec *executionContext) _KeyValue_key(ctx context.Context, field graphql.Col return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _KeyValue_value(ctx context.Context, field graphql.CollectedField, obj *KeyValue) (ret graphql.Marshaler) { +func (ec *executionContext) fieldContext_Attribute_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Attribute", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Attribute_value(ctx context.Context, field graphql.CollectedField, obj *Attribute) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Attribute_value(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -2842,99 +1565,38 @@ func (ec *executionContext) _KeyValue_value(ctx context.Context, field graphql.C return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*Value) + res := resTmp.(Value) fc.Result = res - return ec.marshalNValue2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐValue(ctx, field.Selections, res) + return ec.marshalOValue2githubᚗcomᚋcercᚑioᚋlaconicdᚋ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", +func (ec *executionContext) fieldContext_Attribute_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Attribute", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Value does not have child fields") + }, } + return fc, nil +} - 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 - }) +func (ec *executionContext) _Auction_id(ctx context.Context, field graphql.CollectedField, obj *Auction) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Auction_id(ctx, field) 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) { + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -2954,25 +1616,34 @@ func (ec *executionContext) _NameRecordEntry_id(ctx context.Context, field graph return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _NameRecordEntry_height(ctx context.Context, field graphql.CollectedField, obj *NameRecordEntry) (ret graphql.Marshaler) { +func (ec *executionContext) fieldContext_Auction_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Auction", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Auction_status(ctx context.Context, field graphql.CollectedField, obj *Auction) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Auction_status(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 + return obj.Status, nil }) if err != nil { ec.Error(ctx, err) @@ -2989,25 +1660,34 @@ func (ec *executionContext) _NameRecordEntry_height(ctx context.Context, field g return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _NodeInfo_id(ctx context.Context, field graphql.CollectedField, obj *NodeInfo) (ret graphql.Marshaler) { +func (ec *executionContext) fieldContext_Auction_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Auction", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Auction_ownerAddress(ctx context.Context, field graphql.CollectedField, obj *Auction) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Auction_ownerAddress(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 + return obj.OwnerAddress, nil }) if err != nil { ec.Error(ctx, err) @@ -3024,871 +1704,31 @@ func (ec *executionContext) _NodeInfo_id(ctx context.Context, field graphql.Coll 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", +func (ec *executionContext) fieldContext_Auction_ownerAddress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Auction", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } - - 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) + return fc, nil } -func (ec *executionContext) _NodeInfo_moniker(ctx context.Context, field graphql.CollectedField, obj *NodeInfo) (ret graphql.Marshaler) { +func (ec *executionContext) _Auction_createTime(ctx context.Context, field graphql.CollectedField, obj *Auction) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Auction_createTime(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -3908,22 +1748,1062 @@ func (ec *executionContext) _Record_createTime(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _Record_expiryTime(ctx context.Context, field graphql.CollectedField, obj *Record) (ret graphql.Marshaler) { +func (ec *executionContext) fieldContext_Auction_createTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Auction", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Auction_commitsEndTime(ctx context.Context, field graphql.CollectedField, obj *Auction) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Auction_commitsEndTime(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Record", + 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) fieldContext_Auction_commitsEndTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Auction", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Auction_revealsEndTime(ctx context.Context, field graphql.CollectedField, obj *Auction) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Auction_revealsEndTime(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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) fieldContext_Auction_revealsEndTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Auction", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Auction_commitFee(ctx context.Context, field graphql.CollectedField, obj *Auction) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Auction_commitFee(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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ᚋcercᚑioᚋlaconicdᚋgqlᚐCoin(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Auction_commitFee(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Auction", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "type": + return ec.fieldContext_Coin_type(ctx, field) + case "quantity": + return ec.fieldContext_Coin_quantity(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Coin", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Auction_revealFee(ctx context.Context, field graphql.CollectedField, obj *Auction) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Auction_revealFee(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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ᚋcercᚑioᚋlaconicdᚋgqlᚐCoin(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Auction_revealFee(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Auction", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "type": + return ec.fieldContext_Coin_type(ctx, field) + case "quantity": + return ec.fieldContext_Coin_quantity(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Coin", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Auction_minimumBid(ctx context.Context, field graphql.CollectedField, obj *Auction) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Auction_minimumBid(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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ᚋcercᚑioᚋlaconicdᚋgqlᚐCoin(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Auction_minimumBid(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Auction", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "type": + return ec.fieldContext_Coin_type(ctx, field) + case "quantity": + return ec.fieldContext_Coin_quantity(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Coin", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Auction_winnerAddress(ctx context.Context, field graphql.CollectedField, obj *Auction) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Auction_winnerAddress(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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) fieldContext_Auction_winnerAddress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Auction", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Auction_winnerBid(ctx context.Context, field graphql.CollectedField, obj *Auction) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Auction_winnerBid(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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ᚋcercᚑioᚋlaconicdᚋgqlᚐCoin(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Auction_winnerBid(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Auction", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "type": + return ec.fieldContext_Coin_type(ctx, field) + case "quantity": + return ec.fieldContext_Coin_quantity(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Coin", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Auction_winnerPrice(ctx context.Context, field graphql.CollectedField, obj *Auction) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Auction_winnerPrice(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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ᚋcercᚑioᚋlaconicdᚋgqlᚐCoin(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Auction_winnerPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Auction", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "type": + return ec.fieldContext_Coin_type(ctx, field) + case "quantity": + return ec.fieldContext_Coin_quantity(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Coin", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Auction_bids(ctx context.Context, field graphql.CollectedField, obj *Auction) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Auction_bids(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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ᚋcercᚑioᚋlaconicdᚋgqlᚐAuctionBid(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Auction_bids(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Auction", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "bidderAddress": + return ec.fieldContext_AuctionBid_bidderAddress(ctx, field) + case "status": + return ec.fieldContext_AuctionBid_status(ctx, field) + case "commitHash": + return ec.fieldContext_AuctionBid_commitHash(ctx, field) + case "commitTime": + return ec.fieldContext_AuctionBid_commitTime(ctx, field) + case "commitFee": + return ec.fieldContext_AuctionBid_commitFee(ctx, field) + case "revealTime": + return ec.fieldContext_AuctionBid_revealTime(ctx, field) + case "revealFee": + return ec.fieldContext_AuctionBid_revealFee(ctx, field) + case "bidAmount": + return ec.fieldContext_AuctionBid_bidAmount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type AuctionBid", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _AuctionBid_bidderAddress(ctx context.Context, field graphql.CollectedField, obj *AuctionBid) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AuctionBid_bidderAddress(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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) fieldContext_AuctionBid_bidderAddress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "AuctionBid", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _AuctionBid_status(ctx context.Context, field graphql.CollectedField, obj *AuctionBid) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AuctionBid_status(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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) fieldContext_AuctionBid_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "AuctionBid", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _AuctionBid_commitHash(ctx context.Context, field graphql.CollectedField, obj *AuctionBid) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AuctionBid_commitHash(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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) fieldContext_AuctionBid_commitHash(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "AuctionBid", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _AuctionBid_commitTime(ctx context.Context, field graphql.CollectedField, obj *AuctionBid) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AuctionBid_commitTime(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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) fieldContext_AuctionBid_commitTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "AuctionBid", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _AuctionBid_commitFee(ctx context.Context, field graphql.CollectedField, obj *AuctionBid) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AuctionBid_commitFee(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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ᚋcercᚑioᚋlaconicdᚋgqlᚐCoin(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_AuctionBid_commitFee(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "AuctionBid", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "type": + return ec.fieldContext_Coin_type(ctx, field) + case "quantity": + return ec.fieldContext_Coin_quantity(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Coin", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _AuctionBid_revealTime(ctx context.Context, field graphql.CollectedField, obj *AuctionBid) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AuctionBid_revealTime(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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) fieldContext_AuctionBid_revealTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "AuctionBid", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _AuctionBid_revealFee(ctx context.Context, field graphql.CollectedField, obj *AuctionBid) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AuctionBid_revealFee(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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ᚋcercᚑioᚋlaconicdᚋgqlᚐCoin(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_AuctionBid_revealFee(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "AuctionBid", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "type": + return ec.fieldContext_Coin_type(ctx, field) + case "quantity": + return ec.fieldContext_Coin_quantity(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Coin", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _AuctionBid_bidAmount(ctx context.Context, field graphql.CollectedField, obj *AuctionBid) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AuctionBid_bidAmount(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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ᚋcercᚑioᚋlaconicdᚋgqlᚐCoin(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_AuctionBid_bidAmount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "AuctionBid", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "type": + return ec.fieldContext_Coin_type(ctx, field) + case "quantity": + return ec.fieldContext_Coin_quantity(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Coin", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _AuthorityRecord_ownerAddress(ctx context.Context, field graphql.CollectedField, obj *AuthorityRecord) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AuthorityRecord_ownerAddress(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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) fieldContext_AuthorityRecord_ownerAddress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "AuthorityRecord", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _AuthorityRecord_ownerPublicKey(ctx context.Context, field graphql.CollectedField, obj *AuthorityRecord) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AuthorityRecord_ownerPublicKey(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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) fieldContext_AuthorityRecord_ownerPublicKey(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "AuthorityRecord", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _AuthorityRecord_height(ctx context.Context, field graphql.CollectedField, obj *AuthorityRecord) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AuthorityRecord_height(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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) fieldContext_AuthorityRecord_height(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "AuthorityRecord", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _AuthorityRecord_status(ctx context.Context, field graphql.CollectedField, obj *AuthorityRecord) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AuthorityRecord_status(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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) fieldContext_AuthorityRecord_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "AuthorityRecord", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _AuthorityRecord_bondId(ctx context.Context, field graphql.CollectedField, obj *AuthorityRecord) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AuthorityRecord_bondId(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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) fieldContext_AuthorityRecord_bondId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "AuthorityRecord", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _AuthorityRecord_expiryTime(ctx context.Context, field graphql.CollectedField, obj *AuthorityRecord) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AuthorityRecord_expiryTime(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ExpiryTime, nil @@ -3943,25 +2823,34 @@ func (ec *executionContext) _Record_expiryTime(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _Record_owners(ctx context.Context, field graphql.CollectedField, obj *Record) (ret graphql.Marshaler) { +func (ec *executionContext) fieldContext_AuthorityRecord_expiryTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "AuthorityRecord", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _AuthorityRecord_auction(ctx context.Context, field graphql.CollectedField, obj *AuthorityRecord) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AuthorityRecord_auction(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 + return obj.Auction, nil }) if err != nil { ec.Error(ctx, err) @@ -3970,91 +2859,64 @@ func (ec *executionContext) _Record_owners(ctx context.Context, field graphql.Co if resTmp == nil { return graphql.Null } - res := resTmp.([]string) + res := resTmp.(*Auction) fc.Result = res - return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) + return ec.marshalOAuction2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐAuction(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", +func (ec *executionContext) fieldContext_AuthorityRecord_auction(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "AuthorityRecord", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_Auction_id(ctx, field) + case "status": + return ec.fieldContext_Auction_status(ctx, field) + case "ownerAddress": + return ec.fieldContext_Auction_ownerAddress(ctx, field) + case "createTime": + return ec.fieldContext_Auction_createTime(ctx, field) + case "commitsEndTime": + return ec.fieldContext_Auction_commitsEndTime(ctx, field) + case "revealsEndTime": + return ec.fieldContext_Auction_revealsEndTime(ctx, field) + case "commitFee": + return ec.fieldContext_Auction_commitFee(ctx, field) + case "revealFee": + return ec.fieldContext_Auction_revealFee(ctx, field) + case "minimumBid": + return ec.fieldContext_Auction_minimumBid(ctx, field) + case "winnerAddress": + return ec.fieldContext_Auction_winnerAddress(ctx, field) + case "winnerBid": + return ec.fieldContext_Auction_winnerBid(ctx, field) + case "winnerPrice": + return ec.fieldContext_Auction_winnerPrice(ctx, field) + case "bids": + return ec.fieldContext_Auction_bids(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Auction", field.Name) + }, } + return fc, nil +} - 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 - }) +func (ec *executionContext) _Bond_id(ctx context.Context, field graphql.CollectedField, obj *Bond) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Bond_id(ctx, field) 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) { + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -4074,22 +2936,2252 @@ func (ec *executionContext) _Reference_id(ctx context.Context, field graphql.Col return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _Status_version(ctx context.Context, field graphql.CollectedField, obj *Status) (ret graphql.Marshaler) { +func (ec *executionContext) fieldContext_Bond_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Bond", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Bond_owner(ctx context.Context, field graphql.CollectedField, obj *Bond) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Bond_owner(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Status", + 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) fieldContext_Bond_owner(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Bond", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Bond_balance(ctx context.Context, field graphql.CollectedField, obj *Bond) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Bond_balance(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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ᚋcercᚑioᚋlaconicdᚋgqlᚐCoinᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Bond_balance(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Bond", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "type": + return ec.fieldContext_Coin_type(ctx, field) + case "quantity": + return ec.fieldContext_Coin_quantity(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Coin", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _BooleanValue_value(ctx context.Context, field graphql.CollectedField, obj *BooleanValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BooleanValue_value(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_BooleanValue_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "BooleanValue", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _BytesValue_value(ctx context.Context, field graphql.CollectedField, obj *BytesValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BytesValue_value(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_BytesValue_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "BytesValue", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Coin_type(ctx context.Context, field graphql.CollectedField, obj *Coin) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Coin_type(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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) fieldContext_Coin_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Coin", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Coin_quantity(ctx context.Context, field graphql.CollectedField, obj *Coin) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Coin_quantity(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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) fieldContext_Coin_quantity(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Coin", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _FloatValue_value(ctx context.Context, field graphql.CollectedField, obj *FloatValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FloatValue_value(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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.(float64) + fc.Result = res + return ec.marshalNFloat2float64(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_FloatValue_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "FloatValue", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Float does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IntValue_value(ctx context.Context, field graphql.CollectedField, obj *IntValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IntValue_value(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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.(int) + fc.Result = res + return ec.marshalNInt2int(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IntValue_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IntValue", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _LinkValue_value(ctx context.Context, field graphql.CollectedField, obj *LinkValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LinkValue_value(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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.(Link) + fc.Result = res + return ec.marshalNLink2githubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐLink(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_LinkValue_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "LinkValue", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Link does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _MapValue_value(ctx context.Context, field graphql.CollectedField, obj *MapValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MapValue_value(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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.([]*Attribute) + fc.Result = res + return ec.marshalNAttribute2ᚕᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐAttributeᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_MapValue_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "MapValue", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "key": + return ec.fieldContext_Attribute_key(ctx, field) + case "value": + return ec.fieldContext_Attribute_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Attribute", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _NameRecord_latest(ctx context.Context, field graphql.CollectedField, obj *NameRecord) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NameRecord_latest(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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ᚋcercᚑioᚋlaconicdᚋgqlᚐNameRecordEntry(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_NameRecord_latest(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "NameRecord", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_NameRecordEntry_id(ctx, field) + case "height": + return ec.fieldContext_NameRecordEntry_height(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type NameRecordEntry", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _NameRecord_history(ctx context.Context, field graphql.CollectedField, obj *NameRecord) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NameRecord_history(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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ᚋcercᚑioᚋlaconicdᚋgqlᚐNameRecordEntry(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_NameRecord_history(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "NameRecord", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_NameRecordEntry_id(ctx, field) + case "height": + return ec.fieldContext_NameRecordEntry_height(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type NameRecordEntry", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _NameRecordEntry_id(ctx context.Context, field graphql.CollectedField, obj *NameRecordEntry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NameRecordEntry_id(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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) fieldContext_NameRecordEntry_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "NameRecordEntry", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _NameRecordEntry_height(ctx context.Context, field graphql.CollectedField, obj *NameRecordEntry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NameRecordEntry_height(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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) fieldContext_NameRecordEntry_height(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "NameRecordEntry", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _NodeInfo_id(ctx context.Context, field graphql.CollectedField, obj *NodeInfo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodeInfo_id(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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) fieldContext_NodeInfo_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "NodeInfo", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _NodeInfo_network(ctx context.Context, field graphql.CollectedField, obj *NodeInfo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodeInfo_network(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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) fieldContext_NodeInfo_network(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "NodeInfo", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _NodeInfo_moniker(ctx context.Context, field graphql.CollectedField, obj *NodeInfo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodeInfo_moniker(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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) fieldContext_NodeInfo_moniker(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "NodeInfo", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _OwnerBonds_owner(ctx context.Context, field graphql.CollectedField, obj *OwnerBonds) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OwnerBonds_owner(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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) fieldContext_OwnerBonds_owner(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "OwnerBonds", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _OwnerBonds_bonds(ctx context.Context, field graphql.CollectedField, obj *OwnerBonds) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OwnerBonds_bonds(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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ᚋcercᚑioᚋlaconicdᚋgqlᚐBondᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_OwnerBonds_bonds(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "OwnerBonds", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_Bond_id(ctx, field) + case "owner": + return ec.fieldContext_Bond_owner(ctx, field) + case "balance": + return ec.fieldContext_Bond_balance(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Bond", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _PeerInfo_node(ctx context.Context, field graphql.CollectedField, obj *PeerInfo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PeerInfo_node(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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ᚋcercᚑioᚋlaconicdᚋgqlᚐNodeInfo(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_PeerInfo_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PeerInfo", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_NodeInfo_id(ctx, field) + case "network": + return ec.fieldContext_NodeInfo_network(ctx, field) + case "moniker": + return ec.fieldContext_NodeInfo_moniker(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type NodeInfo", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _PeerInfo_is_outbound(ctx context.Context, field graphql.CollectedField, obj *PeerInfo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PeerInfo_is_outbound(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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) fieldContext_PeerInfo_is_outbound(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PeerInfo", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _PeerInfo_remote_ip(ctx context.Context, field graphql.CollectedField, obj *PeerInfo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PeerInfo_remote_ip(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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) fieldContext_PeerInfo_remote_ip(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PeerInfo", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Query_getStatus(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_getStatus(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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ᚋcercᚑioᚋlaconicdᚋgqlᚐStatus(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_getStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "version": + return ec.fieldContext_Status_version(ctx, field) + case "node": + return ec.fieldContext_Status_node(ctx, field) + case "sync": + return ec.fieldContext_Status_sync(ctx, field) + case "validator": + return ec.fieldContext_Status_validator(ctx, field) + case "validators": + return ec.fieldContext_Status_validators(ctx, field) + case "num_peers": + return ec.fieldContext_Status_num_peers(ctx, field) + case "peers": + return ec.fieldContext_Status_peers(ctx, field) + case "disk_usage": + return ec.fieldContext_Status_disk_usage(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Status", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Query_getAccounts(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_getAccounts(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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, fc.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ᚋcercᚑioᚋlaconicdᚋgqlᚐAccount(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_getAccounts(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "address": + return ec.fieldContext_Account_address(ctx, field) + case "pubKey": + return ec.fieldContext_Account_pubKey(ctx, field) + case "number": + return ec.fieldContext_Account_number(ctx, field) + case "sequence": + return ec.fieldContext_Account_sequence(ctx, field) + case "balance": + return ec.fieldContext_Account_balance(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Account", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_getAccounts_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Query_getBondsByIds(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_getBondsByIds(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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, fc.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ᚋcercᚑioᚋlaconicdᚋgqlᚐBond(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_getBondsByIds(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_Bond_id(ctx, field) + case "owner": + return ec.fieldContext_Bond_owner(ctx, field) + case "balance": + return ec.fieldContext_Bond_balance(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Bond", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_getBondsByIds_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Query_queryBonds(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_queryBonds(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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, fc.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ᚋcercᚑioᚋlaconicdᚋgqlᚐBond(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_queryBonds(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_Bond_id(ctx, field) + case "owner": + return ec.fieldContext_Bond_owner(ctx, field) + case "balance": + return ec.fieldContext_Bond_balance(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Bond", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_queryBonds_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Query_queryBondsByOwner(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_queryBondsByOwner(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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, fc.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ᚋcercᚑioᚋlaconicdᚋgqlᚐOwnerBonds(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_queryBondsByOwner(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "owner": + return ec.fieldContext_OwnerBonds_owner(ctx, field) + case "bonds": + return ec.fieldContext_OwnerBonds_bonds(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type OwnerBonds", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_queryBondsByOwner_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Query_getRecordsByIds(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_getRecordsByIds(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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, fc.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ᚋcercᚑioᚋlaconicdᚋgqlᚐRecord(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_getRecordsByIds(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_Record_id(ctx, field) + case "names": + return ec.fieldContext_Record_names(ctx, field) + case "bondId": + return ec.fieldContext_Record_bondId(ctx, field) + case "createTime": + return ec.fieldContext_Record_createTime(ctx, field) + case "expiryTime": + return ec.fieldContext_Record_expiryTime(ctx, field) + case "owners": + return ec.fieldContext_Record_owners(ctx, field) + case "attributes": + return ec.fieldContext_Record_attributes(ctx, field) + case "references": + return ec.fieldContext_Record_references(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Record", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_getRecordsByIds_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Query_queryRecords(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_queryRecords(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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, fc.Args["attributes"].([]*KeyValueInput), fc.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ᚋcercᚑioᚋlaconicdᚋgqlᚐRecord(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_queryRecords(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_Record_id(ctx, field) + case "names": + return ec.fieldContext_Record_names(ctx, field) + case "bondId": + return ec.fieldContext_Record_bondId(ctx, field) + case "createTime": + return ec.fieldContext_Record_createTime(ctx, field) + case "expiryTime": + return ec.fieldContext_Record_expiryTime(ctx, field) + case "owners": + return ec.fieldContext_Record_owners(ctx, field) + case "attributes": + return ec.fieldContext_Record_attributes(ctx, field) + case "references": + return ec.fieldContext_Record_references(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Record", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_queryRecords_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Query_lookupAuthorities(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_lookupAuthorities(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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, fc.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ᚋcercᚑioᚋlaconicdᚋgqlᚐAuthorityRecord(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_lookupAuthorities(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "ownerAddress": + return ec.fieldContext_AuthorityRecord_ownerAddress(ctx, field) + case "ownerPublicKey": + return ec.fieldContext_AuthorityRecord_ownerPublicKey(ctx, field) + case "height": + return ec.fieldContext_AuthorityRecord_height(ctx, field) + case "status": + return ec.fieldContext_AuthorityRecord_status(ctx, field) + case "bondId": + return ec.fieldContext_AuthorityRecord_bondId(ctx, field) + case "expiryTime": + return ec.fieldContext_AuthorityRecord_expiryTime(ctx, field) + case "auction": + return ec.fieldContext_AuthorityRecord_auction(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type AuthorityRecord", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_lookupAuthorities_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Query_lookupNames(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_lookupNames(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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, fc.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ᚋcercᚑioᚋlaconicdᚋgqlᚐNameRecord(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_lookupNames(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "latest": + return ec.fieldContext_NameRecord_latest(ctx, field) + case "history": + return ec.fieldContext_NameRecord_history(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type NameRecord", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_lookupNames_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Query_resolveNames(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_resolveNames(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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, fc.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ᚋcercᚑioᚋlaconicdᚋgqlᚐRecord(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_resolveNames(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_Record_id(ctx, field) + case "names": + return ec.fieldContext_Record_names(ctx, field) + case "bondId": + return ec.fieldContext_Record_bondId(ctx, field) + case "createTime": + return ec.fieldContext_Record_createTime(ctx, field) + case "expiryTime": + return ec.fieldContext_Record_expiryTime(ctx, field) + case "owners": + return ec.fieldContext_Record_owners(ctx, field) + case "attributes": + return ec.fieldContext_Record_attributes(ctx, field) + case "references": + return ec.fieldContext_Record_references(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Record", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_resolveNames_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Query_getAuctionsByIds(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_getAuctionsByIds(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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, fc.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ᚋcercᚑioᚋlaconicdᚋgqlᚐAuction(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_getAuctionsByIds(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_Auction_id(ctx, field) + case "status": + return ec.fieldContext_Auction_status(ctx, field) + case "ownerAddress": + return ec.fieldContext_Auction_ownerAddress(ctx, field) + case "createTime": + return ec.fieldContext_Auction_createTime(ctx, field) + case "commitsEndTime": + return ec.fieldContext_Auction_commitsEndTime(ctx, field) + case "revealsEndTime": + return ec.fieldContext_Auction_revealsEndTime(ctx, field) + case "commitFee": + return ec.fieldContext_Auction_commitFee(ctx, field) + case "revealFee": + return ec.fieldContext_Auction_revealFee(ctx, field) + case "minimumBid": + return ec.fieldContext_Auction_minimumBid(ctx, field) + case "winnerAddress": + return ec.fieldContext_Auction_winnerAddress(ctx, field) + case "winnerBid": + return ec.fieldContext_Auction_winnerBid(ctx, field) + case "winnerPrice": + return ec.fieldContext_Auction_winnerPrice(ctx, field) + case "bids": + return ec.fieldContext_Auction_bids(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Auction", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_getAuctionsByIds_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query___type(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.introspectType(fc.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) fieldContext_Query___type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query___type_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query___schema(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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) fieldContext_Query___schema(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "description": + return ec.fieldContext___Schema_description(ctx, field) + case "types": + return ec.fieldContext___Schema_types(ctx, field) + case "queryType": + return ec.fieldContext___Schema_queryType(ctx, field) + case "mutationType": + return ec.fieldContext___Schema_mutationType(ctx, field) + case "subscriptionType": + return ec.fieldContext___Schema_subscriptionType(ctx, field) + case "directives": + return ec.fieldContext___Schema_directives(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Schema", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Record_id(ctx context.Context, field graphql.CollectedField, obj *Record) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Record_id(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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) fieldContext_Record_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Record", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Record_names(ctx context.Context, field graphql.CollectedField, obj *Record) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Record_names(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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) fieldContext_Record_names(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Record", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Record_bondId(ctx context.Context, field graphql.CollectedField, obj *Record) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Record_bondId(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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) fieldContext_Record_bondId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Record", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Record_createTime(ctx context.Context, field graphql.CollectedField, obj *Record) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Record_createTime(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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) fieldContext_Record_createTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Record", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Record_expiryTime(ctx context.Context, field graphql.CollectedField, obj *Record) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Record_expiryTime(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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) fieldContext_Record_expiryTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Record", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Record_owners(ctx context.Context, field graphql.CollectedField, obj *Record) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Record_owners(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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) fieldContext_Record_owners(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Record", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Record_attributes(ctx context.Context, field graphql.CollectedField, obj *Record) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Record_attributes(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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.([]*Attribute) + fc.Result = res + return ec.marshalOAttribute2ᚕᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐAttributeᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Record_attributes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Record", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "key": + return ec.fieldContext_Attribute_key(ctx, field) + case "value": + return ec.fieldContext_Attribute_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Attribute", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Record_references(ctx context.Context, field graphql.CollectedField, obj *Record) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Record_references(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + 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ᚋcercᚑioᚋlaconicdᚋgqlᚐRecord(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Record_references(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Record", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_Record_id(ctx, field) + case "names": + return ec.fieldContext_Record_names(ctx, field) + case "bondId": + return ec.fieldContext_Record_bondId(ctx, field) + case "createTime": + return ec.fieldContext_Record_createTime(ctx, field) + case "expiryTime": + return ec.fieldContext_Record_expiryTime(ctx, field) + case "owners": + return ec.fieldContext_Record_owners(ctx, field) + case "attributes": + return ec.fieldContext_Record_attributes(ctx, field) + case "references": + return ec.fieldContext_Record_references(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Record", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Status_version(ctx context.Context, field graphql.CollectedField, obj *Status) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Status_version(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Version, nil @@ -4109,22 +5201,31 @@ func (ec *executionContext) _Status_version(ctx context.Context, field graphql.C return ec.marshalNString2string(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Status_version(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Status", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Status_node(ctx context.Context, field graphql.CollectedField, obj *Status) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Status_node(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -4141,25 +5242,42 @@ func (ec *executionContext) _Status_node(ctx context.Context, field graphql.Coll } res := resTmp.(*NodeInfo) fc.Result = res - return ec.marshalNNodeInfo2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐNodeInfo(ctx, field.Selections, res) + return ec.marshalNNodeInfo2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐNodeInfo(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Status_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Status", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_NodeInfo_id(ctx, field) + case "network": + return ec.fieldContext_NodeInfo_network(ctx, field) + case "moniker": + return ec.fieldContext_NodeInfo_moniker(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type NodeInfo", field.Name) + }, + } + return fc, nil } func (ec *executionContext) _Status_sync(ctx context.Context, field graphql.CollectedField, obj *Status) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Status_sync(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -4176,25 +5294,44 @@ func (ec *executionContext) _Status_sync(ctx context.Context, field graphql.Coll } res := resTmp.(*SyncInfo) fc.Result = res - return ec.marshalNSyncInfo2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐSyncInfo(ctx, field.Selections, res) + return ec.marshalNSyncInfo2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐSyncInfo(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Status_sync(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Status", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "latest_block_hash": + return ec.fieldContext_SyncInfo_latest_block_hash(ctx, field) + case "latest_block_height": + return ec.fieldContext_SyncInfo_latest_block_height(ctx, field) + case "latest_block_time": + return ec.fieldContext_SyncInfo_latest_block_time(ctx, field) + case "catching_up": + return ec.fieldContext_SyncInfo_catching_up(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type SyncInfo", field.Name) + }, + } + return fc, nil } func (ec *executionContext) _Status_validator(ctx context.Context, field graphql.CollectedField, obj *Status) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Status_validator(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -4208,25 +5345,42 @@ func (ec *executionContext) _Status_validator(ctx context.Context, field graphql } res := resTmp.(*ValidatorInfo) fc.Result = res - return ec.marshalOValidatorInfo2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐValidatorInfo(ctx, field.Selections, res) + return ec.marshalOValidatorInfo2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐValidatorInfo(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Status_validator(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Status", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "address": + return ec.fieldContext_ValidatorInfo_address(ctx, field) + case "voting_power": + return ec.fieldContext_ValidatorInfo_voting_power(ctx, field) + case "proposer_priority": + return ec.fieldContext_ValidatorInfo_proposer_priority(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ValidatorInfo", field.Name) + }, + } + return fc, nil } func (ec *executionContext) _Status_validators(ctx context.Context, field graphql.CollectedField, obj *Status) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Status_validators(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -4243,25 +5397,42 @@ func (ec *executionContext) _Status_validators(ctx context.Context, field graphq } res := resTmp.([]*ValidatorInfo) fc.Result = res - return ec.marshalNValidatorInfo2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐValidatorInfo(ctx, field.Selections, res) + return ec.marshalNValidatorInfo2ᚕᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐValidatorInfo(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Status_validators(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Status", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "address": + return ec.fieldContext_ValidatorInfo_address(ctx, field) + case "voting_power": + return ec.fieldContext_ValidatorInfo_voting_power(ctx, field) + case "proposer_priority": + return ec.fieldContext_ValidatorInfo_proposer_priority(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ValidatorInfo", field.Name) + }, + } + return fc, nil } func (ec *executionContext) _Status_num_peers(ctx context.Context, field graphql.CollectedField, obj *Status) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Status_num_peers(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -4281,22 +5452,31 @@ func (ec *executionContext) _Status_num_peers(ctx context.Context, field graphql return ec.marshalNString2string(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Status_num_peers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Status", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Status_peers(ctx context.Context, field graphql.CollectedField, obj *Status) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Status_peers(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -4310,25 +5490,42 @@ func (ec *executionContext) _Status_peers(ctx context.Context, field graphql.Col } res := resTmp.([]*PeerInfo) fc.Result = res - return ec.marshalOPeerInfo2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐPeerInfo(ctx, field.Selections, res) + return ec.marshalOPeerInfo2ᚕᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐPeerInfo(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Status_peers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Status", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "node": + return ec.fieldContext_PeerInfo_node(ctx, field) + case "is_outbound": + return ec.fieldContext_PeerInfo_is_outbound(ctx, field) + case "remote_ip": + return ec.fieldContext_PeerInfo_remote_ip(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PeerInfo", field.Name) + }, + } + return fc, nil } func (ec *executionContext) _Status_disk_usage(ctx context.Context, field graphql.CollectedField, obj *Status) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Status_disk_usage(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -4348,22 +5545,75 @@ func (ec *executionContext) _Status_disk_usage(ctx context.Context, field graphq 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) { +func (ec *executionContext) fieldContext_Status_disk_usage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Status", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _StringValue_value(ctx context.Context, field graphql.CollectedField, obj *StringValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StringValue_value(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "SyncInfo", + 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.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StringValue_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StringValue", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _SyncInfo_latest_block_hash(ctx context.Context, field graphql.CollectedField, obj *SyncInfo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SyncInfo_latest_block_hash(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.LatestBlockHash, nil @@ -4383,22 +5633,31 @@ func (ec *executionContext) _SyncInfo_latest_block_hash(ctx context.Context, fie return ec.marshalNString2string(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_SyncInfo_latest_block_hash(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SyncInfo", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _SyncInfo_latest_block_height(ctx context.Context, field graphql.CollectedField, obj *SyncInfo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SyncInfo_latest_block_height(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -4418,22 +5677,31 @@ func (ec *executionContext) _SyncInfo_latest_block_height(ctx context.Context, f return ec.marshalNString2string(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_SyncInfo_latest_block_height(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SyncInfo", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _SyncInfo_latest_block_time(ctx context.Context, field graphql.CollectedField, obj *SyncInfo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SyncInfo_latest_block_time(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -4453,22 +5721,31 @@ func (ec *executionContext) _SyncInfo_latest_block_time(ctx context.Context, fie return ec.marshalNString2string(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_SyncInfo_latest_block_time(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SyncInfo", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _SyncInfo_catching_up(ctx context.Context, field graphql.CollectedField, obj *SyncInfo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SyncInfo_catching_up(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -4488,22 +5765,31 @@ func (ec *executionContext) _SyncInfo_catching_up(ctx context.Context, field gra return ec.marshalNBoolean2bool(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_SyncInfo_catching_up(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SyncInfo", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _ValidatorInfo_address(ctx context.Context, field graphql.CollectedField, obj *ValidatorInfo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ValidatorInfo_address(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -4523,22 +5809,31 @@ func (ec *executionContext) _ValidatorInfo_address(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_ValidatorInfo_address(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "ValidatorInfo", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _ValidatorInfo_voting_power(ctx context.Context, field graphql.CollectedField, obj *ValidatorInfo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ValidatorInfo_voting_power(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -4558,22 +5853,31 @@ func (ec *executionContext) _ValidatorInfo_voting_power(ctx context.Context, fie return ec.marshalNString2string(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_ValidatorInfo_voting_power(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "ValidatorInfo", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _ValidatorInfo_proposer_priority(ctx context.Context, field graphql.CollectedField, obj *ValidatorInfo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ValidatorInfo_proposer_priority(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -4590,278 +5894,31 @@ func (ec *executionContext) _ValidatorInfo_proposer_priority(ctx context.Context 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", +func (ec *executionContext) fieldContext_ValidatorInfo_proposer_priority(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "ValidatorInfo", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } - - 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) + return fc, nil } func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -4881,25 +5938,34 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql return ec.marshalNString2string(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___Directive_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Directive", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_description(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 + return obj.Description(), nil }) if err != nil { ec.Error(ctx, err) @@ -4908,27 +5974,36 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field if resTmp == nil { return graphql.Null } - res := resTmp.(string) + res := resTmp.(*string) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Directive_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Directive", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil } func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_locations(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -4948,22 +6023,31 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___Directive_locations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Directive", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type __DirectiveLocation does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_args(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -4983,22 +6067,41 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___Directive_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Directive", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___InputValue_name(ctx, field) + case "description": + return ec.fieldContext___InputValue_description(ctx, field) + case "type": + return ec.fieldContext___InputValue_type(ctx, field) + case "defaultValue": + return ec.fieldContext___InputValue_defaultValue(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_isRepeatable(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -5018,22 +6121,31 @@ func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field return ec.marshalNBoolean2bool(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Directive", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___EnumValue_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -5053,25 +6165,34 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql return ec.marshalNString2string(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___EnumValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__EnumValue", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___EnumValue_description(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 + return obj.Description(), nil }) if err != nil { ec.Error(ctx, err) @@ -5080,27 +6201,36 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field if resTmp == nil { return graphql.Null } - res := resTmp.(string) + res := resTmp.(*string) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___EnumValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__EnumValue", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil } func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___EnumValue_isDeprecated(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -5120,22 +6250,31 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field return ec.marshalNBoolean2bool(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__EnumValue", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___EnumValue_deprecationReason(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -5152,22 +6291,31 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__EnumValue", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -5187,25 +6335,34 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col return ec.marshalNString2string(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___Field_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Field", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_description(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 + return obj.Description(), nil }) if err != nil { ec.Error(ctx, err) @@ -5214,27 +6371,36 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap if resTmp == nil { return graphql.Null } - res := resTmp.(string) + res := resTmp.(*string) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Field_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Field", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil } func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_args(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -5254,22 +6420,41 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___Field_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Field", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___InputValue_name(ctx, field) + case "description": + return ec.fieldContext___InputValue_description(ctx, field) + case "type": + return ec.fieldContext___InputValue_type(ctx, field) + case "defaultValue": + return ec.fieldContext___InputValue_defaultValue(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_type(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -5289,22 +6474,53 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___Field_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Field", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_isDeprecated(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -5324,22 +6540,31 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra return ec.marshalNBoolean2bool(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___Field_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Field", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_deprecationReason(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -5356,22 +6581,31 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___Field_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Field", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___InputValue_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -5391,25 +6625,34 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___InputValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__InputValue", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___InputValue_description(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 + return obj.Description(), nil }) if err != nil { ec.Error(ctx, err) @@ -5418,27 +6661,36 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field if resTmp == nil { return graphql.Null } - res := resTmp.(string) + res := resTmp.(*string) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___InputValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__InputValue", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil } func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___InputValue_type(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -5458,22 +6710,53 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___InputValue_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__InputValue", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___InputValue_defaultValue(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -5490,22 +6773,72 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel 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) { +func (ec *executionContext) fieldContext___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__InputValue", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Schema_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_description(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ + 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.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Schema_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Schema", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_types(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Types(), nil @@ -5525,22 +6858,53 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___Schema_types(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Schema", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_queryType(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -5560,22 +6924,53 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___Schema_queryType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Schema", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_mutationType(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -5592,22 +6987,53 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___Schema_mutationType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Schema", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_subscriptionType(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -5624,22 +7050,53 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Schema", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_directives(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -5659,22 +7116,43 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___Schema_directives(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Schema", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___Directive_name(ctx, field) + case "description": + return ec.fieldContext___Directive_description(ctx, field) + case "locations": + return ec.fieldContext___Directive_locations(ctx, field) + case "args": + return ec.fieldContext___Directive_args(ctx, field) + case "isRepeatable": + return ec.fieldContext___Directive_isRepeatable(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Directive", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_kind(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -5694,22 +7172,31 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll return ec.marshalN__TypeKind2string(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___Type_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type __TypeKind does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -5726,22 +7213,31 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___Type_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_description(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -5753,37 +7249,39 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph if resTmp == nil { return graphql.Null } - res := resTmp.(string) + res := resTmp.(*string) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil } func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_fields(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 + return obj.Fields(fc.Args["includeDeprecated"].(bool)), nil }) if err != nil { ec.Error(ctx, err) @@ -5797,22 +7295,56 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___Type_fields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___Field_name(ctx, field) + case "description": + return ec.fieldContext___Field_description(ctx, field) + case "args": + return ec.fieldContext___Field_args(ctx, field) + case "type": + return ec.fieldContext___Field_type(ctx, field) + case "isDeprecated": + return ec.fieldContext___Field_isDeprecated(ctx, field) + case "deprecationReason": + return ec.fieldContext___Field_deprecationReason(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Field", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field___Type_fields_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_interfaces(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -5829,22 +7361,53 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___Type_interfaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_possibleTypes(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -5861,32 +7424,56 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___Type_possibleTypes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_enumValues(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 + return obj.EnumValues(fc.Args["includeDeprecated"].(bool)), nil }) if err != nil { ec.Error(ctx, err) @@ -5900,22 +7487,52 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___Type_enumValues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___EnumValue_name(ctx, field) + case "description": + return ec.fieldContext___EnumValue_description(ctx, field) + case "isDeprecated": + return ec.fieldContext___EnumValue_isDeprecated(ctx, field) + case "deprecationReason": + return ec.fieldContext___EnumValue_deprecationReason(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __EnumValue", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field___Type_enumValues_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_inputFields(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -5932,22 +7549,41 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___Type_inputFields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___InputValue_name(ctx, field) + case "description": + return ec.fieldContext___InputValue_description(ctx, field) + case "type": + return ec.fieldContext___InputValue_type(ctx, field) + case "defaultValue": + return ec.fieldContext___InputValue_defaultValue(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_ofType(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) 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 @@ -5964,6 +7600,82 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___Type_ofType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_specifiedByURL(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.SpecifiedByURL(), 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) fieldContext___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + // endregion **************************** field.gotpl ***************************** // region **************************** input.gotpl ***************************** @@ -5975,7 +7687,12 @@ func (ec *executionContext) unmarshalInputKeyValueInput(ctx context.Context, obj asMap[k] = v } - for k, v := range asMap { + fieldsInOrder := [...]string{"key", "value"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "key": var err error @@ -5989,30 +7706,7 @@ func (ec *executionContext) unmarshalInputKeyValueInput(ctx context.Context, obj 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) + it.Value, err = ec.unmarshalOValueInput2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐValueInput(ctx, v) if err != nil { return it, err } @@ -6029,16 +7723,13 @@ func (ec *executionContext) unmarshalInputValueInput(ctx context.Context, obj in asMap[k] = v } - for k, v := range asMap { + fieldsInOrder := [...]string{"int", "float", "string", "boolean", "link", "array", "map"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } 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 @@ -6071,19 +7762,27 @@ func (ec *executionContext) unmarshalInputValueInput(ctx context.Context, obj in if err != nil { return it, err } - case "reference": + case "link": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("reference")) - it.Reference, err = ec.unmarshalOReferenceInput2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐReferenceInput(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("link")) + it.Link, err = ec.unmarshalOLink2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐLink(ctx, v) if err != nil { return it, err } - case "values": + case "array": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("values")) - it.Values, err = ec.unmarshalOValueInput2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐValueInput(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("array")) + it.Array, err = ec.unmarshalOValueInput2ᚕᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐValueInput(ctx, v) + if err != nil { + return it, err + } + case "map": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("map")) + it.Map, err = ec.unmarshalOKeyValueInput2ᚕᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐKeyValueInputᚄ(ctx, v) if err != nil { return it, err } @@ -6097,6 +7796,71 @@ func (ec *executionContext) unmarshalInputValueInput(ctx context.Context, obj in // region ************************** interface.gotpl *************************** +func (ec *executionContext) _Value(ctx context.Context, sel ast.SelectionSet, obj Value) graphql.Marshaler { + switch obj := (obj).(type) { + case nil: + return graphql.Null + case BooleanValue: + return ec._BooleanValue(ctx, sel, &obj) + case *BooleanValue: + if obj == nil { + return graphql.Null + } + return ec._BooleanValue(ctx, sel, obj) + case IntValue: + return ec._IntValue(ctx, sel, &obj) + case *IntValue: + if obj == nil { + return graphql.Null + } + return ec._IntValue(ctx, sel, obj) + case FloatValue: + return ec._FloatValue(ctx, sel, &obj) + case *FloatValue: + if obj == nil { + return graphql.Null + } + return ec._FloatValue(ctx, sel, obj) + case StringValue: + return ec._StringValue(ctx, sel, &obj) + case *StringValue: + if obj == nil { + return graphql.Null + } + return ec._StringValue(ctx, sel, obj) + case BytesValue: + return ec._BytesValue(ctx, sel, &obj) + case *BytesValue: + if obj == nil { + return graphql.Null + } + return ec._BytesValue(ctx, sel, obj) + case LinkValue: + return ec._LinkValue(ctx, sel, &obj) + case *LinkValue: + if obj == nil { + return graphql.Null + } + return ec._LinkValue(ctx, sel, obj) + case ArrayValue: + return ec._ArrayValue(ctx, sel, &obj) + case *ArrayValue: + if obj == nil { + return graphql.Null + } + return ec._ArrayValue(ctx, sel, obj) + case MapValue: + return ec._MapValue(ctx, sel, &obj) + case *MapValue: + if obj == nil { + return graphql.Null + } + return ec._MapValue(ctx, sel, obj) + default: + panic(fmt.Errorf("unexpected type %T", obj)) + } +} + // endregion ************************** interface.gotpl *************************** // region **************************** object.gotpl **************************** @@ -6105,7 +7869,6 @@ 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 { @@ -6113,24 +7876,94 @@ func (ec *executionContext) _Account(ctx context.Context, sel ast.SelectionSet, 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 arrayValueImplementors = []string{"ArrayValue", "Value"} + +func (ec *executionContext) _ArrayValue(ctx context.Context, sel ast.SelectionSet, obj *ArrayValue) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, arrayValueImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("ArrayValue") + case "value": + + out.Values[i] = ec._ArrayValue_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 attributeImplementors = []string{"Attribute"} + +func (ec *executionContext) _Attribute(ctx context.Context, sel ast.SelectionSet, obj *Attribute) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, attributeImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Attribute") + case "key": + + out.Values[i] = ec._Attribute_key(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "value": + + out.Values[i] = ec._Attribute_value(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -6146,7 +7979,6 @@ 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 { @@ -6154,67 +7986,93 @@ func (ec *executionContext) _Auction(ctx context.Context, sel ast.SelectionSet, 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)) } @@ -6230,7 +8088,6 @@ 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 { @@ -6238,42 +8095,58 @@ func (ec *executionContext) _AuctionBid(ctx context.Context, sel ast.SelectionSe 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++ } @@ -6292,7 +8165,6 @@ 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 { @@ -6300,37 +8172,51 @@ func (ec *executionContext) _AuthorityRecord(ctx context.Context, sel ast.Select 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)) } @@ -6346,7 +8232,6 @@ 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 { @@ -6354,17 +8239,79 @@ func (ec *executionContext) _Bond(ctx context.Context, sel ast.SelectionSet, obj 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 booleanValueImplementors = []string{"BooleanValue", "Value"} + +func (ec *executionContext) _BooleanValue(ctx context.Context, sel ast.SelectionSet, obj *BooleanValue) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, booleanValueImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("BooleanValue") + case "value": + + out.Values[i] = ec._BooleanValue_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 bytesValueImplementors = []string{"BytesValue", "Value"} + +func (ec *executionContext) _BytesValue(ctx context.Context, sel ast.SelectionSet, obj *BytesValue) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, bytesValueImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("BytesValue") + case "value": + + out.Values[i] = ec._BytesValue_value(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -6380,7 +8327,6 @@ 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 { @@ -6388,12 +8334,16 @@ func (ec *executionContext) _Coin(ctx context.Context, sel ast.SelectionSet, obj 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++ } @@ -6408,24 +8358,104 @@ func (ec *executionContext) _Coin(ctx context.Context, sel ast.SelectionSet, obj 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) +var floatValueImplementors = []string{"FloatValue", "Value"} +func (ec *executionContext) _FloatValue(ctx context.Context, sel ast.SelectionSet, obj *FloatValue) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, floatValueImplementors) 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) + out.Values[i] = graphql.MarshalString("FloatValue") + case "value": + + out.Values[i] = ec._FloatValue_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 intValueImplementors = []string{"IntValue", "Value"} + +func (ec *executionContext) _IntValue(ctx context.Context, sel ast.SelectionSet, obj *IntValue) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, intValueImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("IntValue") case "value": - out.Values[i] = ec._KeyValue_value(ctx, field, obj) + + out.Values[i] = ec._IntValue_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 linkValueImplementors = []string{"LinkValue", "Value"} + +func (ec *executionContext) _LinkValue(ctx context.Context, sel ast.SelectionSet, obj *LinkValue) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, linkValueImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("LinkValue") + case "value": + + out.Values[i] = ec._LinkValue_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 mapValueImplementors = []string{"MapValue", "Value"} + +func (ec *executionContext) _MapValue(ctx context.Context, sel ast.SelectionSet, obj *MapValue) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, mapValueImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("MapValue") + case "value": + + out.Values[i] = ec._MapValue_value(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } @@ -6444,7 +8474,6 @@ 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 { @@ -6452,12 +8481,16 @@ func (ec *executionContext) _NameRecord(ctx context.Context, sel ast.SelectionSe 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)) } @@ -6473,7 +8506,6 @@ 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 { @@ -6481,12 +8513,16 @@ func (ec *executionContext) _NameRecordEntry(ctx context.Context, sel ast.Select 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++ } @@ -6505,7 +8541,6 @@ 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 { @@ -6513,17 +8548,23 @@ func (ec *executionContext) _NodeInfo(ctx context.Context, sel ast.SelectionSet, 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++ } @@ -6542,7 +8583,6 @@ 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 { @@ -6550,12 +8590,16 @@ func (ec *executionContext) _OwnerBonds(ctx context.Context, sel ast.SelectionSe 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)) } @@ -6571,7 +8615,6 @@ 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 { @@ -6579,17 +8622,23 @@ func (ec *executionContext) _PeerInfo(ctx context.Context, sel ast.SelectionSet, 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++ } @@ -6608,7 +8657,6 @@ 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", }) @@ -6616,12 +8664,18 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { + innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{ + Object: field.Name, + Field: field, + }) + switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("Query") case "getStatus": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -6632,10 +8686,19 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr atomic.AddUint32(&invalids, 1) } return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) + } + + out.Concurrently(i, func() graphql.Marshaler { + return rrm(innerCtx) }) case "getAccounts": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -6643,10 +8706,19 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr }() res = ec._Query_getAccounts(ctx, field) return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) + } + + out.Concurrently(i, func() graphql.Marshaler { + return rrm(innerCtx) }) case "getBondsByIds": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -6654,10 +8726,19 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr }() res = ec._Query_getBondsByIds(ctx, field) return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) + } + + out.Concurrently(i, func() graphql.Marshaler { + return rrm(innerCtx) }) case "queryBonds": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -6665,10 +8746,19 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr }() res = ec._Query_queryBonds(ctx, field) return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) + } + + out.Concurrently(i, func() graphql.Marshaler { + return rrm(innerCtx) }) case "queryBondsByOwner": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -6676,10 +8766,19 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr }() res = ec._Query_queryBondsByOwner(ctx, field) return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) + } + + out.Concurrently(i, func() graphql.Marshaler { + return rrm(innerCtx) }) case "getRecordsByIds": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -6687,10 +8786,19 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr }() res = ec._Query_getRecordsByIds(ctx, field) return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) + } + + out.Concurrently(i, func() graphql.Marshaler { + return rrm(innerCtx) }) case "queryRecords": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -6698,10 +8806,19 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr }() res = ec._Query_queryRecords(ctx, field) return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) + } + + out.Concurrently(i, func() graphql.Marshaler { + return rrm(innerCtx) }) case "lookupAuthorities": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -6712,10 +8829,19 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr atomic.AddUint32(&invalids, 1) } return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) + } + + out.Concurrently(i, func() graphql.Marshaler { + return rrm(innerCtx) }) case "lookupNames": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -6726,10 +8852,19 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr atomic.AddUint32(&invalids, 1) } return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) + } + + out.Concurrently(i, func() graphql.Marshaler { + return rrm(innerCtx) }) case "resolveNames": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -6740,10 +8875,19 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr atomic.AddUint32(&invalids, 1) } return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) + } + + out.Concurrently(i, func() graphql.Marshaler { + return rrm(innerCtx) }) case "getAuctionsByIds": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -6751,11 +8895,27 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr }() res = ec._Query_getAuctionsByIds(ctx, field) return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) + } + + out.Concurrently(i, func() graphql.Marshaler { + return rrm(innerCtx) }) case "__type": - out.Values[i] = ec._Query___type(ctx, field) + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Query___type(ctx, field) + }) + case "__schema": - out.Values[i] = ec._Query___schema(ctx, field) + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Query___schema(ctx, field) + }) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -6771,7 +8931,6 @@ 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 { @@ -6779,60 +8938,49 @@ func (ec *executionContext) _Record(ctx context.Context, sel ast.SelectionSet, o 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)) } @@ -6848,7 +8996,6 @@ 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 { @@ -6856,36 +9003,80 @@ func (ec *executionContext) _Status(ctx context.Context, sel ast.SelectionSet, o 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 stringValueImplementors = []string{"StringValue", "Value"} + +func (ec *executionContext) _StringValue(ctx context.Context, sel ast.SelectionSet, obj *StringValue) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, stringValueImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("StringValue") + case "value": + + out.Values[i] = ec._StringValue_value(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } @@ -6904,7 +9095,6 @@ 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 { @@ -6912,22 +9102,30 @@ func (ec *executionContext) _SyncInfo(ctx context.Context, sel ast.SelectionSet, 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++ } @@ -6946,7 +9144,6 @@ 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 { @@ -6954,55 +9151,23 @@ func (ec *executionContext) _ValidatorInfo(ctx context.Context, sel ast.Selectio 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)) } @@ -7018,7 +9183,6 @@ 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 { @@ -7026,24 +9190,34 @@ func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionS 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++ } @@ -7062,7 +9236,6 @@ 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 { @@ -7070,19 +9243,27 @@ func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionS 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)) } @@ -7098,7 +9279,6 @@ 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 { @@ -7106,29 +9286,41 @@ func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, 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)) } @@ -7144,7 +9336,6 @@ 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 { @@ -7152,19 +9343,27 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection 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)) } @@ -7180,29 +9379,42 @@ 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 "description": + + out.Values[i] = ec.___Schema_description(ctx, field, obj) + 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++ } @@ -7221,7 +9433,6 @@ 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 { @@ -7229,26 +9440,48 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o 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) + + case "specifiedByURL": + + out.Values[i] = ec.___Type_specifiedByURL(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -7264,7 +9497,7 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o // region ***************************** type.gotpl ***************************** -func (ec *executionContext) marshalNAuthorityRecord2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐAuthorityRecord(ctx context.Context, sel ast.SelectionSet, v []*AuthorityRecord) graphql.Marshaler { +func (ec *executionContext) marshalNAttribute2ᚕᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐAttributeᚄ(ctx context.Context, sel ast.SelectionSet, v []*Attribute) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -7288,7 +9521,61 @@ func (ec *executionContext) marshalNAuthorityRecord2ᚕᚖgithubᚗcomᚋtharsis if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalOAuthorityRecord2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐAuthorityRecord(ctx, sel, v[i]) + ret[i] = ec.marshalNAttribute2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐAttribute(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) marshalNAttribute2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐAttribute(ctx context.Context, sel ast.SelectionSet, v *Attribute) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._Attribute(ctx, sel, v) +} + +func (ec *executionContext) marshalNAuthorityRecord2ᚕᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋ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ᚋcercᚑioᚋlaconicdᚋgqlᚐAuthorityRecord(ctx, sel, v[i]) } if isLen1 { f(i) @@ -7302,10 +9589,10 @@ func (ec *executionContext) marshalNAuthorityRecord2ᚕᚖgithubᚗcomᚋtharsis return ret } -func (ec *executionContext) marshalNBond2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐBond(ctx context.Context, sel ast.SelectionSet, v *Bond) graphql.Marshaler { +func (ec *executionContext) marshalNBond2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋ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") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } @@ -7321,23 +9608,68 @@ func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.Se res := graphql.MarshalBoolean(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } } return res } -func (ec *executionContext) marshalNCoin2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐCoin(ctx context.Context, sel ast.SelectionSet, v *Coin) graphql.Marshaler { +func (ec *executionContext) marshalNCoin2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋ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") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } 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 { +func (ec *executionContext) unmarshalNFloat2float64(ctx context.Context, v interface{}) (float64, error) { + res, err := graphql.UnmarshalFloatContext(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNFloat2float64(ctx context.Context, sel ast.SelectionSet, v float64) graphql.Marshaler { + res := graphql.MarshalFloatContext(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + } + return graphql.WrapContextMarshaler(ctx, res) +} + +func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{}) (int, error) { + res, err := graphql.UnmarshalInt(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler { + res := graphql.MarshalInt(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + } + return res +} + +func (ec *executionContext) unmarshalNKeyValueInput2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐKeyValueInput(ctx context.Context, v interface{}) (*KeyValueInput, error) { + res, err := ec.unmarshalInputKeyValueInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalNLink2githubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐLink(ctx context.Context, v interface{}) (Link, error) { + var res Link + err := res.UnmarshalGQLContext(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNLink2githubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐLink(ctx context.Context, sel ast.SelectionSet, v Link) graphql.Marshaler { + return graphql.WrapContextMarshaler(ctx, v) +} + +func (ec *executionContext) marshalNNameRecord2ᚕᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋ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 @@ -7361,7 +9693,7 @@ func (ec *executionContext) marshalNNameRecord2ᚕᚖgithubᚗcomᚋtharsisᚋet if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalONameRecord2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐNameRecord(ctx, sel, v[i]) + ret[i] = ec.marshalONameRecord2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐNameRecord(ctx, sel, v[i]) } if isLen1 { f(i) @@ -7375,27 +9707,27 @@ func (ec *executionContext) marshalNNameRecord2ᚕᚖgithubᚗcomᚋtharsisᚋet return ret } -func (ec *executionContext) marshalNNameRecordEntry2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐNameRecordEntry(ctx context.Context, sel ast.SelectionSet, v *NameRecordEntry) graphql.Marshaler { +func (ec *executionContext) marshalNNameRecordEntry2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋ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") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } 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 { +func (ec *executionContext) marshalNNodeInfo2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋ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") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } 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 { +func (ec *executionContext) marshalNRecord2ᚕᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋ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 @@ -7419,7 +9751,7 @@ func (ec *executionContext) marshalNRecord2ᚕᚖgithubᚗcomᚋtharsisᚋetherm if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalORecord2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐRecord(ctx, sel, v[i]) + ret[i] = ec.marshalORecord2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐRecord(ctx, sel, v[i]) } if isLen1 { f(i) @@ -7433,14 +9765,14 @@ func (ec *executionContext) marshalNRecord2ᚕᚖgithubᚗcomᚋtharsisᚋetherm return ret } -func (ec *executionContext) marshalNStatus2githubᚗcomᚋtharsisᚋethermintᚋgqlᚐStatus(ctx context.Context, sel ast.SelectionSet, v Status) graphql.Marshaler { +func (ec *executionContext) marshalNStatus2githubᚗcomᚋcercᚑioᚋlaconicdᚋ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 { +func (ec *executionContext) marshalNStatus2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋ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") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } @@ -7456,23 +9788,23 @@ func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.S res := graphql.MarshalString(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } } return res } -func (ec *executionContext) marshalNSyncInfo2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐSyncInfo(ctx context.Context, sel ast.SelectionSet, v *SyncInfo) graphql.Marshaler { +func (ec *executionContext) marshalNSyncInfo2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋ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") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } 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 { +func (ec *executionContext) marshalNValidatorInfo2ᚕᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋ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 @@ -7496,7 +9828,7 @@ func (ec *executionContext) marshalNValidatorInfo2ᚕᚖgithubᚗcomᚋtharsis if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalOValidatorInfo2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐValidatorInfo(ctx, sel, v[i]) + ret[i] = ec.marshalOValidatorInfo2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐValidatorInfo(ctx, sel, v[i]) } if isLen1 { f(i) @@ -7510,19 +9842,42 @@ func (ec *executionContext) marshalNValidatorInfo2ᚕᚖgithubᚗcomᚋtharsis 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 +func (ec *executionContext) marshalNValue2ᚕgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐValue(ctx context.Context, sel ast.SelectionSet, v []Value) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) } - return ec._Value(ctx, sel, 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.marshalOValue2githubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐValue(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } -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) + } + wg.Wait() + + return ret } func (ec *executionContext) marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler { @@ -7582,7 +9937,7 @@ func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Conte res := graphql.MarshalString(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } } return res @@ -7591,11 +9946,7 @@ func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Conte 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} - } + vSlice = graphql.CoerceList(v) } var err error res := make([]string, len(vSlice)) @@ -7760,7 +10111,7 @@ func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen 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") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } @@ -7776,13 +10127,13 @@ func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel a res := graphql.MarshalString(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } } return res } -func (ec *executionContext) marshalOAccount2ᚕᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐAccount(ctx context.Context, sel ast.SelectionSet, v []*Account) graphql.Marshaler { +func (ec *executionContext) marshalOAccount2ᚕᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐAccount(ctx context.Context, sel ast.SelectionSet, v []*Account) graphql.Marshaler { if v == nil { return graphql.Null } @@ -7809,7 +10160,7 @@ func (ec *executionContext) marshalOAccount2ᚕᚖgithubᚗcomᚋtharsisᚋether if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalOAccount2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐAccount(ctx, sel, v[i]) + ret[i] = ec.marshalOAccount2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐAccount(ctx, sel, v[i]) } if isLen1 { f(i) @@ -7823,14 +10174,14 @@ func (ec *executionContext) marshalOAccount2ᚕᚖgithubᚗcomᚋtharsisᚋether return ret } -func (ec *executionContext) marshalOAccount2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐAccount(ctx context.Context, sel ast.SelectionSet, v *Account) graphql.Marshaler { +func (ec *executionContext) marshalOAccount2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋ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 { +func (ec *executionContext) marshalOAttribute2ᚕᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐAttributeᚄ(ctx context.Context, sel ast.SelectionSet, v []*Attribute) graphql.Marshaler { if v == nil { return graphql.Null } @@ -7857,151 +10208,7 @@ func (ec *executionContext) marshalOAuction2ᚕᚖgithubᚗcomᚋtharsisᚋether 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]) + ret[i] = ec.marshalNAttribute2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐAttribute(ctx, sel, v[i]) } if isLen1 { f(i) @@ -8021,38 +10228,7 @@ func (ec *executionContext) marshalOBond2ᚕᚖgithubᚗcomᚋtharsisᚋethermin 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 { +func (ec *executionContext) marshalOAuction2ᚕᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐAuction(ctx context.Context, sel ast.SelectionSet, v []*Auction) graphql.Marshaler { if v == nil { return graphql.Null } @@ -8079,7 +10255,231 @@ func (ec *executionContext) marshalOCoin2ᚕᚖgithubᚗcomᚋtharsisᚋethermin if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNCoin2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐCoin(ctx, sel, v[i]) + ret[i] = ec.marshalOAuction2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐAuction(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + return ret +} + +func (ec *executionContext) marshalOAuction2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋ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ᚋcercᚑioᚋlaconicdᚋ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ᚋcercᚑioᚋlaconicdᚋgqlᚐAuctionBid(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + return ret +} + +func (ec *executionContext) marshalOAuctionBid2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋ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ᚋcercᚑioᚋlaconicdᚋ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ᚋcercᚑioᚋlaconicdᚋ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ᚋcercᚑioᚋlaconicdᚋgqlᚐBond(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + return ret +} + +func (ec *executionContext) marshalOBond2ᚕᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋ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ᚋcercᚑioᚋlaconicdᚋ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ᚋcercᚑioᚋlaconicdᚋ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 { + res := graphql.MarshalBoolean(v) + return res +} + +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 + } + res := graphql.MarshalBoolean(*v) + return res +} + +func (ec *executionContext) marshalOCoin2ᚕᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋ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ᚋcercᚑioᚋlaconicdᚋgqlᚐCoin(ctx, sel, v[i]) } if isLen1 { f(i) @@ -8103,7 +10503,7 @@ func (ec *executionContext) unmarshalOFloat2ᚖfloat64(ctx context.Context, v in if v == nil { return nil, nil } - res, err := graphql.UnmarshalFloat(v) + res, err := graphql.UnmarshalFloatContext(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } @@ -8111,7 +10511,8 @@ func (ec *executionContext) marshalOFloat2ᚖfloat64(ctx context.Context, sel as if v == nil { return graphql.Null } - return graphql.MarshalFloat(*v) + res := graphql.MarshalFloatContext(*v) + return graphql.WrapContextMarshaler(ctx, res) } func (ec *executionContext) unmarshalOInt2ᚖint(ctx context.Context, v interface{}) (*int, error) { @@ -8126,74 +10527,23 @@ func (ec *executionContext) marshalOInt2ᚖint(ctx context.Context, sel ast.Sele if v == nil { return graphql.Null } - return graphql.MarshalInt(*v) + res := graphql.MarshalInt(*v) + return res } -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) { +func (ec *executionContext) unmarshalOKeyValueInput2ᚕᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋ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} - } + vSlice = graphql.CoerceList(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]) + res[i], err = ec.unmarshalNKeyValueInput2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐKeyValueInput(ctx, vSlice[i]) if err != nil { return nil, err } @@ -8201,22 +10551,30 @@ func (ec *executionContext) unmarshalOKeyValueInput2ᚕᚖgithubᚗcomᚋtharsis return res, nil } -func (ec *executionContext) unmarshalOKeyValueInput2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐKeyValueInput(ctx context.Context, v interface{}) (*KeyValueInput, error) { +func (ec *executionContext) unmarshalOLink2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐLink(ctx context.Context, v interface{}) (*Link, error) { if v == nil { return nil, nil } - res, err := ec.unmarshalInputKeyValueInput(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) + var res = new(Link) + err := res.UnmarshalGQLContext(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 { +func (ec *executionContext) marshalOLink2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐLink(ctx context.Context, sel ast.SelectionSet, v *Link) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return graphql.WrapContextMarshaler(ctx, v) +} + +func (ec *executionContext) marshalONameRecord2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋ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 { +func (ec *executionContext) marshalONameRecordEntry2ᚕᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐNameRecordEntry(ctx context.Context, sel ast.SelectionSet, v []*NameRecordEntry) graphql.Marshaler { if v == nil { return graphql.Null } @@ -8243,7 +10601,7 @@ func (ec *executionContext) marshalONameRecordEntry2ᚕᚖgithubᚗcomᚋtharsis if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalONameRecordEntry2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐNameRecordEntry(ctx, sel, v[i]) + ret[i] = ec.marshalONameRecordEntry2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐNameRecordEntry(ctx, sel, v[i]) } if isLen1 { f(i) @@ -8257,14 +10615,14 @@ func (ec *executionContext) marshalONameRecordEntry2ᚕᚖgithubᚗcomᚋtharsis return ret } -func (ec *executionContext) marshalONameRecordEntry2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐNameRecordEntry(ctx context.Context, sel ast.SelectionSet, v *NameRecordEntry) graphql.Marshaler { +func (ec *executionContext) marshalONameRecordEntry2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋ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 { +func (ec *executionContext) marshalOOwnerBonds2ᚕᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐOwnerBonds(ctx context.Context, sel ast.SelectionSet, v []*OwnerBonds) graphql.Marshaler { if v == nil { return graphql.Null } @@ -8291,7 +10649,7 @@ func (ec *executionContext) marshalOOwnerBonds2ᚕᚖgithubᚗcomᚋtharsisᚋet if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalOOwnerBonds2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐOwnerBonds(ctx, sel, v[i]) + ret[i] = ec.marshalOOwnerBonds2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐOwnerBonds(ctx, sel, v[i]) } if isLen1 { f(i) @@ -8305,14 +10663,14 @@ func (ec *executionContext) marshalOOwnerBonds2ᚕᚖgithubᚗcomᚋtharsisᚋet return ret } -func (ec *executionContext) marshalOOwnerBonds2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐOwnerBonds(ctx context.Context, sel ast.SelectionSet, v *OwnerBonds) graphql.Marshaler { +func (ec *executionContext) marshalOOwnerBonds2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋ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 { +func (ec *executionContext) marshalOPeerInfo2ᚕᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐPeerInfo(ctx context.Context, sel ast.SelectionSet, v []*PeerInfo) graphql.Marshaler { if v == nil { return graphql.Null } @@ -8339,7 +10697,7 @@ func (ec *executionContext) marshalOPeerInfo2ᚕᚖgithubᚗcomᚋtharsisᚋethe if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalOPeerInfo2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐPeerInfo(ctx, sel, v[i]) + ret[i] = ec.marshalOPeerInfo2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐPeerInfo(ctx, sel, v[i]) } if isLen1 { f(i) @@ -8353,14 +10711,14 @@ func (ec *executionContext) marshalOPeerInfo2ᚕᚖgithubᚗcomᚋtharsisᚋethe return ret } -func (ec *executionContext) marshalOPeerInfo2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐPeerInfo(ctx context.Context, sel ast.SelectionSet, v *PeerInfo) graphql.Marshaler { +func (ec *executionContext) marshalOPeerInfo2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋ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 { +func (ec *executionContext) marshalORecord2ᚕᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐRecord(ctx context.Context, sel ast.SelectionSet, v []*Record) graphql.Marshaler { if v == nil { return graphql.Null } @@ -8387,7 +10745,7 @@ func (ec *executionContext) marshalORecord2ᚕᚖgithubᚗcomᚋtharsisᚋetherm if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalORecord2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐRecord(ctx, sel, v[i]) + ret[i] = ec.marshalORecord2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐRecord(ctx, sel, v[i]) } if isLen1 { f(i) @@ -8401,48 +10759,20 @@ func (ec *executionContext) marshalORecord2ᚕᚖgithubᚗcomᚋtharsisᚋetherm return ret } -func (ec *executionContext) marshalORecord2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐRecord(ctx context.Context, sel ast.SelectionSet, v *Record) graphql.Marshaler { +func (ec *executionContext) marshalORecord2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋ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} - } + vSlice = graphql.CoerceList(v) } var err error res := make([]string, len(vSlice)) @@ -8486,81 +10816,37 @@ func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel as if v == nil { return graphql.Null } - return graphql.MarshalString(*v) + res := graphql.MarshalString(*v) + return res } -func (ec *executionContext) marshalOValidatorInfo2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐValidatorInfo(ctx context.Context, sel ast.SelectionSet, v *ValidatorInfo) graphql.Marshaler { +func (ec *executionContext) marshalOValidatorInfo2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋ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 { +func (ec *executionContext) marshalOValue2githubᚗcomᚋcercᚑioᚋlaconicdᚋ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) { +func (ec *executionContext) unmarshalOValueInput2ᚕᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋ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} - } + vSlice = graphql.CoerceList(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]) + res[i], err = ec.unmarshalOValueInput2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐValueInput(ctx, vSlice[i]) if err != nil { return nil, err } @@ -8568,7 +10854,7 @@ func (ec *executionContext) unmarshalOValueInput2ᚕᚖgithubᚗcomᚋtharsisᚋ return res, nil } -func (ec *executionContext) unmarshalOValueInput2ᚖgithubᚗcomᚋtharsisᚋethermintᚋgqlᚐValueInput(ctx context.Context, v interface{}) (*ValueInput, error) { +func (ec *executionContext) unmarshalOValueInput2ᚖgithubᚗcomᚋcercᚑioᚋlaconicdᚋgqlᚐValueInput(ctx context.Context, v interface{}) (*ValueInput, error) { if v == nil { return nil, nil } diff --git a/gql/gqlgen.yml b/gql/gqlgen.yml index a6baa943..c98d3018 100644 --- a/gql/gqlgen.yml +++ b/gql/gqlgen.yml @@ -1,5 +1,3 @@ -# .gqlgen.yml example -# # Refer to https://gqlgen.com/config/ # for detailed .gqlgen.yml documentation. @@ -12,3 +10,8 @@ model: resolver: filename: resolver.go type: Resolver + +models: + Link: + model: + - github.com/cerc-io/laconicd/gql.Link diff --git a/gql/models_gen.go b/gql/models_gen.go index 4fcef293..31f2e511 100644 --- a/gql/models_gen.go +++ b/gql/models_gen.go @@ -2,6 +2,10 @@ package gql +type Value interface { + IsValue() +} + type Account struct { Address string `json:"address"` PubKey *string `json:"pubKey"` @@ -10,6 +14,17 @@ type Account struct { Balance []*Coin `json:"balance"` } +type ArrayValue struct { + Value []Value `json:"value"` +} + +func (ArrayValue) IsValue() {} + +type Attribute struct { + Key string `json:"key"` + Value Value `json:"value"` +} + type Auction struct { ID string `json:"id"` Status string `json:"status"` @@ -53,21 +68,52 @@ type Bond struct { Balance []*Coin `json:"balance"` } +type BooleanValue struct { + Value bool `json:"value"` +} + +func (BooleanValue) IsValue() {} + +type BytesValue struct { + Value string `json:"value"` +} + +func (BytesValue) IsValue() {} + type Coin struct { Type string `json:"type"` Quantity string `json:"quantity"` } -type KeyValue struct { - Key string `json:"key"` - Value *Value `json:"value"` +type FloatValue struct { + Value float64 `json:"value"` } +func (FloatValue) IsValue() {} + +type IntValue struct { + Value int `json:"value"` +} + +func (IntValue) IsValue() {} + type KeyValueInput struct { Key string `json:"key"` Value *ValueInput `json:"value"` } +type LinkValue struct { + Value Link `json:"value"` +} + +func (LinkValue) IsValue() {} + +type MapValue struct { + Value []*Attribute `json:"value"` +} + +func (MapValue) IsValue() {} + type NameRecord struct { Latest *NameRecordEntry `json:"latest"` History []*NameRecordEntry `json:"history"` @@ -96,22 +142,14 @@ type PeerInfo struct { } 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"` + 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 []*Attribute `json:"attributes"` + References []*Record `json:"references"` } type Status struct { @@ -125,6 +163,12 @@ type Status struct { DiskUsage string `json:"disk_usage"` } +type StringValue struct { + Value string `json:"value"` +} + +func (StringValue) IsValue() {} + type SyncInfo struct { LatestBlockHash string `json:"latest_block_hash"` LatestBlockHeight string `json:"latest_block_height"` @@ -138,23 +182,12 @@ type ValidatorInfo struct { 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"` + Int *int `json:"int"` + Float *float64 `json:"float"` + String *string `json:"string"` + Boolean *bool `json:"boolean"` + Link *Link `json:"link"` + Array []*ValueInput `json:"array"` + Map []*KeyValueInput `json:"map"` } diff --git a/gql/resolver.go b/gql/resolver.go index 0c41bbb0..1e79347b 100644 --- a/gql/resolver.go +++ b/gql/resolver.go @@ -121,7 +121,7 @@ func (q queryResolver) QueryRecords(ctx context.Context, attributes []*KeyValueI res, err := nsQueryClient.ListRecords( context.Background(), ®istrytypes.QueryListRecordsRequest{ - Attributes: parseRequestAttributes(attributes), + Attributes: toRPCAttributes(attributes), All: (all != nil && *all), }, ) diff --git a/gql/scalar.go b/gql/scalar.go new file mode 100644 index 00000000..c53b4149 --- /dev/null +++ b/gql/scalar.go @@ -0,0 +1,33 @@ +package gql + +import ( + "context" + "encoding/json" + "fmt" + "io" +) + +// Represents an IPLD link. Links are generally but not necessarily implemented as CIDs +type Link string + +func (l Link) String() string { + return string(l) +} + +// UnmarshalGQLContext implements the graphql.ContextUnmarshaler interface +func (l *Link) UnmarshalGQLContext(_ context.Context, v interface{}) error { + s, ok := v.(string) + if !ok { + return fmt.Errorf("Link must be a string") + } + *l = Link(s) + return nil +} + +// MarshalGQLContext implements the graphql.ContextMarshaler interface +func (l Link) MarshalGQLContext(_ context.Context, w io.Writer) error { + encodable := map[string]string{ + "/": l.String(), + } + return json.NewEncoder(w).Encode(encodable) +} diff --git a/gql/util.go b/gql/util.go index 54fbd354..b0cf4c2a 100644 --- a/gql/util.go +++ b/gql/util.go @@ -2,15 +2,15 @@ package gql import ( "context" - "encoding/json" - "fmt" - "reflect" // #nosec G702 + "fmt" // #nosec G702 "strconv" auctiontypes "github.com/cerc-io/laconicd/x/auction/types" bondtypes "github.com/cerc-io/laconicd/x/bond/types" registrytypes "github.com/cerc-io/laconicd/x/registry/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ipld/go-ipld-prime" + "github.com/ipld/go-ipld-prime/codec/dagjson" ) // OwnerAttributeName denotes the owner attribute name for a bond. @@ -61,13 +61,21 @@ func getGQLRecord(ctx context.Context, resolver QueryResolver, record registryty return nil, nil } - recordType := record.ToReadableRecord() - attributes, err := getAttributes(&recordType) + node, err := ipld.Decode(record.Attributes, dagjson.Decode) + if err != nil { + return nil, err + } + if node.Kind() != ipld.Kind_Map { + return nil, fmt.Errorf("invalid record attributes") + } + + var links []string + attributes, err := resolveIPLDNode(node, &links) if err != nil { return nil, err } - references, err := getReferences(ctx, resolver, &recordType) + references, err := resolver.GetRecordsByIds(ctx, links) if err != nil { return nil, err } @@ -79,11 +87,96 @@ func getGQLRecord(ctx context.Context, resolver QueryResolver, record registryty ExpiryTime: record.GetExpiryTime(), Owners: record.GetOwners(), Names: record.GetNames(), - Attributes: attributes, + Attributes: attributes.(MapValue).Value, References: references, }, nil } +func resolveIPLDNode(node ipld.Node, links *[]string) (Value, error) { + switch node.Kind() { + case ipld.Kind_Map: + var entries []*Attribute + for itr := node.MapIterator(); !itr.Done(); { + k, v, err := itr.Next() + if err != nil { + return nil, err + } + if k.Kind() != ipld.Kind_String { + return nil, fmt.Errorf("invalid record attribute key type: %s", k.Kind()) + } + s, err := k.AsString() + if err != nil { + return nil, err + } + val, err := resolveIPLDNode(v, links) + if err != nil { + return nil, err + } + entries = append(entries, &Attribute{ + Key: s, + Value: val, + }) + } + return MapValue{entries}, nil + case ipld.Kind_List: + var values []Value + for itr := node.ListIterator(); !itr.Done(); { + _, v, err := itr.Next() + if err != nil { + return nil, err + } + val, err := resolveIPLDNode(v, links) + if err != nil { + return nil, err + } + values = append(values, val) + } + return ArrayValue{values}, nil + case ipld.Kind_Null: + return nil, nil + case ipld.Kind_Bool: + val, err := node.AsBool() + if err != nil { + return nil, err + } + return BooleanValue{val}, nil + case ipld.Kind_Int: + val, err := node.AsInt() + if err != nil { + return nil, err + } + // TODO: handle bigger ints + return IntValue{int(val)}, nil + case ipld.Kind_Float: + val, err := node.AsFloat() + if err != nil { + return nil, err + } + return FloatValue{val}, nil + case ipld.Kind_String: + val, err := node.AsString() + if err != nil { + return nil, err + } + return StringValue{val}, nil + case ipld.Kind_Bytes: + val, err := node.AsBytes() + if err != nil { + return nil, err + } + return BytesValue{string(val)}, nil + case ipld.Kind_Link: + val, err := node.AsLink() + if err != nil { + return nil, err + } + *links = append(*links, val.String()) + return LinkValue{Link(val.String())}, nil + default: + return nil, fmt.Errorf("invalid node kind") + } +} + func getGQLNameRecord(record *registrytypes.NameRecord) (*NameRecord, error) { if record == nil { return nil, fmt.Errorf("got nil record") @@ -163,136 +256,47 @@ func GetGQLAuction(auction *auctiontypes.Auction, bids []*auctiontypes.Bid) (*Au return &gqlAuction, nil } -func getReferences(ctx context.Context, resolver QueryResolver, r *registrytypes.ReadableRecord) ([]*Record, error) { - var ids []string +func toRPCValue(value *ValueInput) *registrytypes.QueryListRecordsRequest_ValueInput { + var rpcval registrytypes.QueryListRecordsRequest_ValueInput - // #nosec G705 - for key := range r.Attributes { - //nolint: all - switch r.Attributes[key].(type) { - case interface{}: - if obj, ok := r.Attributes[key].(map[string]interface{}); ok { - if _, ok := obj["/"]; ok && len(obj) == 1 { - if _, ok := obj["/"].(string); ok { - ids = append(ids, obj["/"].(string)) - } - } - } + switch { + case value == nil: + return nil + case value.Int != nil: + rpcval.Value = ®istrytypes.QueryListRecordsRequest_ValueInput_Int{Int: int64(*value.Int)} + case value.Float != nil: + rpcval.Value = ®istrytypes.QueryListRecordsRequest_ValueInput_Float{Float: *value.Float} + case value.String != nil: + rpcval.Value = ®istrytypes.QueryListRecordsRequest_ValueInput_String_{String_: *value.String} + case value.Boolean != nil: + rpcval.Value = ®istrytypes.QueryListRecordsRequest_ValueInput_Boolean{Boolean: *value.Boolean} + case value.Link != nil: + rpcval.Value = ®istrytypes.QueryListRecordsRequest_ValueInput_Link{Link: value.Link.String()} + case value.Array != nil: + var contents registrytypes.QueryListRecordsRequest_ArrayInput + for _, val := range value.Array { + contents.Values = append(contents.Values, toRPCValue(val)) } + rpcval.Value = ®istrytypes.QueryListRecordsRequest_ValueInput_Array{Array: &contents} + case value.Map != nil: + var contents registrytypes.QueryListRecordsRequest_MapInput + for _, kv := range value.Map { + contents.Values[kv.Key] = toRPCValue(kv.Value) + } + rpcval.Value = ®istrytypes.QueryListRecordsRequest_ValueInput_Map{Map: &contents} } - - return resolver.GetRecordsByIds(ctx, ids) + return &rpcval } -func getAttributes(r *registrytypes.ReadableRecord) ([]*KeyValue, error) { - return mapToKeyValuePairs(r.Attributes) -} - -func mapToKeyValuePairs(attrs map[string]interface{}) ([]*KeyValue, error) { - kvPairs := []*KeyValue{} - - trueVal := true - falseVal := false - - // #nosec G705 - 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 -} - -func parseRequestAttributes(attrs []*KeyValueInput) []*registrytypes.QueryListRecordsRequest_KeyValueInput { +func toRPCAttributes(attrs []*KeyValueInput) []*registrytypes.QueryListRecordsRequest_KeyValueInput { kvPairs := []*registrytypes.QueryListRecordsRequest_KeyValueInput{} for _, value := range attrs { + parsedValue := toRPCValue(value.Value) kvPair := ®istrytypes.QueryListRecordsRequest_KeyValueInput{ Key: value.Key, - Value: ®istrytypes.QueryListRecordsRequest_ValueInput{}, + Value: parsedValue, } - - if value.Value.String != nil { - kvPair.Value.String_ = *value.Value.String - kvPair.Value.Type = "string" - } - - if value.Value.Int != nil { - kvPair.Value.Int = int64(*value.Value.Int) - kvPair.Value.Type = "int" - } - - if value.Value.Float != nil { - kvPair.Value.Float = *value.Value.Float - kvPair.Value.Type = "float" - } - - if value.Value.Boolean != nil { - kvPair.Value.Boolean = *value.Value.Boolean - kvPair.Value.Type = "boolean" - } - - if value.Value.Reference != nil { - reference := ®istrytypes.QueryListRecordsRequest_ReferenceInput{ - Id: value.Value.Reference.ID, - } - - kvPair.Value.Reference = reference - kvPair.Value.Type = "reference" - } - - // TODO: Handle arrays. - kvPairs = append(kvPairs, kvPair) } diff --git a/proto/vulcanize/registry/v1beta1/query.proto b/proto/vulcanize/registry/v1beta1/query.proto index f30fdb44..94981158 100644 --- a/proto/vulcanize/registry/v1beta1/query.proto +++ b/proto/vulcanize/registry/v1beta1/query.proto @@ -67,17 +67,26 @@ message QueryParamsResponse { // QueryListRecordsRequest is request type for registry records list message QueryListRecordsRequest { - message ReferenceInput { + message LinkInput { string id = 1; } + message ArrayInput { + repeated ValueInput values = 1; + } + message MapInput { + map values = 1; + } message ValueInput { - string type = 1; - string string = 2; - int64 int = 3; - double float = 4; - bool boolean = 5; - ReferenceInput reference = 6; - repeated ValueInput values = 7; + // Type of record attribute value + oneof value { + string string = 1; + int64 int = 2; + double float = 3; + bool boolean = 4; + string link = 5; + ArrayInput array = 6; + MapInput map = 7; + } } message KeyValueInput { string key = 1; diff --git a/x/registry/helpers/helpers.go b/x/registry/helpers/helpers.go index 07041252..3d993f80 100644 --- a/x/registry/helpers/helpers.go +++ b/x/registry/helpers/helpers.go @@ -47,24 +47,20 @@ func Int64ToBytes(num int64) []byte { return buf.Bytes() } -// MarshalMapToJSONBytes converts map[string]interface{} to bytes. -func MarshalMapToJSONBytes(val map[string]interface{}) (bytes []byte) { +func MustMarshalJSON[T any](val T) (bytes []byte) { bytes, err := json.Marshal(val) if err != nil { - panic("Marshal error.") + panic("JSON marshal error:" + err.Error()) } - return } -// UnMarshalMapFromJSONBytes converts bytes to map[string]interface{}. -func UnMarshalMapFromJSONBytes(bytes []byte) map[string]interface{} { - var val map[string]interface{} +func MustUnmarshalJSON[T any](bytes []byte) T { + var val T err := json.Unmarshal(bytes, &val) if err != nil { - panic("Unmarshal error.") + panic("JSON unmarshal error:" + err.Error()) } - return val } diff --git a/x/registry/keeper/grpc_query_test.go b/x/registry/keeper/grpc_query_test.go index c5ef2300..1f5d4971 100644 --- a/x/registry/keeper/grpc_query_test.go +++ b/x/registry/keeper/grpc_query_test.go @@ -3,12 +3,13 @@ package keeper_test import ( "context" "fmt" + "os" + "reflect" + "github.com/cerc-io/laconicd/x/registry/client/cli" "github.com/cerc-io/laconicd/x/registry/helpers" "github.com/cerc-io/laconicd/x/registry/keeper" registrytypes "github.com/cerc-io/laconicd/x/registry/types" - "os" - "reflect" ) func (suite *KeeperTestSuite) TestGrpcQueryParams() { @@ -69,26 +70,7 @@ func (suite *KeeperTestSuite) TestGrpcGetRecordLists() { { Key: "type", Value: ®istrytypes.QueryListRecordsRequest_ValueInput{ - Type: "string", - String_: "WebsiteRegistrationRecord", - }, - }, - }, - All: true, - }, - true, - false, - 1, - }, - { - "Filter with tag (extant) (https://git.vdb.to/cerc-io/laconicd/issues/129)", - ®istrytypes.QueryListRecordsRequest{ - Attributes: []*registrytypes.QueryListRecordsRequest_KeyValueInput{ - { - Key: "tags", - Value: ®istrytypes.QueryListRecordsRequest_ValueInput{ - Type: "string", - String_: "tagA", + Value: ®istrytypes.QueryListRecordsRequest_ValueInput_String_{"WebsiteRegistrationRecord"}, }, }, }, @@ -98,6 +80,35 @@ func (suite *KeeperTestSuite) TestGrpcGetRecordLists() { false, 1, }, + // Skip the following test as querying with recursive values not supported (PR https://git.vdb.to/cerc-io/laconicd/pulls/112) + // See function RecordsFromAttributes (QueryValueToJSON call) in the registry keeper implementation (x/registry/keeper/keeper.go) + // { + // "Filter with tag (extant) (https://git.vdb.to/cerc-io/laconicd/issues/129)", + // ®istrytypes.QueryListRecordsRequest{ + // Attributes: []*registrytypes.QueryListRecordsRequest_KeyValueInput{ + // { + // Key: "tags", + // // Value: ®istrytypes.QueryListRecordsRequest_ValueInput{ + // // Value: ®istrytypes.QueryListRecordsRequest_ValueInput_String_{"tagA"}, + // // }, + // Value: ®istrytypes.QueryListRecordsRequest_ValueInput{ + // Value: ®istrytypes.QueryListRecordsRequest_ValueInput_Array{Array: ®istrytypes.QueryListRecordsRequest_ArrayInput{ + // Values: []*registrytypes.QueryListRecordsRequest_ValueInput{ + // { + // Value: ®istrytypes.QueryListRecordsRequest_ValueInput_String_{"tagA"}, + // }, + // }, + // }}, + // }, + // // Throws: "Recursive query values are not supported" + // }, + // }, + // All: true, + // }, + // true, + // false, + // 1, + // }, { "Filter with tag (non-existent) (https://git.vdb.to/cerc-io/laconicd/issues/129)", ®istrytypes.QueryListRecordsRequest{ @@ -105,8 +116,7 @@ func (suite *KeeperTestSuite) TestGrpcGetRecordLists() { { Key: "tags", Value: ®istrytypes.QueryListRecordsRequest_ValueInput{ - Type: "string", - String_: "NOEXIST", + Value: ®istrytypes.QueryListRecordsRequest_ValueInput_String_{"NOEXIST"}, }, }, }, @@ -123,8 +133,7 @@ func (suite *KeeperTestSuite) TestGrpcGetRecordLists() { { Key: "typ", Value: ®istrytypes.QueryListRecordsRequest_ValueInput{ - Type: "string", - String_: "eWebsiteRegistrationRecord", + Value: ®istrytypes.QueryListRecordsRequest_ValueInput_String_{"eWebsiteRegistrationRecord"}, }, }, }, @@ -141,8 +150,7 @@ func (suite *KeeperTestSuite) TestGrpcGetRecordLists() { { Key: "x500state_name", Value: ®istrytypes.QueryListRecordsRequest_ValueInput{ - Type: "string", - String_: "california", + Value: ®istrytypes.QueryListRecordsRequest_ValueInput_String_{"california"}, }, }, }, @@ -183,9 +191,13 @@ func (suite *KeeperTestSuite) TestGrpcGetRecordLists() { sr.Equal(resp.GetRecords()[0].GetBondId(), suite.bond.GetId()) for _, record := range resp.GetRecords() { - recAttr := helpers.UnMarshalMapFromJSONBytes(record.Attributes) + recAttr := helpers.MustUnmarshalJSON[registrytypes.AttributeMap](record.Attributes) + for _, attr := range test.req.GetAttributes() { - av := keeper.GetAttributeValue(attr.Value) + enc, err := keeper.QueryValueToJSON(attr.Value) + sr.NoError(err) + av := helpers.MustUnmarshalJSON[any](enc) + if nil != av && nil != recAttr[attr.Key] && reflect.Slice == reflect.TypeOf(recAttr[attr.Key]).Kind() && reflect.Slice != reflect.TypeOf(av).Kind() { diff --git a/x/registry/keeper/keeper.go b/x/registry/keeper/keeper.go index ada95b87..2ecce607 100644 --- a/x/registry/keeper/keeper.go +++ b/x/registry/keeper/keeper.go @@ -8,10 +8,6 @@ import ( "time" errorsmod "cosmossdk.io/errors" - auctionkeeper "github.com/cerc-io/laconicd/x/auction/keeper" - bondkeeper "github.com/cerc-io/laconicd/x/bond/keeper" - "github.com/cerc-io/laconicd/x/registry/helpers" - "github.com/cerc-io/laconicd/x/registry/types" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/legacy" storetypes "github.com/cosmos/cosmos-sdk/store/types" @@ -20,7 +16,18 @@ import ( auth "github.com/cosmos/cosmos-sdk/x/auth/keeper" bank "github.com/cosmos/cosmos-sdk/x/bank/keeper" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + "github.com/gibson042/canonicaljson-go" + cid "github.com/ipfs/go-cid" + "github.com/ipld/go-ipld-prime" + "github.com/ipld/go-ipld-prime/codec/dagjson" + cidlink "github.com/ipld/go-ipld-prime/linking/cid" + basicnode "github.com/ipld/go-ipld-prime/node/basic" "github.com/tendermint/tendermint/libs/log" + + auctionkeeper "github.com/cerc-io/laconicd/x/auction/keeper" + bondkeeper "github.com/cerc-io/laconicd/x/bond/keeper" + "github.com/cerc-io/laconicd/x/registry/helpers" + "github.com/cerc-io/laconicd/x/registry/types" ) var ( @@ -99,6 +106,10 @@ func NewKeeper(cdc codec.BinaryCodec, accountKeeper auth.AccountKeeper, bankKeep // Logger returns a module-specific logger. func (k Keeper) Logger(ctx sdk.Context) log.Logger { + return logger(ctx) +} + +func logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", types.ModuleName) } @@ -146,8 +157,11 @@ func (k Keeper) ListRecords(ctx sdk.Context) []types.Record { func (k Keeper) RecordsFromAttributes(ctx sdk.Context, attributes []*types.QueryListRecordsRequest_KeyValueInput, all bool) ([]types.Record, error) { resultRecordIds := []string{} for i, attr := range attributes { - val := GetAttributeValue(attr.Value) - attributeIndex := GetAttributesIndexKey(attr.Key, val) + suffix, err := QueryValueToJSON(attr.Value) + if err != nil { + return nil, err + } + attributeIndex := GetAttributesIndexKey(attr.Key, suffix) recordIds, err := k.GetAttributeMapping(ctx, attributeIndex) if err != nil { return nil, err @@ -175,23 +189,53 @@ func (k Keeper) RecordsFromAttributes(ctx sdk.Context, attributes []*types.Query return records, nil } -func GetAttributeValue(input *types.QueryListRecordsRequest_ValueInput) interface{} { - if input.Type == "int" { - return input.GetInt() +// TODO not recursive, and only should be if we want to support querying with whole sub-objects, +// which seems unnecessary. +func QueryValueToJSON(input *types.QueryListRecordsRequest_ValueInput) ([]byte, error) { + np := basicnode.Prototype.Any + nb := np.NewBuilder() + + switch value := input.GetValue().(type) { + case *types.QueryListRecordsRequest_ValueInput_String_: + err := nb.AssignString(value.String_) + if err != nil { + return nil, err + } + case *types.QueryListRecordsRequest_ValueInput_Int: + err := nb.AssignInt(value.Int) + if err != nil { + return nil, err + } + case *types.QueryListRecordsRequest_ValueInput_Float: + err := nb.AssignFloat(value.Float) + if err != nil { + return nil, err + } + case *types.QueryListRecordsRequest_ValueInput_Boolean: + err := nb.AssignBool(value.Boolean) + if err != nil { + return nil, err + } + case *types.QueryListRecordsRequest_ValueInput_Link: + link := cidlink.Link{Cid: cid.MustParse(value.Link)} + err := nb.AssignLink(link) + if err != nil { + return nil, err + } + case *types.QueryListRecordsRequest_ValueInput_Array: + return nil, fmt.Errorf("recursive query values are not supported") + case *types.QueryListRecordsRequest_ValueInput_Map: + return nil, fmt.Errorf("recursive query values are not supported") + default: + return nil, fmt.Errorf("value has unexpected type %T", value) } - if input.Type == "float" { - return input.GetFloat() + + n := nb.Build() + var buf bytes.Buffer + if err := dagjson.Encode(n, &buf); err != nil { + return nil, fmt.Errorf("encoding value to JSON failed: %w", err) } - if input.Type == "string" { - return input.GetString_() - } - if input.Type == "boolean" { - return input.GetBoolean() - } - if input.Type == "reference" { - return input.GetReference().GetId() - } - return nil + return buf.Bytes(), nil } func getIntersection(a []string, b []string) []string { @@ -244,7 +288,7 @@ func (k Keeper) GetRecordExpiryQueue(ctx sdk.Context) []*types.ExpiryQueueRecord // ProcessSetRecord creates a record. func (k Keeper) ProcessSetRecord(ctx sdk.Context, msg types.MsgSetRecord) (*types.ReadableRecord, error) { payload := msg.Payload.ToReadablePayload() - record := types.ReadableRecord{Attributes: payload.Record, BondID: msg.BondId} + record := types.ReadableRecord{Attributes: payload.RecordAttributes, BondID: msg.BondId} // Check signatures. resourceSignBytes, _ := record.GetSignBytes() @@ -264,14 +308,12 @@ func (k Keeper) ProcessSetRecord(ctx sdk.Context, msg types.MsgSetRecord) (*type for _, sig := range payload.Signatures { pubKey, err := legacy.PubKeyFromBytes(helpers.BytesFromBase64(sig.PubKey)) if err != nil { - fmt.Println("Error decoding pubKey from bytes: ", err) - return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Invalid public key.") + return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, fmt.Sprint("Error decoding pubKey from bytes: ", err)) } sigOK := pubKey.VerifySignature(resourceSignBytes, helpers.BytesFromBase64(sig.Sig)) if !sigOK { - fmt.Println("Signature mismatch: ", sig.PubKey) - return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Invalid signature.") + return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, fmt.Sprint("Signature mismatch: ", sig.PubKey)) } record.Owners = append(record.Owners, pubKey.Address().String()) } @@ -312,7 +354,7 @@ func (k Keeper) processRecord(ctx sdk.Context, record *types.ReadableRecord, isR return err } - expiryTimeKey := GetAttributesIndexKey(ExpiryTimeAttributeName, record.ExpiryTime) + expiryTimeKey := GetAttributesIndexKey(ExpiryTimeAttributeName, []byte(record.ExpiryTime)) if err := k.SetAttributeMapping(ctx, expiryTimeKey, record.ID); err != nil { return err } @@ -334,14 +376,51 @@ func (k Keeper) PutRecord(ctx sdk.Context, record types.Record) { k.updateBlockChangeSetForRecord(ctx, record.Id) } -func (k Keeper) processAttributes(ctx sdk.Context, attrs map[string]any, id string, prefix string) error { - for key, value := range attrs { - if subRecord, ok := value.(map[string]any); ok { - err := k.processAttributes(ctx, subRecord, id, key) +func (k Keeper) processAttributes(ctx sdk.Context, attrs types.AttributeMap, id string, prefix string) error { + np := basicnode.Prototype.Map + nb := np.NewBuilder() + encAttrs, err := canonicaljson.Marshal(attrs) + if err != nil { + return err + } + if len(attrs) == 0 { + encAttrs = []byte("{}") + } + err = dagjson.Decode(nb, bytes.NewReader(encAttrs)) + if err != nil { + return fmt.Errorf("failed to decode attributes: %w", err) + } + n := nb.Build() + if n.Kind() != ipld.Kind_Map { + return fmt.Errorf("record attributes must be a map, not %T", n.Kind()) + } + + return k.processAttributeMap(ctx, n, id, prefix) +} + +func (k Keeper) processAttributeMap(ctx sdk.Context, n ipld.Node, id string, prefix string) error { + for it := n.MapIterator(); !it.Done(); { + //nolint:misspell + keynode, valuenode, err := it.Next() + if err != nil { + return err + } + key, err := keynode.AsString() + if err != nil { + return err + } + + if valuenode.Kind() == ipld.Kind_Map { + err := k.processAttributeMap(ctx, valuenode, id, key) if err != nil { return err } } else { + var buf bytes.Buffer + if err := dagjson.Encode(valuenode, &buf); err != nil { + return err + } + value := buf.Bytes() indexKey := GetAttributesIndexKey(prefix+key, value) if err := k.SetAttributeMapping(ctx, indexKey, id); err != nil { return err @@ -351,8 +430,8 @@ func (k Keeper) processAttributes(ctx sdk.Context, attrs map[string]any, id stri return nil } -func GetAttributesIndexKey(key string, value interface{}) []byte { - keyString := fmt.Sprintf("%s=%s", key, value) +func GetAttributesIndexKey(key string, suffix []byte) []byte { + keyString := fmt.Sprintf("%s=%s", key, suffix) return append(PrefixAttributesIndex, []byte(keyString)...) } @@ -364,8 +443,6 @@ func (k Keeper) SetAttributeMapping(ctx sdk.Context, key []byte, recordID string if err != nil { return fmt.Errorf("cannot unmarshal byte array, error, %w", err) } - } else { - recordIds = []string{} } recordIds = append(recordIds, recordID) bz, err := json.Marshal(recordIds) diff --git a/x/registry/keeper/naming_keeper.go b/x/registry/keeper/naming_keeper.go index e67a0b80..44946e61 100644 --- a/x/registry/keeper/naming_keeper.go +++ b/x/registry/keeper/naming_keeper.go @@ -611,7 +611,7 @@ func (k Keeper) ProcessAuthorityExpiryQueue(ctx sdk.Context) { k.SetNameAuthority(ctx, name, &authority) k.DeleteAuthorityExpiryQueue(ctx, name, authority) - ctx.Logger().Info(fmt.Sprintf("Marking authority expired as no bond present: %s", name)) + k.Logger(ctx).Info(fmt.Sprintf("Marking authority expired as no bond present: %s", name)) return } @@ -672,7 +672,7 @@ func (k Keeper) AuthorityExpiryQueueIterator(ctx sdk.Context, endTime time.Time) // TryTakeAuthorityRent tries to take rent from the authority bond. func (k Keeper) TryTakeAuthorityRent(ctx sdk.Context, name string, authority types.NameAuthority) { - ctx.Logger().Info(fmt.Sprintf("Trying to take rent for authority: %s", name)) + k.Logger(ctx).Info(fmt.Sprintf("Trying to take rent for authority: %s", name)) params := k.GetParams(ctx) rent := params.AuthorityRent @@ -684,7 +684,7 @@ func (k Keeper) TryTakeAuthorityRent(ctx sdk.Context, name string, authority typ k.SetNameAuthority(ctx, name, &authority) k.DeleteAuthorityExpiryQueue(ctx, name, authority) - ctx.Logger().Info(fmt.Sprintf("Insufficient funds in owner account to pay authority rent, marking as expired: %s", name)) + k.Logger(ctx).Info(fmt.Sprintf("Insufficient funds in owner account to pay authority rent, marking as expired: %s", name)) return } @@ -699,7 +699,7 @@ func (k Keeper) TryTakeAuthorityRent(ctx sdk.Context, name string, authority typ k.SetNameAuthority(ctx, name, &authority) k.AddBondToAuthorityIndexEntry(ctx, authority.BondId, name) - ctx.Logger().Info(fmt.Sprintf("Authority rent paid successfully: %s", name)) + k.Logger(ctx).Info(fmt.Sprintf("Authority rent paid successfully: %s", name)) } // ListNameAuthorityRecords - get all name authority records. diff --git a/x/registry/keeper/record_keeper.go b/x/registry/keeper/record_keeper.go index cea1be7d..cdbd802a 100644 --- a/x/registry/keeper/record_keeper.go +++ b/x/registry/keeper/record_keeper.go @@ -39,14 +39,14 @@ func (k RecordKeeper) OnAuctionWinnerSelected(ctx sdk.Context, auctionID string) name := k.GetAuctionToAuthorityMapping(ctx, auctionID) if name == "" { // We don't know about this auction, ignore. - ctx.Logger().Info(fmt.Sprintf("Ignoring auction notification, name mapping not found: %s", auctionID)) + logger(ctx).Info(fmt.Sprintf("Ignoring auction notification, name mapping not found: %s", auctionID)) return } store := ctx.KVStore(k.storeKey) if !HasNameAuthority(store, name) { // We don't know about this authority, ignore. - ctx.Logger().Info(fmt.Sprintf("Ignoring auction notification, authority not found: %s", auctionID)) + logger(ctx).Info(fmt.Sprintf("Ignoring auction notification, authority not found: %s", auctionID)) return } @@ -71,12 +71,12 @@ func (k RecordKeeper) OnAuctionWinnerSelected(ctx sdk.Context, auctionID string) // Can be used to check if names are older than the authority itself (stale names). authority.Height = uint64(ctx.BlockHeight()) - ctx.Logger().Info(fmt.Sprintf("Winner selected, marking authority as active: %s", name)) + logger(ctx).Info(fmt.Sprintf("Winner selected, marking authority as active: %s", name)) } else { // Mark as expired. authority.Status = types.AuthorityExpired - ctx.Logger().Info(fmt.Sprintf("No winner, marking authority as expired: %s", name)) + logger(ctx).Info(fmt.Sprintf("No winner, marking authority as expired: %s", name)) } authority.AuctionId = "" @@ -85,7 +85,7 @@ func (k RecordKeeper) OnAuctionWinnerSelected(ctx sdk.Context, auctionID string) // Forget about this auction now, we no longer need it. removeAuctionToAuthorityMapping(store, auctionID) } else { - ctx.Logger().Info(fmt.Sprintf("Ignoring auction notification, status: %s", auctionObj.Status)) + logger(ctx).Info(fmt.Sprintf("Ignoring auction notification, status: %s", auctionObj.Status)) } } diff --git a/x/registry/types/query.pb.go b/x/registry/types/query.pb.go index e3760364..f037ab32 100644 --- a/x/registry/types/query.pb.go +++ b/x/registry/types/query.pb.go @@ -177,24 +177,22 @@ func (m *QueryListRecordsRequest) GetPagination() *query.PageRequest { return nil } -type QueryListRecordsRequest_ReferenceInput struct { +type QueryListRecordsRequest_LinkInput struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } -func (m *QueryListRecordsRequest_ReferenceInput) Reset() { - *m = QueryListRecordsRequest_ReferenceInput{} -} -func (m *QueryListRecordsRequest_ReferenceInput) String() string { return proto.CompactTextString(m) } -func (*QueryListRecordsRequest_ReferenceInput) ProtoMessage() {} -func (*QueryListRecordsRequest_ReferenceInput) Descriptor() ([]byte, []int) { +func (m *QueryListRecordsRequest_LinkInput) Reset() { *m = QueryListRecordsRequest_LinkInput{} } +func (m *QueryListRecordsRequest_LinkInput) String() string { return proto.CompactTextString(m) } +func (*QueryListRecordsRequest_LinkInput) ProtoMessage() {} +func (*QueryListRecordsRequest_LinkInput) Descriptor() ([]byte, []int) { return fileDescriptor_dfadc1ce52446f26, []int{2, 0} } -func (m *QueryListRecordsRequest_ReferenceInput) XXX_Unmarshal(b []byte) error { +func (m *QueryListRecordsRequest_LinkInput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryListRecordsRequest_ReferenceInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryListRecordsRequest_LinkInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryListRecordsRequest_ReferenceInput.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryListRecordsRequest_LinkInput.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -204,40 +202,139 @@ func (m *QueryListRecordsRequest_ReferenceInput) XXX_Marshal(b []byte, determini return b[:n], nil } } -func (m *QueryListRecordsRequest_ReferenceInput) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryListRecordsRequest_ReferenceInput.Merge(m, src) +func (m *QueryListRecordsRequest_LinkInput) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryListRecordsRequest_LinkInput.Merge(m, src) } -func (m *QueryListRecordsRequest_ReferenceInput) XXX_Size() int { +func (m *QueryListRecordsRequest_LinkInput) XXX_Size() int { return m.Size() } -func (m *QueryListRecordsRequest_ReferenceInput) XXX_DiscardUnknown() { - xxx_messageInfo_QueryListRecordsRequest_ReferenceInput.DiscardUnknown(m) +func (m *QueryListRecordsRequest_LinkInput) XXX_DiscardUnknown() { + xxx_messageInfo_QueryListRecordsRequest_LinkInput.DiscardUnknown(m) } -var xxx_messageInfo_QueryListRecordsRequest_ReferenceInput proto.InternalMessageInfo +var xxx_messageInfo_QueryListRecordsRequest_LinkInput proto.InternalMessageInfo -func (m *QueryListRecordsRequest_ReferenceInput) GetId() string { +func (m *QueryListRecordsRequest_LinkInput) GetId() string { if m != nil { return m.Id } return "" } +// message ValueInput { +// string type = 1; +// string string = 2; +// int64 int = 3; +// double float = 4; +// bool boolean = 5; +// LinkInput reference = 6; +// repeated ValueInput values = 7; +// } +type QueryListRecordsRequest_ArrayInput struct { + Values []*QueryListRecordsRequest_ValueInput `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` +} + +func (m *QueryListRecordsRequest_ArrayInput) Reset() { *m = QueryListRecordsRequest_ArrayInput{} } +func (m *QueryListRecordsRequest_ArrayInput) String() string { return proto.CompactTextString(m) } +func (*QueryListRecordsRequest_ArrayInput) ProtoMessage() {} +func (*QueryListRecordsRequest_ArrayInput) Descriptor() ([]byte, []int) { + return fileDescriptor_dfadc1ce52446f26, []int{2, 1} +} +func (m *QueryListRecordsRequest_ArrayInput) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryListRecordsRequest_ArrayInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryListRecordsRequest_ArrayInput.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryListRecordsRequest_ArrayInput) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryListRecordsRequest_ArrayInput.Merge(m, src) +} +func (m *QueryListRecordsRequest_ArrayInput) XXX_Size() int { + return m.Size() +} +func (m *QueryListRecordsRequest_ArrayInput) XXX_DiscardUnknown() { + xxx_messageInfo_QueryListRecordsRequest_ArrayInput.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryListRecordsRequest_ArrayInput proto.InternalMessageInfo + +func (m *QueryListRecordsRequest_ArrayInput) GetValues() []*QueryListRecordsRequest_ValueInput { + if m != nil { + return m.Values + } + return nil +} + +type QueryListRecordsRequest_MapInput struct { + Values map[string]*QueryListRecordsRequest_ValueInput `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *QueryListRecordsRequest_MapInput) Reset() { *m = QueryListRecordsRequest_MapInput{} } +func (m *QueryListRecordsRequest_MapInput) String() string { return proto.CompactTextString(m) } +func (*QueryListRecordsRequest_MapInput) ProtoMessage() {} +func (*QueryListRecordsRequest_MapInput) Descriptor() ([]byte, []int) { + return fileDescriptor_dfadc1ce52446f26, []int{2, 2} +} +func (m *QueryListRecordsRequest_MapInput) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryListRecordsRequest_MapInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryListRecordsRequest_MapInput.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryListRecordsRequest_MapInput) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryListRecordsRequest_MapInput.Merge(m, src) +} +func (m *QueryListRecordsRequest_MapInput) XXX_Size() int { + return m.Size() +} +func (m *QueryListRecordsRequest_MapInput) XXX_DiscardUnknown() { + xxx_messageInfo_QueryListRecordsRequest_MapInput.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryListRecordsRequest_MapInput proto.InternalMessageInfo + +func (m *QueryListRecordsRequest_MapInput) GetValues() map[string]*QueryListRecordsRequest_ValueInput { + if m != nil { + return m.Values + } + return nil +} + type QueryListRecordsRequest_ValueInput struct { - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - String_ string `protobuf:"bytes,2,opt,name=string,proto3" json:"string,omitempty"` - Int int64 `protobuf:"varint,3,opt,name=int,proto3" json:"int,omitempty"` - Float float64 `protobuf:"fixed64,4,opt,name=float,proto3" json:"float,omitempty"` - Boolean bool `protobuf:"varint,5,opt,name=boolean,proto3" json:"boolean,omitempty"` - Reference *QueryListRecordsRequest_ReferenceInput `protobuf:"bytes,6,opt,name=reference,proto3" json:"reference,omitempty"` - Values []*QueryListRecordsRequest_ValueInput `protobuf:"bytes,7,rep,name=values,proto3" json:"values,omitempty"` + // Types that are valid to be assigned to Value: + // *QueryListRecordsRequest_ValueInput_String_ + // *QueryListRecordsRequest_ValueInput_Int + // *QueryListRecordsRequest_ValueInput_Float + // *QueryListRecordsRequest_ValueInput_Boolean + // *QueryListRecordsRequest_ValueInput_Link + // *QueryListRecordsRequest_ValueInput_Array + // *QueryListRecordsRequest_ValueInput_Map + Value isQueryListRecordsRequest_ValueInput_Value `protobuf_oneof:"value"` } func (m *QueryListRecordsRequest_ValueInput) Reset() { *m = QueryListRecordsRequest_ValueInput{} } func (m *QueryListRecordsRequest_ValueInput) String() string { return proto.CompactTextString(m) } func (*QueryListRecordsRequest_ValueInput) ProtoMessage() {} func (*QueryListRecordsRequest_ValueInput) Descriptor() ([]byte, []int) { - return fileDescriptor_dfadc1ce52446f26, []int{2, 1} + return fileDescriptor_dfadc1ce52446f26, []int{2, 3} } func (m *QueryListRecordsRequest_ValueInput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -266,55 +363,111 @@ func (m *QueryListRecordsRequest_ValueInput) XXX_DiscardUnknown() { var xxx_messageInfo_QueryListRecordsRequest_ValueInput proto.InternalMessageInfo -func (m *QueryListRecordsRequest_ValueInput) GetType() string { +type isQueryListRecordsRequest_ValueInput_Value interface { + isQueryListRecordsRequest_ValueInput_Value() + MarshalTo([]byte) (int, error) + Size() int +} + +type QueryListRecordsRequest_ValueInput_String_ struct { + String_ string `protobuf:"bytes,1,opt,name=string,proto3,oneof" json:"string,omitempty"` +} +type QueryListRecordsRequest_ValueInput_Int struct { + Int int64 `protobuf:"varint,2,opt,name=int,proto3,oneof" json:"int,omitempty"` +} +type QueryListRecordsRequest_ValueInput_Float struct { + Float float64 `protobuf:"fixed64,3,opt,name=float,proto3,oneof" json:"float,omitempty"` +} +type QueryListRecordsRequest_ValueInput_Boolean struct { + Boolean bool `protobuf:"varint,4,opt,name=boolean,proto3,oneof" json:"boolean,omitempty"` +} +type QueryListRecordsRequest_ValueInput_Link struct { + Link string `protobuf:"bytes,5,opt,name=link,proto3,oneof" json:"link,omitempty"` +} +type QueryListRecordsRequest_ValueInput_Array struct { + Array *QueryListRecordsRequest_ArrayInput `protobuf:"bytes,6,opt,name=array,proto3,oneof" json:"array,omitempty"` +} +type QueryListRecordsRequest_ValueInput_Map struct { + Map *QueryListRecordsRequest_MapInput `protobuf:"bytes,7,opt,name=map,proto3,oneof" json:"map,omitempty"` +} + +func (*QueryListRecordsRequest_ValueInput_String_) isQueryListRecordsRequest_ValueInput_Value() {} +func (*QueryListRecordsRequest_ValueInput_Int) isQueryListRecordsRequest_ValueInput_Value() {} +func (*QueryListRecordsRequest_ValueInput_Float) isQueryListRecordsRequest_ValueInput_Value() {} +func (*QueryListRecordsRequest_ValueInput_Boolean) isQueryListRecordsRequest_ValueInput_Value() {} +func (*QueryListRecordsRequest_ValueInput_Link) isQueryListRecordsRequest_ValueInput_Value() {} +func (*QueryListRecordsRequest_ValueInput_Array) isQueryListRecordsRequest_ValueInput_Value() {} +func (*QueryListRecordsRequest_ValueInput_Map) isQueryListRecordsRequest_ValueInput_Value() {} + +func (m *QueryListRecordsRequest_ValueInput) GetValue() isQueryListRecordsRequest_ValueInput_Value { if m != nil { - return m.Type + return m.Value } - return "" + return nil } func (m *QueryListRecordsRequest_ValueInput) GetString_() string { - if m != nil { - return m.String_ + if x, ok := m.GetValue().(*QueryListRecordsRequest_ValueInput_String_); ok { + return x.String_ } return "" } func (m *QueryListRecordsRequest_ValueInput) GetInt() int64 { - if m != nil { - return m.Int + if x, ok := m.GetValue().(*QueryListRecordsRequest_ValueInput_Int); ok { + return x.Int } return 0 } func (m *QueryListRecordsRequest_ValueInput) GetFloat() float64 { - if m != nil { - return m.Float + if x, ok := m.GetValue().(*QueryListRecordsRequest_ValueInput_Float); ok { + return x.Float } return 0 } func (m *QueryListRecordsRequest_ValueInput) GetBoolean() bool { - if m != nil { - return m.Boolean + if x, ok := m.GetValue().(*QueryListRecordsRequest_ValueInput_Boolean); ok { + return x.Boolean } return false } -func (m *QueryListRecordsRequest_ValueInput) GetReference() *QueryListRecordsRequest_ReferenceInput { - if m != nil { - return m.Reference +func (m *QueryListRecordsRequest_ValueInput) GetLink() string { + if x, ok := m.GetValue().(*QueryListRecordsRequest_ValueInput_Link); ok { + return x.Link + } + return "" +} + +func (m *QueryListRecordsRequest_ValueInput) GetArray() *QueryListRecordsRequest_ArrayInput { + if x, ok := m.GetValue().(*QueryListRecordsRequest_ValueInput_Array); ok { + return x.Array } return nil } -func (m *QueryListRecordsRequest_ValueInput) GetValues() []*QueryListRecordsRequest_ValueInput { - if m != nil { - return m.Values +func (m *QueryListRecordsRequest_ValueInput) GetMap() *QueryListRecordsRequest_MapInput { + if x, ok := m.GetValue().(*QueryListRecordsRequest_ValueInput_Map); ok { + return x.Map } return nil } +// XXX_OneofWrappers is for the internal use of the proto package. +func (*QueryListRecordsRequest_ValueInput) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*QueryListRecordsRequest_ValueInput_String_)(nil), + (*QueryListRecordsRequest_ValueInput_Int)(nil), + (*QueryListRecordsRequest_ValueInput_Float)(nil), + (*QueryListRecordsRequest_ValueInput_Boolean)(nil), + (*QueryListRecordsRequest_ValueInput_Link)(nil), + (*QueryListRecordsRequest_ValueInput_Array)(nil), + (*QueryListRecordsRequest_ValueInput_Map)(nil), + } +} + type QueryListRecordsRequest_KeyValueInput struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value *QueryListRecordsRequest_ValueInput `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` @@ -324,7 +477,7 @@ func (m *QueryListRecordsRequest_KeyValueInput) Reset() { *m = QueryList func (m *QueryListRecordsRequest_KeyValueInput) String() string { return proto.CompactTextString(m) } func (*QueryListRecordsRequest_KeyValueInput) ProtoMessage() {} func (*QueryListRecordsRequest_KeyValueInput) Descriptor() ([]byte, []int) { - return fileDescriptor_dfadc1ce52446f26, []int{2, 2} + return fileDescriptor_dfadc1ce52446f26, []int{2, 4} } func (m *QueryListRecordsRequest_KeyValueInput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1381,7 +1534,10 @@ func init() { proto.RegisterType((*QueryParamsRequest)(nil), "vulcanize.registry.v1beta1.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "vulcanize.registry.v1beta1.QueryParamsResponse") proto.RegisterType((*QueryListRecordsRequest)(nil), "vulcanize.registry.v1beta1.QueryListRecordsRequest") - proto.RegisterType((*QueryListRecordsRequest_ReferenceInput)(nil), "vulcanize.registry.v1beta1.QueryListRecordsRequest.ReferenceInput") + proto.RegisterType((*QueryListRecordsRequest_LinkInput)(nil), "vulcanize.registry.v1beta1.QueryListRecordsRequest.LinkInput") + proto.RegisterType((*QueryListRecordsRequest_ArrayInput)(nil), "vulcanize.registry.v1beta1.QueryListRecordsRequest.ArrayInput") + proto.RegisterType((*QueryListRecordsRequest_MapInput)(nil), "vulcanize.registry.v1beta1.QueryListRecordsRequest.MapInput") + proto.RegisterMapType((map[string]*QueryListRecordsRequest_ValueInput)(nil), "vulcanize.registry.v1beta1.QueryListRecordsRequest.MapInput.ValuesEntry") proto.RegisterType((*QueryListRecordsRequest_ValueInput)(nil), "vulcanize.registry.v1beta1.QueryListRecordsRequest.ValueInput") proto.RegisterType((*QueryListRecordsRequest_KeyValueInput)(nil), "vulcanize.registry.v1beta1.QueryListRecordsRequest.KeyValueInput") proto.RegisterType((*QueryListRecordsResponse)(nil), "vulcanize.registry.v1beta1.QueryListRecordsResponse") @@ -1412,96 +1568,100 @@ func init() { } var fileDescriptor_dfadc1ce52446f26 = []byte{ - // 1411 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcb, 0x6f, 0xdc, 0x54, - 0x17, 0xcf, 0x4d, 0x32, 0x93, 0xe6, 0xe4, 0x6b, 0xfa, 0xf5, 0x12, 0xb5, 0x53, 0x53, 0x26, 0xa9, - 0xfb, 0x9a, 0xa4, 0x1d, 0x9b, 0x24, 0x2d, 0x2d, 0x2d, 0xa0, 0x66, 0x4a, 0x1b, 0x55, 0x94, 0x47, - 0xac, 0x52, 0x24, 0x58, 0x14, 0x8f, 0xe7, 0x76, 0xea, 0xd6, 0xf1, 0x9d, 0xfa, 0x91, 0x76, 0xa8, - 0xba, 0x01, 0x89, 0x25, 0x42, 0x42, 0x08, 0x04, 0x6b, 0x1e, 0xea, 0x86, 0x0d, 0xac, 0x79, 0xac, - 0x2a, 0xb1, 0xa9, 0xc4, 0x86, 0x55, 0x41, 0x0d, 0x12, 0xfb, 0xfe, 0x05, 0xc8, 0xf7, 0xe1, 0xb1, - 0x93, 0x79, 0x78, 0xa6, 0x41, 0x62, 0x35, 0xd7, 0xd7, 0xe7, 0x77, 0xce, 0xef, 0x3c, 0xee, 0xb9, - 0xc7, 0x03, 0x87, 0xd6, 0x42, 0xc7, 0x32, 0x5d, 0xfb, 0x3d, 0xa2, 0x7b, 0xa4, 0x6e, 0xfb, 0x81, - 0xd7, 0xd4, 0xd7, 0xe6, 0xab, 0x24, 0x30, 0xe7, 0xf5, 0x9b, 0x21, 0xf1, 0x9a, 0x5a, 0xc3, 0xa3, - 0x01, 0xc5, 0x4a, 0x2c, 0xa7, 0x49, 0x39, 0x4d, 0xc8, 0x29, 0xb3, 0x5d, 0x74, 0xc4, 0xc2, 0x4c, - 0x8d, 0xb2, 0xb7, 0x4e, 0x69, 0xdd, 0x21, 0xba, 0xd9, 0xb0, 0x75, 0xd3, 0x75, 0x69, 0x60, 0x06, - 0x36, 0x75, 0x7d, 0xf1, 0x76, 0xce, 0xa2, 0xfe, 0x2a, 0xf5, 0xf5, 0xaa, 0xe9, 0x13, 0x6e, 0x3d, - 0xd6, 0xd3, 0x30, 0xeb, 0xb6, 0xcb, 0x84, 0x85, 0xec, 0x54, 0x9d, 0xd6, 0x29, 0x5b, 0xea, 0xd1, - 0x4a, 0xec, 0x16, 0x93, 0x1a, 0x24, 0xd6, 0xa2, 0xb6, 0x40, 0xa9, 0x53, 0x80, 0x57, 0x22, 0xbd, - 0x6f, 0x98, 0x9e, 0xb9, 0xea, 0x1b, 0xe4, 0x66, 0x48, 0xfc, 0x40, 0x5d, 0x81, 0xa7, 0x52, 0xbb, - 0x7e, 0x83, 0xba, 0x3e, 0xc1, 0xa7, 0x20, 0xdf, 0x60, 0x3b, 0x05, 0x34, 0x83, 0x4a, 0x13, 0x0b, - 0xaa, 0xd6, 0x39, 0x08, 0x9a, 0xc0, 0x0a, 0x84, 0xfa, 0x6d, 0x0e, 0x76, 0x33, 0x9d, 0x17, 0x6d, - 0x3f, 0x30, 0x88, 0x45, 0xbd, 0x9a, 0x34, 0x87, 0x4d, 0x00, 0x33, 0x08, 0x3c, 0xbb, 0x1a, 0x06, - 0x24, 0xd2, 0x3d, 0x52, 0x9a, 0x58, 0x58, 0xea, 0xa6, 0xbb, 0x83, 0x22, 0xed, 0x15, 0xd2, 0xbc, - 0x6c, 0x3a, 0x21, 0xb9, 0xe0, 0x36, 0xc2, 0xc0, 0x48, 0x28, 0xc5, 0xff, 0x87, 0x11, 0xd3, 0x71, - 0x0a, 0xc3, 0x33, 0xa8, 0xb4, 0xcd, 0x88, 0x96, 0xf8, 0x3c, 0x40, 0x2b, 0x86, 0x85, 0x11, 0xe6, - 0xd0, 0x21, 0x8d, 0x87, 0x4b, 0x8b, 0xc2, 0xa5, 0xf1, 0x74, 0xb7, 0xfc, 0xa9, 0x13, 0x61, 0xc7, - 0x48, 0x20, 0x95, 0x19, 0x98, 0x34, 0xc8, 0x55, 0xe2, 0x11, 0xd7, 0xe2, 0x76, 0xf1, 0x24, 0x0c, - 0xdb, 0x35, 0x16, 0xa2, 0x71, 0x63, 0xd8, 0xae, 0x29, 0xdf, 0x0f, 0x03, 0xb4, 0x68, 0x61, 0x0c, - 0xa3, 0x41, 0xb3, 0x41, 0x84, 0x00, 0x5b, 0xe3, 0x5d, 0x90, 0xf7, 0x03, 0xcf, 0x76, 0xeb, 0x8c, - 0xe1, 0xb8, 0x21, 0x9e, 0x22, 0xda, 0xb6, 0x1b, 0x30, 0x76, 0x23, 0x46, 0xb4, 0xc4, 0x53, 0x90, - 0xbb, 0xea, 0x50, 0x33, 0x28, 0x8c, 0xce, 0xa0, 0x12, 0x32, 0xf8, 0x03, 0x2e, 0xc0, 0x58, 0x95, - 0x52, 0x87, 0x98, 0x6e, 0x21, 0xc7, 0x5c, 0x94, 0x8f, 0xf8, 0x5d, 0x18, 0xf7, 0x24, 0xbd, 0x42, - 0x9e, 0x79, 0x59, 0x19, 0x24, 0xb4, 0x69, 0x1f, 0x8d, 0x96, 0x52, 0x7c, 0x19, 0xf2, 0x6b, 0x91, - 0x77, 0x7e, 0x61, 0x8c, 0x65, 0xee, 0xa5, 0x41, 0xd4, 0x27, 0xd2, 0x26, 0xb4, 0x29, 0xb7, 0x60, - 0x7b, 0x2a, 0x9f, 0x51, 0x30, 0x6e, 0x90, 0xa6, 0x88, 0x5b, 0xb4, 0xc4, 0x97, 0x20, 0xc7, 0x84, - 0x59, 0xd4, 0x9e, 0xdc, 0x32, 0x57, 0xa6, 0x7e, 0x83, 0xa0, 0xb0, 0x59, 0x5a, 0x9c, 0x81, 0x0a, - 0x8c, 0x79, 0x7c, 0x4b, 0x14, 0x6a, 0xd7, 0x43, 0xc0, 0xd1, 0x95, 0xd1, 0xfb, 0x0f, 0xa7, 0x87, - 0x0c, 0x09, 0xc4, 0xcb, 0xa9, 0xd2, 0xe3, 0xdc, 0x0f, 0xf7, 0x2c, 0x3d, 0x4e, 0x20, 0x59, 0x7b, - 0x6a, 0x09, 0x76, 0x31, 0xa2, 0xc2, 0x4c, 0xf3, 0xc2, 0xcb, 0xf2, 0x48, 0x6d, 0xa8, 0x41, 0xf5, - 0x1d, 0x71, 0xfa, 0x92, 0x92, 0xc2, 0xa3, 0x33, 0x90, 0xe7, 0xc4, 0xb2, 0x9c, 0xea, 0x94, 0x43, - 0x02, 0xa7, 0x06, 0xa0, 0xa4, 0x94, 0x57, 0xa8, 0x5b, 0xeb, 0x48, 0x65, 0xc3, 0xc1, 0x1b, 0x1e, - 0xf4, 0xe0, 0xa9, 0xf7, 0x10, 0x3c, 0xdd, 0xd6, 0xec, 0x7f, 0x31, 0x53, 0xfb, 0x60, 0x7a, 0x99, - 0x04, 0x86, 0xb0, 0xfa, 0x2a, 0xad, 0x85, 0x0e, 0xa9, 0x98, 0x8e, 0xe9, 0x5a, 0xd2, 0x37, 0xf5, - 0x3a, 0xcc, 0x74, 0x16, 0x11, 0x3e, 0x9d, 0x87, 0x6d, 0x55, 0xbe, 0x25, 0x9d, 0x9a, 0xeb, 0xe6, - 0xd4, 0x92, 0x65, 0xd1, 0xd0, 0x0d, 0xa4, 0x96, 0x18, 0xab, 0xfe, 0x8d, 0x60, 0x32, 0xfd, 0x12, - 0x5f, 0x84, 0xff, 0x99, 0x7c, 0xe7, 0x8a, 0x6b, 0xae, 0x8a, 0xf6, 0x54, 0x99, 0x7d, 0xfc, 0x70, - 0xfa, 0xe0, 0x75, 0x9f, 0xba, 0xa7, 0x54, 0xf1, 0xf6, 0x35, 0x73, 0x95, 0xa8, 0x33, 0x4d, 0x73, - 0xd5, 0x49, 0x6f, 0x19, 0x13, 0x89, 0x27, 0xfc, 0x21, 0x82, 0x31, 0x61, 0xad, 0x30, 0xc2, 0x88, - 0xee, 0x49, 0x85, 0x4d, 0x32, 0x3c, 0x4b, 0x6d, 0xb7, 0xb2, 0x12, 0x05, 0xfd, 0xf1, 0xc3, 0xe9, - 0x67, 0xb8, 0x21, 0x81, 0x93, 0x46, 0xe4, 0xe3, 0xbd, 0x3f, 0xa6, 0x4b, 0x75, 0x3b, 0xb8, 0x16, - 0x56, 0x35, 0x8b, 0xae, 0xea, 0xe2, 0x62, 0xe3, 0x3f, 0x65, 0xbf, 0x76, 0x43, 0x8f, 0x3a, 0xa9, - 0xcf, 0x34, 0xfa, 0x86, 0x34, 0xae, 0x12, 0x51, 0x24, 0xd1, 0x59, 0x8e, 0x98, 0x6d, 0xb8, 0x7a, - 0xd2, 0xc5, 0x88, 0x9e, 0xa4, 0x18, 0xf7, 0xb6, 0xb7, 0x23, 0x32, 0xb7, 0x04, 0xb9, 0x28, 0xac, - 0x32, 0x6d, 0x07, 0xbb, 0xa5, 0x2d, 0xc2, 0x9f, 0x73, 0x03, 0xaf, 0x29, 0xca, 0x91, 0x23, 0xb7, - 0xae, 0x18, 0x0f, 0xc3, 0x4e, 0xc6, 0xf5, 0xad, 0x6b, 0xd4, 0x8e, 0x23, 0x81, 0x61, 0xb4, 0x95, - 0x77, 0x83, 0xad, 0xd5, 0x2f, 0x90, 0x18, 0x0f, 0x84, 0xa4, 0xf0, 0xe5, 0x03, 0x04, 0x93, 0xd1, - 0xfb, 0x2b, 0x66, 0x18, 0x5c, 0xa3, 0x9e, 0x1d, 0x34, 0x45, 0xe4, 0x66, 0x7b, 0x79, 0xb5, 0x24, - 0x01, 0x95, 0x79, 0x91, 0xf3, 0x59, 0x9e, 0x73, 0x37, 0xf9, 0x52, 0x66, 0x3e, 0xbd, 0x69, 0x6c, - 0x4f, 0x3f, 0xab, 0x30, 0xc9, 0x23, 0x4e, 0xe9, 0x8d, 0xb0, 0x71, 0xd6, 0x73, 0xa3, 0x0b, 0xc2, - 0xf2, 0x5c, 0x79, 0x41, 0x58, 0x9e, 0xab, 0x5e, 0x12, 0x0d, 0x32, 0x96, 0x49, 0xcc, 0x32, 0x2d, - 0x77, 0xa3, 0x94, 0xf7, 0x20, 0xce, 0xd3, 0x29, 0xc2, 0xb2, 0x1f, 0x76, 0x88, 0xc6, 0xe3, 0x53, - 0x67, 0x8d, 0xb4, 0x37, 0xfd, 0x66, 0xdc, 0x71, 0xa5, 0x50, 0x72, 0x8e, 0xea, 0xb7, 0xe3, 0xc6, - 0xbd, 0xd6, 0x82, 0x3d, 0x4c, 0x2d, 0x6b, 0x15, 0xd1, 0xce, 0xb9, 0xdb, 0x0d, 0xdb, 0x6b, 0xae, - 0x84, 0x24, 0x24, 0x5b, 0x56, 0xcd, 0x3f, 0x20, 0xd8, 0xd7, 0xd1, 0x4a, 0xec, 0xc6, 0xf2, 0xc6, - 0x06, 0x5b, 0xee, 0xe6, 0x47, 0x4a, 0x03, 0x73, 0x69, 0xeb, 0xbb, 0xec, 0xf3, 0xb0, 0x73, 0x93, - 0x99, 0x4d, 0xf7, 0xcf, 0x54, 0x6b, 0x68, 0x18, 0x29, 0x8d, 0xcb, 0x4b, 0xff, 0xaa, 0x38, 0xbf, - 0xcb, 0x24, 0x88, 0x4b, 0xec, 0xdf, 0x08, 0xed, 0x4f, 0x08, 0x0e, 0x74, 0x33, 0x14, 0x47, 0xf7, - 0x75, 0x98, 0x90, 0xc7, 0xcb, 0x26, 0x03, 0x46, 0x38, 0xa9, 0x61, 0xcb, 0xa2, 0xbc, 0xf0, 0xd1, - 0x0e, 0xc8, 0x31, 0x17, 0xf0, 0xa7, 0x08, 0xf2, 0x7c, 0xce, 0xc7, 0x5a, 0xcf, 0xd9, 0x2b, 0xf5, - 0x89, 0xa1, 0xe8, 0x99, 0xe5, 0x39, 0x03, 0x75, 0xee, 0xfd, 0xdf, 0xfe, 0xfa, 0x64, 0xf8, 0x00, - 0x56, 0xf5, 0x2e, 0x5f, 0x57, 0xfc, 0x63, 0x03, 0x7f, 0x85, 0x60, 0x22, 0x31, 0xbc, 0xe1, 0xc5, - 0x01, 0x06, 0x43, 0xe5, 0x58, 0x7f, 0x20, 0x41, 0xf3, 0x08, 0xa3, 0x79, 0x10, 0xef, 0xd7, 0xbb, - 0x7e, 0x04, 0x72, 0x5e, 0x5f, 0x23, 0x18, 0x8f, 0x8f, 0x18, 0x5e, 0xe8, 0x69, 0x70, 0xd3, 0x9c, - 0xa7, 0x2c, 0xf6, 0x85, 0x11, 0x1c, 0x9f, 0x65, 0x1c, 0xe7, 0x70, 0x29, 0x03, 0x47, 0xfd, 0x8e, - 0x5d, 0xbb, 0x8b, 0x7f, 0x46, 0xb0, 0x33, 0x26, 0x2a, 0x27, 0x2d, 0xfc, 0x5c, 0x66, 0xe3, 0xa9, - 0x89, 0x50, 0x39, 0xd1, 0x37, 0x4e, 0x10, 0x3f, 0xcd, 0x88, 0x1f, 0xc7, 0x8b, 0x19, 0x88, 0x97, - 0xab, 0xcd, 0x72, 0x95, 0xba, 0xb5, 0xb2, 0x5d, 0xe3, 0x3e, 0xfc, 0x82, 0xa0, 0xd0, 0x69, 0xc0, - 0xc2, 0xa7, 0xbb, 0x51, 0xea, 0x31, 0xb9, 0x29, 0x2f, 0x0c, 0x06, 0xee, 0xa7, 0x62, 0xc4, 0x38, - 0x83, 0xbf, 0x43, 0xb0, 0x63, 0xc3, 0x88, 0x81, 0x4f, 0x64, 0x2a, 0xd4, 0xcd, 0xc3, 0x8f, 0x72, - 0xb2, 0x7f, 0xa0, 0xe0, 0x3c, 0xcb, 0x38, 0xef, 0xc7, 0xfb, 0xba, 0x71, 0xe6, 0x53, 0xcb, 0xe7, - 0x08, 0x72, 0x6c, 0x7c, 0xc0, 0xe5, 0x9e, 0xe6, 0x92, 0x03, 0x89, 0xa2, 0x65, 0x15, 0xef, 0xa7, - 0xaa, 0x6f, 0x45, 0x10, 0xfd, 0x4e, 0x44, 0xed, 0x2e, 0xfe, 0x0c, 0xc1, 0x78, 0x6b, 0x7a, 0x98, - 0xeb, 0x1d, 0x0d, 0x29, 0xab, 0x2c, 0x64, 0x97, 0xed, 0xaf, 0x81, 0x39, 0x0c, 0x86, 0xbf, 0x44, - 0x00, 0x89, 0xe9, 0xe2, 0x48, 0x86, 0x03, 0x23, 0x85, 0x33, 0xb5, 0x84, 0x8d, 0x23, 0x49, 0xd6, - 0xb6, 0xc5, 0x70, 0xf8, 0x47, 0x04, 0x53, 0x6d, 0xe7, 0x8f, 0xe3, 0x3d, 0x4d, 0xb7, 0x83, 0x29, - 0x2f, 0x0e, 0x04, 0x8b, 0xb9, 0xcf, 0x33, 0xee, 0x47, 0xf0, 0x6c, 0xef, 0xae, 0x50, 0x26, 0x0c, - 0x8f, 0x7f, 0x45, 0xb0, 0xbb, 0xd3, 0x4d, 0x7f, 0x32, 0x0b, 0x9b, 0x76, 0x48, 0xe5, 0xcc, 0xa0, - 0xc8, 0xd8, 0x95, 0x63, 0xcc, 0x15, 0x0d, 0x1f, 0xed, 0xe6, 0x4a, 0x3c, 0x75, 0x0b, 0x6f, 0x2a, - 0xe7, 0xef, 0x3f, 0x2a, 0xa2, 0x07, 0x8f, 0x8a, 0xe8, 0xcf, 0x47, 0x45, 0xf4, 0xf1, 0x7a, 0x71, - 0xe8, 0xc1, 0x7a, 0x71, 0xe8, 0xf7, 0xf5, 0xe2, 0xd0, 0xdb, 0x47, 0x93, 0x1f, 0x4c, 0xc4, 0xb3, - 0xca, 0x36, 0xd5, 0x1d, 0xd3, 0xa2, 0xae, 0x6d, 0xd5, 0xf4, 0xdb, 0x2d, 0xd5, 0xec, 0xd3, 0xa9, - 0x9a, 0x67, 0xff, 0x09, 0x2e, 0xfe, 0x13, 0x00, 0x00, 0xff, 0xff, 0x6a, 0xbd, 0x35, 0xd0, 0x04, - 0x15, 0x00, 0x00, + // 1483 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4f, 0x6c, 0x13, 0xc7, + 0x1a, 0xf7, 0xd8, 0xb1, 0x43, 0xbe, 0x3c, 0xc2, 0x63, 0x5e, 0x04, 0x66, 0xe1, 0x39, 0x61, 0xf9, + 0xe7, 0x04, 0xec, 0x7d, 0x49, 0xe0, 0x41, 0x81, 0x56, 0xc4, 0x14, 0x12, 0x54, 0x68, 0xc9, 0x8a, + 0x52, 0xa9, 0x3d, 0xd0, 0xf1, 0x7a, 0x30, 0x4b, 0xd6, 0x3b, 0x66, 0x77, 0x1d, 0x70, 0x11, 0x97, + 0x56, 0xea, 0xb1, 0xaa, 0x54, 0x55, 0xad, 0xda, 0x73, 0x5b, 0x89, 0x4b, 0x4f, 0x55, 0x8f, 0xfd, + 0x73, 0x42, 0xea, 0x05, 0xa9, 0x97, 0x9e, 0x68, 0x05, 0x95, 0xb8, 0x73, 0xe8, 0xb9, 0xda, 0x99, + 0xd9, 0xf5, 0xae, 0x13, 0xff, 0x25, 0xad, 0x7a, 0xf2, 0xce, 0xcc, 0xf7, 0xe7, 0xf7, 0xfb, 0xbe, + 0x99, 0x6f, 0xbe, 0x31, 0x1c, 0x5c, 0x6b, 0x58, 0x06, 0xb1, 0xcd, 0x77, 0xa8, 0xe6, 0xd0, 0xaa, + 0xe9, 0x7a, 0x4e, 0x53, 0x5b, 0x9b, 0x2b, 0x53, 0x8f, 0xcc, 0x69, 0xb7, 0x1a, 0xd4, 0x69, 0x16, + 0xeb, 0x0e, 0xf3, 0x18, 0x56, 0x42, 0xb9, 0x62, 0x20, 0x57, 0x94, 0x72, 0xca, 0x4c, 0x17, 0x1b, + 0xa1, 0x30, 0x37, 0xa3, 0xec, 0xa9, 0x32, 0x56, 0xb5, 0xa8, 0x46, 0xea, 0xa6, 0x46, 0x6c, 0x9b, + 0x79, 0xc4, 0x33, 0x99, 0xed, 0xca, 0xd5, 0x59, 0x83, 0xb9, 0x35, 0xe6, 0x6a, 0x65, 0xe2, 0x52, + 0xe1, 0x3d, 0xb4, 0x53, 0x27, 0x55, 0xd3, 0xe6, 0xc2, 0x52, 0x76, 0xb2, 0xca, 0xaa, 0x8c, 0x7f, + 0x6a, 0xfe, 0x97, 0x9c, 0xcd, 0x45, 0x2d, 0x04, 0xba, 0x06, 0x33, 0xa5, 0x96, 0x3a, 0x09, 0x78, + 0xc5, 0xb7, 0x7b, 0x99, 0x38, 0xa4, 0xe6, 0xea, 0xf4, 0x56, 0x83, 0xba, 0x9e, 0xba, 0x02, 0xff, + 0x89, 0xcd, 0xba, 0x75, 0x66, 0xbb, 0x14, 0x9f, 0x84, 0x4c, 0x9d, 0xcf, 0x64, 0xd1, 0x34, 0xca, + 0x8f, 0xcf, 0xab, 0xc5, 0xce, 0x41, 0x28, 0x4a, 0x5d, 0xa9, 0xa1, 0xfe, 0x31, 0x0a, 0x3b, 0xb9, + 0xcd, 0x8b, 0xa6, 0xeb, 0xe9, 0xd4, 0x60, 0x4e, 0x25, 0x70, 0x87, 0x09, 0x00, 0xf1, 0x3c, 0xc7, + 0x2c, 0x37, 0x3c, 0xea, 0xdb, 0x4e, 0xe5, 0xc7, 0xe7, 0x17, 0xbb, 0xd9, 0xee, 0x60, 0xa8, 0xf8, + 0x0a, 0x6d, 0x5e, 0x25, 0x56, 0x83, 0x5e, 0xb0, 0xeb, 0x0d, 0x4f, 0x8f, 0x18, 0xc5, 0xff, 0x86, + 0x14, 0xb1, 0xac, 0x6c, 0x72, 0x1a, 0xe5, 0xb7, 0xe8, 0xfe, 0x27, 0x3e, 0x0f, 0xd0, 0x8a, 0x61, + 0x36, 0xc5, 0x09, 0x1d, 0x2c, 0x8a, 0x70, 0x15, 0xfd, 0x70, 0x15, 0x45, 0xba, 0x5b, 0x7c, 0xaa, + 0x54, 0xfa, 0xd1, 0x23, 0x9a, 0xca, 0x6e, 0x18, 0xbb, 0x68, 0xda, 0xab, 0xdc, 0x25, 0x9e, 0x80, + 0xa4, 0x59, 0xe1, 0xd1, 0x19, 0xd3, 0x93, 0x66, 0x45, 0xa9, 0x00, 0x2c, 0x3a, 0x0e, 0x69, 0x8a, + 0xd5, 0xab, 0x90, 0x59, 0xf3, 0xe1, 0x05, 0x1c, 0x5f, 0x1a, 0x86, 0x63, 0x84, 0xa0, 0xb4, 0xa6, + 0x3c, 0x45, 0xb0, 0xe5, 0x12, 0xa9, 0x0b, 0x27, 0x6f, 0xb7, 0x39, 0x59, 0x1e, 0xc6, 0x49, 0x60, + 0x4d, 0x78, 0x73, 0xcf, 0xd9, 0x9e, 0xd3, 0x0c, 0xdd, 0x35, 0x61, 0x3c, 0x32, 0xed, 0x87, 0x76, + 0x95, 0x36, 0x25, 0x69, 0xff, 0x13, 0x5f, 0x81, 0x34, 0x17, 0xe5, 0xe1, 0x7e, 0x7e, 0x9a, 0xc2, + 0xd8, 0xc9, 0xe4, 0x09, 0xa4, 0x7c, 0x9b, 0x04, 0x68, 0xad, 0xe0, 0x2c, 0x64, 0x5c, 0xcf, 0x31, + 0xed, 0xaa, 0xf0, 0xbe, 0x9c, 0xd0, 0xe5, 0x18, 0x63, 0x48, 0x99, 0xb6, 0xc7, 0x01, 0xa4, 0x96, + 0x13, 0xba, 0x3f, 0xc0, 0x3b, 0x20, 0x7d, 0xdd, 0x62, 0xc4, 0xe3, 0xc9, 0x46, 0xcb, 0x09, 0x5d, + 0x0c, 0xb1, 0x02, 0xa3, 0x65, 0xc6, 0x2c, 0x4a, 0xec, 0xec, 0x88, 0xbf, 0x3f, 0x96, 0x13, 0x7a, + 0x30, 0x81, 0x27, 0x61, 0xc4, 0x32, 0xed, 0xd5, 0x6c, 0x5a, 0xda, 0xe7, 0x23, 0x7c, 0x15, 0xd2, + 0xc4, 0x4f, 0x6b, 0x36, 0x33, 0x3c, 0xc1, 0xd6, 0xbe, 0xf0, 0x91, 0x70, 0x73, 0xf8, 0x32, 0xa4, + 0x6a, 0xa4, 0x9e, 0x1d, 0xe5, 0x56, 0x4f, 0x3f, 0x4f, 0xe2, 0x7c, 0xce, 0x35, 0x52, 0x2f, 0x8d, + 0xca, 0x54, 0x28, 0xb7, 0x61, 0x6b, 0xec, 0x74, 0xfc, 0x5d, 0x69, 0x53, 0xbf, 0x42, 0x90, 0x5d, + 0x2f, 0x2d, 0x2b, 0x4a, 0x09, 0x46, 0x1d, 0x31, 0x25, 0x77, 0x6b, 0xd7, 0x92, 0x22, 0xb4, 0x4b, + 0x23, 0x0f, 0x1e, 0x4d, 0x25, 0xf4, 0x40, 0x11, 0x2f, 0xc5, 0x0e, 0xb2, 0xc0, 0x7e, 0xa8, 0xe7, + 0x41, 0x16, 0x00, 0xa2, 0x27, 0x59, 0xcd, 0xc3, 0x0e, 0x0e, 0x54, 0xba, 0x69, 0x5e, 0x78, 0x39, + 0x28, 0x50, 0x6d, 0xc7, 0x5a, 0x7d, 0x4b, 0xd6, 0xb2, 0xa8, 0xa4, 0x64, 0x74, 0x06, 0x32, 0x02, + 0x58, 0x3f, 0x35, 0x32, 0x46, 0x48, 0xea, 0xa9, 0x1e, 0x28, 0x31, 0xe3, 0x25, 0x66, 0x57, 0x3a, + 0x42, 0x69, 0x2b, 0x63, 0xc9, 0x61, 0xcb, 0x98, 0x7a, 0x1f, 0xc1, 0xee, 0x0d, 0xdd, 0xfe, 0x13, + 0x33, 0xb5, 0x17, 0xa6, 0x96, 0xa8, 0xa7, 0x4b, 0xaf, 0x97, 0x58, 0xa5, 0x61, 0xd1, 0x12, 0xb1, + 0x88, 0x6d, 0x04, 0xdc, 0xd4, 0x9b, 0x30, 0xdd, 0x59, 0x44, 0x72, 0x3a, 0x0f, 0x5b, 0xca, 0x62, + 0x2a, 0x20, 0x35, 0xdb, 0x8d, 0xd4, 0xa2, 0x61, 0xb0, 0x86, 0xed, 0x05, 0x56, 0x42, 0x5d, 0xf5, + 0x29, 0x82, 0x89, 0xf8, 0x22, 0xbe, 0x08, 0xff, 0x22, 0x62, 0xe6, 0x9a, 0x4d, 0x6a, 0x54, 0x24, + 0xac, 0x34, 0xf3, 0xec, 0xd1, 0xd4, 0x81, 0x9b, 0x2e, 0xb3, 0x4f, 0xaa, 0x72, 0xf5, 0x55, 0x52, + 0xa3, 0xea, 0x74, 0x93, 0xd4, 0xac, 0xf8, 0x94, 0x3e, 0x1e, 0x19, 0xe1, 0xf7, 0x11, 0x8c, 0x4a, + 0x6f, 0xd9, 0x14, 0x07, 0xba, 0x2b, 0x16, 0xb6, 0x00, 0xe1, 0x59, 0x66, 0xda, 0xa5, 0x15, 0x3f, + 0xe8, 0xcf, 0x1e, 0x4d, 0xfd, 0x57, 0x38, 0x92, 0x7a, 0x81, 0x93, 0x60, 0x78, 0xff, 0xd7, 0xa9, + 0x7c, 0xd5, 0xf4, 0x6e, 0x34, 0xca, 0x45, 0x83, 0xd5, 0x34, 0xd9, 0x26, 0x88, 0x9f, 0x82, 0x5b, + 0x59, 0xd5, 0xbc, 0x66, 0x9d, 0xba, 0xdc, 0xa2, 0xab, 0x07, 0xce, 0x55, 0x2a, 0x37, 0x89, 0x7f, + 0x96, 0x7d, 0x64, 0x6d, 0x17, 0x79, 0x7c, 0x33, 0xa2, 0xe7, 0xd9, 0x8c, 0x7b, 0x36, 0xf6, 0x23, + 0x33, 0xb7, 0x08, 0x69, 0x3f, 0xac, 0x41, 0xda, 0x0e, 0x74, 0x4b, 0x9b, 0xaf, 0xcf, 0x6f, 0x2a, + 0xb9, 0x1d, 0x85, 0xe6, 0xe6, 0x6d, 0xc6, 0x43, 0xb0, 0x9d, 0x63, 0x7d, 0xe3, 0x06, 0x33, 0xc3, + 0x48, 0x60, 0x18, 0x69, 0xe5, 0x5d, 0xe7, 0xdf, 0xea, 0x67, 0x48, 0x36, 0x5b, 0x52, 0x52, 0x72, + 0x79, 0x0f, 0xc1, 0x84, 0xbf, 0x7e, 0x8d, 0x34, 0xbc, 0x1b, 0xcc, 0x31, 0xbd, 0xa6, 0x8c, 0xdc, + 0x4c, 0x2f, 0x56, 0x8b, 0x81, 0x42, 0x69, 0x4e, 0xe6, 0x7c, 0x46, 0xe4, 0xdc, 0x8e, 0x2e, 0x06, + 0x99, 0x8f, 0x4f, 0xea, 0x5b, 0xe3, 0x63, 0x15, 0x26, 0x44, 0xc4, 0x19, 0x5b, 0x6d, 0xd4, 0xcf, + 0x3a, 0xb6, 0x7f, 0x41, 0x18, 0x8e, 0x1d, 0x5c, 0x10, 0x86, 0x63, 0xab, 0x57, 0x64, 0x81, 0x0c, + 0x65, 0x22, 0x9d, 0x61, 0x8b, 0xae, 0x9f, 0xf2, 0x1e, 0xc0, 0x45, 0x3a, 0x65, 0x58, 0xf6, 0xc1, + 0x36, 0x59, 0x78, 0x5c, 0x66, 0xad, 0xd1, 0x8d, 0x5d, 0xbf, 0x1e, 0x56, 0xdc, 0x40, 0x28, 0xda, + 0x95, 0x0e, 0x5a, 0x71, 0xc3, 0x5a, 0x6b, 0xc0, 0x2e, 0x6e, 0x96, 0x97, 0x0a, 0x7f, 0xe6, 0xdc, + 0x9d, 0xba, 0xe9, 0x34, 0x57, 0x1a, 0xb4, 0x41, 0x37, 0x6d, 0x37, 0x7f, 0x83, 0x60, 0x6f, 0x47, + 0x2f, 0x21, 0x8d, 0xa5, 0xf6, 0x02, 0x5b, 0xe8, 0xc6, 0x23, 0x66, 0x81, 0x53, 0xda, 0xfc, 0x2a, + 0xfb, 0x02, 0x6c, 0x5f, 0xe7, 0x66, 0xdd, 0xfd, 0x33, 0xd9, 0x6a, 0x1a, 0x52, 0xf9, 0xb1, 0xe0, + 0xd2, 0xbf, 0x2e, 0xcf, 0xef, 0x12, 0xf5, 0xc2, 0x2d, 0xf6, 0x57, 0x84, 0xf6, 0x7b, 0x04, 0xfb, + 0xbb, 0x39, 0x0a, 0xa3, 0xfb, 0x1a, 0x8c, 0x07, 0xc7, 0xcb, 0xa4, 0x43, 0x46, 0x38, 0x6a, 0x61, + 0xd3, 0xa2, 0x3c, 0xff, 0xc1, 0x36, 0x48, 0x73, 0x0a, 0xf8, 0x63, 0x04, 0x19, 0xf1, 0x6a, 0xc2, + 0xc5, 0x9e, 0xbd, 0x57, 0xec, 0xc1, 0xa6, 0x68, 0x7d, 0xcb, 0x0b, 0x04, 0xea, 0xec, 0xbb, 0x3f, + 0xff, 0xfe, 0x51, 0x72, 0x3f, 0x56, 0xb5, 0x2e, 0x6f, 0x55, 0xf1, 0x74, 0xc3, 0x5f, 0x20, 0x18, + 0x8f, 0x34, 0x6f, 0x78, 0x61, 0x88, 0xc6, 0x50, 0x39, 0x3a, 0x98, 0x92, 0x84, 0x79, 0x98, 0xc3, + 0x3c, 0x80, 0xf7, 0x69, 0x5d, 0x9f, 0xd4, 0x02, 0xd7, 0x97, 0x08, 0xc6, 0xc2, 0x23, 0x86, 0xe7, + 0x7b, 0x3a, 0x5c, 0xd7, 0xe7, 0x29, 0x0b, 0x03, 0xe9, 0x48, 0x8c, 0xff, 0xe3, 0x18, 0x67, 0x71, + 0xbe, 0x0f, 0x8c, 0xda, 0x5d, 0xb3, 0x72, 0x0f, 0xff, 0x80, 0x60, 0x7b, 0x08, 0x34, 0xe8, 0xb4, + 0xf0, 0xff, 0xfb, 0x76, 0x1e, 0xeb, 0x08, 0x95, 0xe3, 0x03, 0xeb, 0x49, 0xe0, 0xa7, 0x38, 0xf0, + 0x63, 0x78, 0xa1, 0x0f, 0xe0, 0x85, 0x72, 0xb3, 0x50, 0x66, 0x76, 0xa5, 0x60, 0x56, 0x04, 0x87, + 0x1f, 0x11, 0x64, 0x3b, 0x35, 0x58, 0xf8, 0x54, 0x37, 0x48, 0x3d, 0x3a, 0x37, 0xe5, 0xf4, 0x70, + 0xca, 0x83, 0xec, 0x18, 0xd9, 0xce, 0xe0, 0xaf, 0x11, 0x6c, 0x6b, 0x6b, 0x31, 0xf0, 0xf1, 0xbe, + 0x36, 0xea, 0xfa, 0xe6, 0x47, 0x39, 0x31, 0xb8, 0xa2, 0xc4, 0x3c, 0xc3, 0x31, 0xef, 0xc3, 0x7b, + 0xbb, 0x61, 0x16, 0x5d, 0xcb, 0xa7, 0x08, 0xd2, 0xbc, 0x7d, 0xc0, 0x85, 0x9e, 0xee, 0xa2, 0x0d, + 0x89, 0x52, 0xec, 0x57, 0x7c, 0x90, 0x5d, 0x7d, 0xdb, 0x57, 0xd1, 0xee, 0xfa, 0xd0, 0xee, 0xe1, + 0x4f, 0x10, 0x8c, 0xb5, 0xba, 0x87, 0xd9, 0xde, 0xd1, 0x08, 0x64, 0x95, 0xf9, 0xfe, 0x65, 0x07, + 0x2b, 0x60, 0x16, 0x57, 0xc3, 0x9f, 0x23, 0x80, 0x48, 0x77, 0x71, 0xb8, 0x8f, 0x03, 0x13, 0x08, + 0xf7, 0x55, 0x12, 0xda, 0x5b, 0x92, 0x7e, 0xcb, 0x16, 0xd7, 0xc3, 0xdf, 0x21, 0x98, 0xdc, 0xb0, + 0xff, 0x38, 0xd6, 0xd3, 0xf5, 0x46, 0x6a, 0xca, 0x8b, 0x43, 0xa9, 0x85, 0xd8, 0xe7, 0x38, 0xf6, + 0xc3, 0x78, 0xa6, 0x77, 0x55, 0x28, 0x50, 0xae, 0x8f, 0x7f, 0x42, 0xb0, 0xb3, 0xd3, 0x4d, 0x7f, + 0xa2, 0x1f, 0x34, 0x1b, 0x69, 0x2a, 0x67, 0x86, 0xd5, 0x0c, 0xa9, 0x1c, 0xe5, 0x54, 0x8a, 0xf8, + 0x48, 0x37, 0x2a, 0x61, 0xd7, 0x2d, 0xd9, 0x94, 0xce, 0x3f, 0x78, 0x9c, 0x43, 0x0f, 0x1f, 0xe7, + 0xd0, 0x6f, 0x8f, 0x73, 0xe8, 0xc3, 0x27, 0xb9, 0xc4, 0xc3, 0x27, 0xb9, 0xc4, 0x2f, 0x4f, 0x72, + 0x89, 0x37, 0x8f, 0x44, 0x1f, 0x4c, 0xd4, 0x31, 0x0a, 0x26, 0xd3, 0x2c, 0x62, 0x30, 0xdb, 0x34, + 0x2a, 0xda, 0x9d, 0x96, 0x69, 0xfe, 0x74, 0x2a, 0x67, 0xf8, 0x3f, 0xac, 0x0b, 0x7f, 0x06, 0x00, + 0x00, 0xff, 0xff, 0x66, 0xb8, 0xf3, 0x95, 0x52, 0x16, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2083,7 +2243,7 @@ func (m *QueryListRecordsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *QueryListRecordsRequest_ReferenceInput) Marshal() (dAtA []byte, err error) { +func (m *QueryListRecordsRequest_LinkInput) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2093,12 +2253,12 @@ func (m *QueryListRecordsRequest_ReferenceInput) Marshal() (dAtA []byte, err err return dAtA[:n], nil } -func (m *QueryListRecordsRequest_ReferenceInput) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryListRecordsRequest_LinkInput) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryListRecordsRequest_ReferenceInput) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryListRecordsRequest_LinkInput) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2113,6 +2273,92 @@ func (m *QueryListRecordsRequest_ReferenceInput) MarshalToSizedBuffer(dAtA []byt return len(dAtA) - i, nil } +func (m *QueryListRecordsRequest_ArrayInput) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryListRecordsRequest_ArrayInput) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryListRecordsRequest_ArrayInput) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Values) > 0 { + for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Values[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryListRecordsRequest_MapInput) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryListRecordsRequest_MapInput) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryListRecordsRequest_MapInput) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Values) > 0 { + for k := range m.Values { + v := m.Values[k] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintQuery(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintQuery(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func (m *QueryListRecordsRequest_ValueInput) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2133,23 +2379,98 @@ func (m *QueryListRecordsRequest_ValueInput) MarshalToSizedBuffer(dAtA []byte) ( _ = i var l int _ = l - if len(m.Values) > 0 { - for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Values[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + if m.Value != nil { + { + size := m.Value.Size() + i -= size + if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { + return 0, err } - i-- - dAtA[i] = 0x3a } } - if m.Reference != nil { + return len(dAtA) - i, nil +} + +func (m *QueryListRecordsRequest_ValueInput_String_) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryListRecordsRequest_ValueInput_String_) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.String_) + copy(dAtA[i:], m.String_) + i = encodeVarintQuery(dAtA, i, uint64(len(m.String_))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} +func (m *QueryListRecordsRequest_ValueInput_Int) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryListRecordsRequest_ValueInput_Int) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintQuery(dAtA, i, uint64(m.Int)) + i-- + dAtA[i] = 0x10 + return len(dAtA) - i, nil +} +func (m *QueryListRecordsRequest_ValueInput_Float) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryListRecordsRequest_ValueInput_Float) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Float)))) + i-- + dAtA[i] = 0x19 + return len(dAtA) - i, nil +} +func (m *QueryListRecordsRequest_ValueInput_Boolean) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryListRecordsRequest_ValueInput_Boolean) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i-- + if m.Boolean { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + return len(dAtA) - i, nil +} +func (m *QueryListRecordsRequest_ValueInput_Link) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryListRecordsRequest_ValueInput_Link) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.Link) + copy(dAtA[i:], m.Link) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Link))) + i-- + dAtA[i] = 0x2a + return len(dAtA) - i, nil +} +func (m *QueryListRecordsRequest_ValueInput_Array) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryListRecordsRequest_ValueInput_Array) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Array != nil { { - size, err := m.Reference.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Array.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2159,44 +2480,29 @@ func (m *QueryListRecordsRequest_ValueInput) MarshalToSizedBuffer(dAtA []byte) ( i-- dAtA[i] = 0x32 } - if m.Boolean { - i-- - if m.Boolean { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + return len(dAtA) - i, nil +} +func (m *QueryListRecordsRequest_ValueInput_Map) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryListRecordsRequest_ValueInput_Map) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Map != nil { + { + size, err := m.Map.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x28 - } - if m.Float != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Float)))) - i-- - dAtA[i] = 0x21 - } - if m.Int != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Int)) - i-- - dAtA[i] = 0x18 - } - if len(m.String_) > 0 { - i -= len(m.String_) - copy(dAtA[i:], m.String_) - i = encodeVarintQuery(dAtA, i, uint64(len(m.String_))) - i-- - dAtA[i] = 0x12 - } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa + dAtA[i] = 0x3a } return len(dAtA) - i, nil } - func (m *QueryListRecordsRequest_KeyValueInput) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -3085,7 +3391,7 @@ func (m *QueryListRecordsRequest) Size() (n int) { return n } -func (m *QueryListRecordsRequest_ReferenceInput) Size() (n int) { +func (m *QueryListRecordsRequest_LinkInput) Size() (n int) { if m == nil { return 0 } @@ -3098,33 +3404,12 @@ func (m *QueryListRecordsRequest_ReferenceInput) Size() (n int) { return n } -func (m *QueryListRecordsRequest_ValueInput) Size() (n int) { +func (m *QueryListRecordsRequest_ArrayInput) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Type) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.String_) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.Int != 0 { - n += 1 + sovQuery(uint64(m.Int)) - } - if m.Float != 0 { - n += 9 - } - if m.Boolean { - n += 2 - } - if m.Reference != nil { - l = m.Reference.Size() - n += 1 + l + sovQuery(uint64(l)) - } if len(m.Values) > 0 { for _, e := range m.Values { l = e.Size() @@ -3134,6 +3419,111 @@ func (m *QueryListRecordsRequest_ValueInput) Size() (n int) { return n } +func (m *QueryListRecordsRequest_MapInput) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Values) > 0 { + for k, v := range m.Values { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovQuery(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovQuery(uint64(len(k))) + l + n += mapEntrySize + 1 + sovQuery(uint64(mapEntrySize)) + } + } + return n +} + +func (m *QueryListRecordsRequest_ValueInput) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value != nil { + n += m.Value.Size() + } + return n +} + +func (m *QueryListRecordsRequest_ValueInput_String_) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.String_) + n += 1 + l + sovQuery(uint64(l)) + return n +} +func (m *QueryListRecordsRequest_ValueInput_Int) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovQuery(uint64(m.Int)) + return n +} +func (m *QueryListRecordsRequest_ValueInput_Float) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *QueryListRecordsRequest_ValueInput_Boolean) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 2 + return n +} +func (m *QueryListRecordsRequest_ValueInput_Link) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Link) + n += 1 + l + sovQuery(uint64(l)) + return n +} +func (m *QueryListRecordsRequest_ValueInput_Array) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Array != nil { + l = m.Array.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} +func (m *QueryListRecordsRequest_ValueInput_Map) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Map != nil { + l = m.Map.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} func (m *QueryListRecordsRequest_KeyValueInput) Size() (n int) { if m == nil { return 0 @@ -3746,7 +4136,7 @@ func (m *QueryListRecordsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryListRecordsRequest_ReferenceInput) Unmarshal(dAtA []byte) error { +func (m *QueryListRecordsRequest_LinkInput) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3769,10 +4159,10 @@ func (m *QueryListRecordsRequest_ReferenceInput) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ReferenceInput: wiretype end group for non-group") + return fmt.Errorf("proto: LinkInput: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ReferenceInput: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: LinkInput: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3828,7 +4218,7 @@ func (m *QueryListRecordsRequest_ReferenceInput) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryListRecordsRequest_ValueInput) Unmarshal(dAtA []byte) error { +func (m *QueryListRecordsRequest_ArrayInput) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3851,163 +4241,13 @@ func (m *QueryListRecordsRequest_ValueInput) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ValueInput: wiretype end group for non-group") + return fmt.Errorf("proto: ArrayInput: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ValueInput: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ArrayInput: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.String_ = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int", wireType) - } - m.Int = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Int |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Float", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Float = float64(math.Float64frombits(v)) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Boolean", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Boolean = bool(v != 0) - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reference", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Reference == nil { - m.Reference = &QueryListRecordsRequest_ReferenceInput{} - } - if err := m.Reference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) } @@ -4062,6 +4302,421 @@ func (m *QueryListRecordsRequest_ValueInput) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryListRecordsRequest_MapInput) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MapInput: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MapInput: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Values == nil { + m.Values = make(map[string]*QueryListRecordsRequest_ValueInput) + } + var mapkey string + var mapvalue *QueryListRecordsRequest_ValueInput + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthQuery + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthQuery + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthQuery + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLengthQuery + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &QueryListRecordsRequest_ValueInput{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Values[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryListRecordsRequest_ValueInput) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ValueInput: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValueInput: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = &QueryListRecordsRequest_ValueInput_String_{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Value = &QueryListRecordsRequest_ValueInput_Int{v} + case 3: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Float", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Value = &QueryListRecordsRequest_ValueInput_Float{float64(math.Float64frombits(v))} + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Boolean", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Value = &QueryListRecordsRequest_ValueInput_Boolean{b} + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Link", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = &QueryListRecordsRequest_ValueInput_Link{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Array", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &QueryListRecordsRequest_ArrayInput{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &QueryListRecordsRequest_ValueInput_Array{v} + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &QueryListRecordsRequest_MapInput{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &QueryListRecordsRequest_ValueInput_Map{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *QueryListRecordsRequest_KeyValueInput) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/registry/types/types.go b/x/registry/types/types.go index a9e31815..9bfc14ea 100644 --- a/x/registry/types/types.go +++ b/x/registry/types/types.go @@ -4,7 +4,7 @@ import ( "crypto/sha256" "github.com/cerc-io/laconicd/x/registry/helpers" - canonicalJson "github.com/gibson042/canonicaljson-go" + "github.com/gibson042/canonicaljson-go" ) const ( @@ -13,38 +13,43 @@ const ( AuthorityUnderAuction = "auction" ) +// TODO if schema records are to be more permissive than allowing a map of fields, this type will +// become specific to content records. schema records will either occupy a new message or have new +// more general purpose helper types. + +type AttributeMap map[string]interface{} + // ReadablePayload represents a signed record payload that can be serialized from/to YAML. type ReadablePayload struct { - Record map[string]interface{} `json:"record"` - Signatures []Signature `json:"signatures"` + RecordAttributes AttributeMap `json:"record" yaml:"record"` + Signatures []Signature `json:"signatures" yaml:"signatures"` } // ReadableRecord represents a WNS record. type ReadableRecord struct { - ID string `json:"id,omitempty"` - Names []string `json:"names,omitempty"` - BondID string `json:"bondId,omitempty"` - CreateTime string `json:"createTime,omitempty"` - ExpiryTime string `json:"expiryTime,omitempty"` - Deleted bool `json:"deleted,omitempty"` - Owners []string `json:"owners,omitempty"` - Attributes map[string]interface{} `json:"attributes,omitempty"` + ID string `json:"id,omitempty"` + Names []string `json:"names,omitempty"` + BondID string `json:"bondId,omitempty"` + CreateTime string `json:"createTime,omitempty"` + ExpiryTime string `json:"expiryTime,omitempty"` + Deleted bool `json:"deleted,omitempty"` + Owners []string `json:"owners,omitempty"` + Attributes AttributeMap `json:"attributes,omitempty"` } // ToPayload converts PayloadEncodable to Payload object. // Why? Because go-amino can't handle maps: https://github.com/tendermint/go-amino/issues/4. func (payloadObj *ReadablePayload) ToPayload() Payload { // Note: record directly contains the attributes here - attributes := helpers.MarshalMapToJSONBytes(payloadObj.Record) + attributes := payloadObj.RecordAttributes payload := Payload{ Record: &Record{ Deleted: false, Owners: nil, - Attributes: attributes, + Attributes: helpers.MustMarshalJSON(attributes), }, Signatures: payloadObj.Signatures, } - // TODO rm error return payload } @@ -52,12 +57,28 @@ func (payloadObj *ReadablePayload) ToPayload() Payload { func (payload Payload) ToReadablePayload() ReadablePayload { var encodable ReadablePayload - encodable.Record = helpers.UnMarshalMapFromJSONBytes(payload.Record.Attributes) + encodable.RecordAttributes = helpers.MustUnmarshalJSON[AttributeMap](payload.Record.Attributes) encodable.Signatures = payload.Signatures return encodable } +// ToRecordObj converts Record to RecordObj. +// Why? Because go-amino can't handle maps: https://github.com/tendermint/go-amino/issues/4. +func (r *ReadableRecord) ToRecordObj() (Record, error) { + var resourceObj Record + + resourceObj.Id = r.ID + resourceObj.BondId = r.BondID + resourceObj.CreateTime = r.CreateTime + resourceObj.ExpiryTime = r.ExpiryTime + resourceObj.Deleted = r.Deleted + resourceObj.Owners = r.Owners + resourceObj.Attributes = helpers.MustMarshalJSON(r.Attributes) + + return resourceObj, nil +} + // ToReadableRecord converts Record to a serializable object func (r *Record) ToReadableRecord() ReadableRecord { var resourceObj ReadableRecord @@ -69,34 +90,16 @@ func (r *Record) ToReadableRecord() ReadableRecord { resourceObj.Deleted = r.Deleted resourceObj.Owners = r.Owners resourceObj.Names = r.Names - resourceObj.Attributes = helpers.UnMarshalMapFromJSONBytes(r.Attributes) + resourceObj.Attributes = helpers.MustUnmarshalJSON[AttributeMap](r.Attributes) return resourceObj } -// ToRecordObj converts Record to RecordObj. -// Why? Because go-amino can't handle maps: https://github.com/tendermint/go-amino/issues/4. -func (r *ReadableRecord) ToRecordObj() (Record, error) { - attributes := helpers.MarshalMapToJSONBytes(r.Attributes) - - var resourceObj Record - - resourceObj.Id = r.ID - resourceObj.BondId = r.BondID - resourceObj.CreateTime = r.CreateTime - resourceObj.ExpiryTime = r.ExpiryTime - resourceObj.Deleted = r.Deleted - resourceObj.Owners = r.Owners - resourceObj.Attributes = attributes - - return resourceObj, nil -} - // CanonicalJSON returns the canonical JSON representation of the record. func (r *ReadableRecord) CanonicalJSON() []byte { - bytes, err := canonicalJson.Marshal(r.Attributes) + bytes, err := canonicaljson.Marshal(r.Attributes) if err != nil { - panic("Record marshal error.") + panic("error marshaling record: " + err.Error()) } return bytes