From 2f857f9af2573087a52e0e2ec928f0fc49bd0108 Mon Sep 17 00:00:00 2001 From: sandhilt <6170125+sandhilt@users.noreply.github.com> Date: Thu, 6 Feb 2025 18:26:19 -0300 Subject: [PATCH] feat: add Application model and related pagination support in GraphQL --- api/reader.graphql | 59 + pkg/reader/graph/generated.go | 1842 ++++++++++++++++++++++++++++++-- pkg/reader/model/generated.go | 37 + pkg/reader/reader.resolvers.go | 36 + 4 files changed, 1865 insertions(+), 109 deletions(-) diff --git a/api/reader.graphql b/api/reader.graphql index 1ca4202..18335fc 100644 --- a/api/reader.graphql +++ b/api/reader.graphql @@ -54,6 +54,21 @@ type Input { blockTimestamp: BigInt prevRandao: String + + "The application that produced the input" + application: Application! + + "Get applications associated with the input with support for pagination" + applications(first: Int, last: Int, after: String, before: String): AppConnection! +} + +type Application { + "Application ID" + id: String! + "Application name" + name: String! + "Application Address" + address: String! } "Representation of a transaction that can be carried out on the base layer blockchain, such as a transfer of assets" @@ -76,6 +91,9 @@ type Voucher { "The hash of executed transaction" transactionHash: String + + "The application that produced the voucher" + application: Application! } type DelegateCallVoucher { @@ -95,6 +113,9 @@ type DelegateCallVoucher { "The hash of executed transaction" transactionHash: String + + "The application that produced the delegateed voucher" + application: Application! } "Top level queries" @@ -117,6 +138,8 @@ type Query { notices(first: Int, last: Int, after: String, before: String): NoticeConnection! "Get reports with support for pagination" reports(first: Int, last: Int, after: String, before: String): ReportConnection! + "Get apps with support for pagination" + applications(first: Int, last: Int, after: String, before: String, where: AppFilter): InputConnection! } "Pagination entry" @@ -137,6 +160,22 @@ type InputConnection { pageInfo: PageInfo! } +type AppConnection { + "Total number of entries that match the query" + totalCount: Int! + "Pagination entries returned for the current page" + edges: [AppEdge!]! + "Pagination metadata" + pageInfo: PageInfo! +} + +type AppEdge { + "Node instance" + node: Application! + "Pagination cursor" + cursor: String! +} + "Pagination result" type VoucherConnection { "Total number of entries that match the query" @@ -167,6 +206,9 @@ type Notice { payload: String! "Proof object that allows this notice to be validated by the base layer blockchain" proof: Proof + + "The application that produced the notice" + application: Application! } "Pagination entry" @@ -187,6 +229,20 @@ type ReportConnection { pageInfo: PageInfo! } +"Filter object to restrict results depending on input properties" +input AppFilter { + "Filter only inputs with index lower than a given value" + indexLowerThan: Int + "Filter only inputs with index greater than a given value" + indexGreaterThan: Int + + "Filter only apps with name" + name: String + + "Filter only apps with address" + address: String +} + "Filter object to restrict results depending on input properties" input InputFilter { "Filter only inputs with index lower than a given value" @@ -241,6 +297,9 @@ type Report { input: Input! "Report data as a payload in Ethereum hex binary format, starting with '0x'" payload: String! + + "The application that produced the report" + application: Application! } "Pagination entry" diff --git a/pkg/reader/graph/generated.go b/pkg/reader/graph/generated.go index 17e851d..cbb57c6 100644 --- a/pkg/reader/graph/generated.go +++ b/pkg/reader/graph/generated.go @@ -50,7 +50,25 @@ type DirectiveRoot struct { } type ComplexityRoot struct { + AppConnection struct { + Edges func(childComplexity int) int + PageInfo func(childComplexity int) int + TotalCount func(childComplexity int) int + } + + AppEdge struct { + Cursor func(childComplexity int) int + Node func(childComplexity int) int + } + + Application struct { + Address func(childComplexity int) int + ID func(childComplexity int) int + Name func(childComplexity int) int + } + DelegateCallVoucher struct { + Application func(childComplexity int) int Destination func(childComplexity int) int Executed func(childComplexity int) int Index func(childComplexity int) int @@ -72,6 +90,8 @@ type ComplexityRoot struct { } Input struct { + Application func(childComplexity int) int + Applications func(childComplexity int, first *int, last *int, after *string, before *string) int BlockNumber func(childComplexity int) int BlockTimestamp func(childComplexity int) int DelegateCallVouchers func(childComplexity int, first *int, last *int, after *string, before *string) int @@ -102,10 +122,11 @@ type ComplexityRoot struct { } Notice struct { - Index func(childComplexity int) int - Input func(childComplexity int) int - Payload func(childComplexity int) int - Proof func(childComplexity int) int + Application func(childComplexity int) int + Index func(childComplexity int) int + Input func(childComplexity int) int + Payload func(childComplexity int) int + Proof func(childComplexity int) int } NoticeConnection struct { @@ -132,6 +153,7 @@ type ComplexityRoot struct { } Query struct { + Applications func(childComplexity int, first *int, last *int, after *string, before *string, where *model.AppFilter) int DelegateCallVoucher func(childComplexity int, outputIndex int) int DelegateCallVouchers func(childComplexity int, first *int, last *int, after *string, before *string, filter []*model.ConvenientFilter) int Input func(childComplexity int, id string) int @@ -145,9 +167,10 @@ type ComplexityRoot struct { } Report struct { - Index func(childComplexity int) int - Input func(childComplexity int) int - Payload func(childComplexity int) int + Application func(childComplexity int) int + Index func(childComplexity int) int + Input func(childComplexity int) int + Payload func(childComplexity int) int } ReportConnection struct { @@ -162,6 +185,7 @@ type ComplexityRoot struct { } Voucher struct { + Application func(childComplexity int) int Destination func(childComplexity int) int Executed func(childComplexity int) int Index func(childComplexity int) int @@ -186,15 +210,22 @@ type ComplexityRoot struct { type DelegateCallVoucherResolver interface { Input(ctx context.Context, obj *model.DelegateCallVoucher) (*model.Input, error) + + Application(ctx context.Context, obj *model.DelegateCallVoucher) (*model.Application, error) } type InputResolver interface { Vouchers(ctx context.Context, obj *model.Input, first *int, last *int, after *string, before *string) (*model.Connection[*model.Voucher], error) DelegateCallVouchers(ctx context.Context, obj *model.Input, first *int, last *int, after *string, before *string) (*model.Connection[*model.DelegateCallVoucher], error) Notices(ctx context.Context, obj *model.Input, first *int, last *int, after *string, before *string) (*model.Connection[*model.Notice], error) Reports(ctx context.Context, obj *model.Input, first *int, last *int, after *string, before *string) (*model.Connection[*model.Report], error) + + Application(ctx context.Context, obj *model.Input) (*model.Application, error) + Applications(ctx context.Context, obj *model.Input, first *int, last *int, after *string, before *string) (*model.AppConnection, error) } type NoticeResolver interface { Input(ctx context.Context, obj *model.Notice) (*model.Input, error) + + Application(ctx context.Context, obj *model.Notice) (*model.Application, error) } type QueryResolver interface { Input(ctx context.Context, id string) (*model.Input, error) @@ -207,12 +238,17 @@ type QueryResolver interface { DelegateCallVouchers(ctx context.Context, first *int, last *int, after *string, before *string, filter []*model.ConvenientFilter) (*model.Connection[*model.DelegateCallVoucher], error) Notices(ctx context.Context, first *int, last *int, after *string, before *string) (*model.Connection[*model.Notice], error) Reports(ctx context.Context, first *int, last *int, after *string, before *string) (*model.Connection[*model.Report], error) + Applications(ctx context.Context, first *int, last *int, after *string, before *string, where *model.AppFilter) (*model.Connection[*model.Input], error) } type ReportResolver interface { Input(ctx context.Context, obj *model.Report) (*model.Input, error) + + Application(ctx context.Context, obj *model.Report) (*model.Application, error) } type VoucherResolver interface { Input(ctx context.Context, obj *model.Voucher) (*model.Input, error) + + Application(ctx context.Context, obj *model.Voucher) (*model.Application, error) } type executableSchema struct { @@ -234,6 +270,69 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in _ = ec switch typeName + "." + field { + case "AppConnection.edges": + if e.complexity.AppConnection.Edges == nil { + break + } + + return e.complexity.AppConnection.Edges(childComplexity), true + + case "AppConnection.pageInfo": + if e.complexity.AppConnection.PageInfo == nil { + break + } + + return e.complexity.AppConnection.PageInfo(childComplexity), true + + case "AppConnection.totalCount": + if e.complexity.AppConnection.TotalCount == nil { + break + } + + return e.complexity.AppConnection.TotalCount(childComplexity), true + + case "AppEdge.cursor": + if e.complexity.AppEdge.Cursor == nil { + break + } + + return e.complexity.AppEdge.Cursor(childComplexity), true + + case "AppEdge.node": + if e.complexity.AppEdge.Node == nil { + break + } + + return e.complexity.AppEdge.Node(childComplexity), true + + case "Application.address": + if e.complexity.Application.Address == nil { + break + } + + return e.complexity.Application.Address(childComplexity), true + + case "Application.id": + if e.complexity.Application.ID == nil { + break + } + + return e.complexity.Application.ID(childComplexity), true + + case "Application.name": + if e.complexity.Application.Name == nil { + break + } + + return e.complexity.Application.Name(childComplexity), true + + case "DelegateCallVoucher.application": + if e.complexity.DelegateCallVoucher.Application == nil { + break + } + + return e.complexity.DelegateCallVoucher.Application(childComplexity), true + case "DelegateCallVoucher.destination": if e.complexity.DelegateCallVoucher.Destination == nil { break @@ -318,6 +417,25 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.DelegateCallVoucherEdge.Node(childComplexity), true + case "Input.application": + if e.complexity.Input.Application == nil { + break + } + + return e.complexity.Input.Application(childComplexity), true + + case "Input.applications": + if e.complexity.Input.Applications == nil { + break + } + + args, err := ec.field_Input_applications_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Input.Applications(childComplexity, args["first"].(*int), args["last"].(*int), args["after"].(*string), args["before"].(*string)), true + case "Input.blockNumber": if e.complexity.Input.BlockNumber == nil { break @@ -485,6 +603,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.InputEdge.Node(childComplexity), true + case "Notice.application": + if e.complexity.Notice.Application == nil { + break + } + + return e.complexity.Notice.Application(childComplexity), true + case "Notice.index": if e.complexity.Notice.Index == nil { break @@ -590,6 +715,18 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Proof.OutputIndex(childComplexity), true + case "Query.applications": + if e.complexity.Query.Applications == nil { + break + } + + args, err := ec.field_Query_applications_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.Applications(childComplexity, args["first"].(*int), args["last"].(*int), args["after"].(*string), args["before"].(*string), args["where"].(*model.AppFilter)), true + case "Query.delegateCallVoucher": if e.complexity.Query.DelegateCallVoucher == nil { break @@ -710,6 +847,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.Vouchers(childComplexity, args["first"].(*int), args["last"].(*int), args["after"].(*string), args["before"].(*string), args["filter"].([]*model.ConvenientFilter)), true + case "Report.application": + if e.complexity.Report.Application == nil { + break + } + + return e.complexity.Report.Application(childComplexity), true + case "Report.index": if e.complexity.Report.Index == nil { break @@ -766,6 +910,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.ReportEdge.Node(childComplexity), true + case "Voucher.application": + if e.complexity.Voucher.Application == nil { + break + } + + return e.complexity.Voucher.Application(childComplexity), true + case "Voucher.destination": if e.complexity.Voucher.Destination == nil { break @@ -866,6 +1017,7 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { ec := executionContext{rc, e, 0, 0, make(chan graphql.DeferredResult)} inputUnmarshalMap := graphql.BuildUnmarshalerMap( ec.unmarshalInputAddressFilterInput, + ec.unmarshalInputAppFilter, ec.unmarshalInputBooleanFilterInput, ec.unmarshalInputConvenientFilter, ec.unmarshalInputInputFilter, @@ -1007,6 +1159,21 @@ type Input { blockTimestamp: BigInt prevRandao: String + + "The application that produced the input" + application: Application! + + "Get applications associated with the input with support for pagination" + applications(first: Int, last: Int, after: String, before: String): AppConnection! +} + +type Application { + "Application ID" + id: String! + "Application name" + name: String! + "Application Address" + address: String! } "Representation of a transaction that can be carried out on the base layer blockchain, such as a transfer of assets" @@ -1029,6 +1196,9 @@ type Voucher { "The hash of executed transaction" transactionHash: String + + "The application that produced the voucher" + application: Application! } type DelegateCallVoucher { @@ -1048,6 +1218,9 @@ type DelegateCallVoucher { "The hash of executed transaction" transactionHash: String + + "The application that produced the delegateed voucher" + application: Application! } "Top level queries" @@ -1070,6 +1243,8 @@ type Query { notices(first: Int, last: Int, after: String, before: String): NoticeConnection! "Get reports with support for pagination" reports(first: Int, last: Int, after: String, before: String): ReportConnection! + "Get apps with support for pagination" + applications(first: Int, last: Int, after: String, before: String, where: AppFilter): InputConnection! } "Pagination entry" @@ -1090,6 +1265,22 @@ type InputConnection { pageInfo: PageInfo! } +type AppConnection { + "Total number of entries that match the query" + totalCount: Int! + "Pagination entries returned for the current page" + edges: [AppEdge!]! + "Pagination metadata" + pageInfo: PageInfo! +} + +type AppEdge { + "Node instance" + node: Application! + "Pagination cursor" + cursor: String! +} + "Pagination result" type VoucherConnection { "Total number of entries that match the query" @@ -1120,6 +1311,9 @@ type Notice { payload: String! "Proof object that allows this notice to be validated by the base layer blockchain" proof: Proof + + "The application that produced the notice" + application: Application! } "Pagination entry" @@ -1140,6 +1334,20 @@ type ReportConnection { pageInfo: PageInfo! } +"Filter object to restrict results depending on input properties" +input AppFilter { + "Filter only inputs with index lower than a given value" + indexLowerThan: Int + "Filter only inputs with index greater than a given value" + indexGreaterThan: Int + + "Filter only apps with name" + name: String + + "Filter only apps with address" + address: String +} + "Filter object to restrict results depending on input properties" input InputFilter { "Filter only inputs with index lower than a given value" @@ -1194,6 +1402,9 @@ type Report { input: Input! "Report data as a payload in Ethereum hex binary format, starting with '0x'" payload: String! + + "The application that produced the report" + application: Application! } "Pagination entry" @@ -1273,6 +1484,48 @@ var parsedSchema = gqlparser.MustLoadSchema(sources...) // region ***************************** args.gotpl ***************************** +func (ec *executionContext) field_Input_applications_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *int + if tmp, ok := rawArgs["first"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("first")) + arg0, err = ec.unmarshalOInt2ᚖint(ctx, tmp) + if err != nil { + return nil, err + } + } + args["first"] = arg0 + var arg1 *int + if tmp, ok := rawArgs["last"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("last")) + arg1, err = ec.unmarshalOInt2ᚖint(ctx, tmp) + if err != nil { + return nil, err + } + } + args["last"] = arg1 + var arg2 *string + if tmp, ok := rawArgs["after"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("after")) + arg2, err = ec.unmarshalOString2ᚖstring(ctx, tmp) + if err != nil { + return nil, err + } + } + args["after"] = arg2 + var arg3 *string + if tmp, ok := rawArgs["before"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("before")) + arg3, err = ec.unmarshalOString2ᚖstring(ctx, tmp) + if err != nil { + return nil, err + } + } + args["before"] = arg3 + return args, nil +} + func (ec *executionContext) field_Input_delegateCallVouchers_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} @@ -1456,6 +1709,57 @@ func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs return args, nil } +func (ec *executionContext) field_Query_applications_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *int + if tmp, ok := rawArgs["first"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("first")) + arg0, err = ec.unmarshalOInt2ᚖint(ctx, tmp) + if err != nil { + return nil, err + } + } + args["first"] = arg0 + var arg1 *int + if tmp, ok := rawArgs["last"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("last")) + arg1, err = ec.unmarshalOInt2ᚖint(ctx, tmp) + if err != nil { + return nil, err + } + } + args["last"] = arg1 + var arg2 *string + if tmp, ok := rawArgs["after"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("after")) + arg2, err = ec.unmarshalOString2ᚖstring(ctx, tmp) + if err != nil { + return nil, err + } + } + args["after"] = arg2 + var arg3 *string + if tmp, ok := rawArgs["before"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("before")) + arg3, err = ec.unmarshalOString2ᚖstring(ctx, tmp) + if err != nil { + return nil, err + } + } + args["before"] = arg3 + var arg4 *model.AppFilter + if tmp, ok := rawArgs["where"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("where")) + arg4, err = ec.unmarshalOAppFilter2ᚖgithubᚗcomᚋcartesiᚋrollupsᚑgraphqlᚋpkgᚋreaderᚋmodelᚐAppFilter(ctx, tmp) + if err != nil { + return nil, err + } + } + args["where"] = arg4 + return args, nil +} + func (ec *executionContext) field_Query_delegateCallVoucher_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} @@ -1806,8 +2110,8 @@ func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArg // region **************************** field.gotpl ***************************** -func (ec *executionContext) _DelegateCallVoucher_index(ctx context.Context, field graphql.CollectedField, obj *model.DelegateCallVoucher) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DelegateCallVoucher_index(ctx, field) +func (ec *executionContext) _AppConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *model.AppConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AppConnection_totalCount(ctx, field) if err != nil { return graphql.Null } @@ -1820,7 +2124,7 @@ func (ec *executionContext) _DelegateCallVoucher_index(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Index, nil + return obj.TotalCount, nil }) if err != nil { ec.Error(ctx, err) @@ -1837,9 +2141,9 @@ func (ec *executionContext) _DelegateCallVoucher_index(ctx context.Context, fiel return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DelegateCallVoucher_index(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AppConnection_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DelegateCallVoucher", + Object: "AppConnection", Field: field, IsMethod: false, IsResolver: false, @@ -1850,8 +2154,8 @@ func (ec *executionContext) fieldContext_DelegateCallVoucher_index(ctx context.C return fc, nil } -func (ec *executionContext) _DelegateCallVoucher_input(ctx context.Context, field graphql.CollectedField, obj *model.DelegateCallVoucher) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DelegateCallVoucher_input(ctx, field) +func (ec *executionContext) _AppConnection_edges(ctx context.Context, field graphql.CollectedField, obj *model.AppConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AppConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -1864,7 +2168,7 @@ func (ec *executionContext) _DelegateCallVoucher_input(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.DelegateCallVoucher().Input(rctx, obj) + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) @@ -1876,53 +2180,433 @@ func (ec *executionContext) _DelegateCallVoucher_input(ctx context.Context, fiel } return graphql.Null } - res := resTmp.(*model.Input) + res := resTmp.([]*model.AppEdge) fc.Result = res - return ec.marshalNInput2ᚖgithubᚗcomᚋcartesiᚋrollupsᚑgraphqlᚋpkgᚋreaderᚋmodelᚐInput(ctx, field.Selections, res) + return ec.marshalNAppEdge2ᚕᚖgithubᚗcomᚋcartesiᚋrollupsᚑgraphqlᚋpkgᚋreaderᚋmodelᚐAppEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DelegateCallVoucher_input(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AppConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DelegateCallVoucher", + Object: "AppConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Input_id(ctx, field) - case "index": - return ec.fieldContext_Input_index(ctx, field) - case "status": - return ec.fieldContext_Input_status(ctx, field) - case "msgSender": - return ec.fieldContext_Input_msgSender(ctx, field) - case "timestamp": - return ec.fieldContext_Input_timestamp(ctx, field) - case "blockNumber": - return ec.fieldContext_Input_blockNumber(ctx, field) - case "payload": - return ec.fieldContext_Input_payload(ctx, field) - case "vouchers": - return ec.fieldContext_Input_vouchers(ctx, field) - case "delegateCallVouchers": - return ec.fieldContext_Input_delegateCallVouchers(ctx, field) - case "notices": - return ec.fieldContext_Input_notices(ctx, field) - case "reports": - return ec.fieldContext_Input_reports(ctx, field) - case "espressoTimestamp": - return ec.fieldContext_Input_espressoTimestamp(ctx, field) - case "espressoBlockNumber": - return ec.fieldContext_Input_espressoBlockNumber(ctx, field) - case "inputBoxIndex": - return ec.fieldContext_Input_inputBoxIndex(ctx, field) - case "blockTimestamp": - return ec.fieldContext_Input_blockTimestamp(ctx, field) - case "prevRandao": - return ec.fieldContext_Input_prevRandao(ctx, field) + case "node": + return ec.fieldContext_AppEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_AppEdge_cursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Input", field.Name) + return nil, fmt.Errorf("no field named %q was found under type AppEdge", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _AppConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *model.AppConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AppConnection_pageInfo(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.PageInfo, 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.(*model.PageInfo) + fc.Result = res + return ec.marshalNPageInfo2ᚖgithubᚗcomᚋcartesiᚋrollupsᚑgraphqlᚋpkgᚋreaderᚋmodelᚐPageInfo(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_AppConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "AppConnection", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _AppEdge_node(ctx context.Context, field graphql.CollectedField, obj *model.AppEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AppEdge_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.(*model.Application) + fc.Result = res + return ec.marshalNApplication2ᚖgithubᚗcomᚋcartesiᚋrollupsᚑgraphqlᚋpkgᚋreaderᚋmodelᚐApplication(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_AppEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "AppEdge", + 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_Application_id(ctx, field) + case "name": + return ec.fieldContext_Application_name(ctx, field) + case "address": + return ec.fieldContext_Application_address(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Application", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _AppEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *model.AppEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AppEdge_cursor(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.Cursor, 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_AppEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "AppEdge", + 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) _Application_id(ctx context.Context, field graphql.CollectedField, obj *model.Application) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Application_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_Application_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Application", + 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) _Application_name(ctx context.Context, field graphql.CollectedField, obj *model.Application) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Application_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 + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Application_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Application", + 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) _Application_address(ctx context.Context, field graphql.CollectedField, obj *model.Application) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Application_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 + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Address, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Application_address(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Application", + 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) _DelegateCallVoucher_index(ctx context.Context, field graphql.CollectedField, obj *model.DelegateCallVoucher) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DelegateCallVoucher_index(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.Index, 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_DelegateCallVoucher_index(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "DelegateCallVoucher", + 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) _DelegateCallVoucher_input(ctx context.Context, field graphql.CollectedField, obj *model.DelegateCallVoucher) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DelegateCallVoucher_input(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.DelegateCallVoucher().Input(rctx, obj) + }) + 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.(*model.Input) + fc.Result = res + return ec.marshalNInput2ᚖgithubᚗcomᚋcartesiᚋrollupsᚑgraphqlᚋpkgᚋreaderᚋmodelᚐInput(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_DelegateCallVoucher_input(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "DelegateCallVoucher", + 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_Input_id(ctx, field) + case "index": + return ec.fieldContext_Input_index(ctx, field) + case "status": + return ec.fieldContext_Input_status(ctx, field) + case "msgSender": + return ec.fieldContext_Input_msgSender(ctx, field) + case "timestamp": + return ec.fieldContext_Input_timestamp(ctx, field) + case "blockNumber": + return ec.fieldContext_Input_blockNumber(ctx, field) + case "payload": + return ec.fieldContext_Input_payload(ctx, field) + case "vouchers": + return ec.fieldContext_Input_vouchers(ctx, field) + case "delegateCallVouchers": + return ec.fieldContext_Input_delegateCallVouchers(ctx, field) + case "notices": + return ec.fieldContext_Input_notices(ctx, field) + case "reports": + return ec.fieldContext_Input_reports(ctx, field) + case "espressoTimestamp": + return ec.fieldContext_Input_espressoTimestamp(ctx, field) + case "espressoBlockNumber": + return ec.fieldContext_Input_espressoBlockNumber(ctx, field) + case "inputBoxIndex": + return ec.fieldContext_Input_inputBoxIndex(ctx, field) + case "blockTimestamp": + return ec.fieldContext_Input_blockTimestamp(ctx, field) + case "prevRandao": + return ec.fieldContext_Input_prevRandao(ctx, field) + case "application": + return ec.fieldContext_Input_application(ctx, field) + case "applications": + return ec.fieldContext_Input_applications(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Input", field.Name) }, } return fc, nil @@ -2145,6 +2829,58 @@ func (ec *executionContext) fieldContext_DelegateCallVoucher_transactionHash(ctx return fc, nil } +func (ec *executionContext) _DelegateCallVoucher_application(ctx context.Context, field graphql.CollectedField, obj *model.DelegateCallVoucher) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DelegateCallVoucher_application(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.DelegateCallVoucher().Application(rctx, obj) + }) + 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.(*model.Application) + fc.Result = res + return ec.marshalNApplication2ᚖgithubᚗcomᚋcartesiᚋrollupsᚑgraphqlᚋpkgᚋreaderᚋmodelᚐApplication(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_DelegateCallVoucher_application(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "DelegateCallVoucher", + 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_Application_id(ctx, field) + case "name": + return ec.fieldContext_Application_name(ctx, field) + case "address": + return ec.fieldContext_Application_address(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Application", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) _DelegateCallVoucherConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *model.Connection[*model.DelegateCallVoucher]) (ret graphql.Marshaler) { fc, err := ec.fieldContext_DelegateCallVoucherConnection_totalCount(ctx, field) if err != nil { @@ -2346,6 +3082,8 @@ func (ec *executionContext) fieldContext_DelegateCallVoucherEdge_node(ctx contex return ec.fieldContext_DelegateCallVoucher_executed(ctx, field) case "transactionHash": return ec.fieldContext_DelegateCallVoucher_transactionHash(ctx, field) + case "application": + return ec.fieldContext_DelegateCallVoucher_application(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type DelegateCallVoucher", field.Name) }, @@ -2957,8 +3695,90 @@ func (ec *executionContext) fieldContext_Input_reports(ctx context.Context, fiel return fc, nil } -func (ec *executionContext) _Input_espressoTimestamp(ctx context.Context, field graphql.CollectedField, obj *model.Input) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Input_espressoTimestamp(ctx, field) +func (ec *executionContext) _Input_espressoTimestamp(ctx context.Context, field graphql.CollectedField, obj *model.Input) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Input_espressoTimestamp(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.EspressoTimestamp, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Input_espressoTimestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Input", + 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) _Input_espressoBlockNumber(ctx context.Context, field graphql.CollectedField, obj *model.Input) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Input_espressoBlockNumber(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.EspressoBlockNumber, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Input_espressoBlockNumber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Input", + 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) _Input_inputBoxIndex(ctx context.Context, field graphql.CollectedField, obj *model.Input) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Input_inputBoxIndex(ctx, field) if err != nil { return graphql.Null } @@ -2971,7 +3791,7 @@ func (ec *executionContext) _Input_espressoTimestamp(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.EspressoTimestamp, nil + return obj.InputBoxIndex, nil }) if err != nil { ec.Error(ctx, err) @@ -2985,7 +3805,7 @@ func (ec *executionContext) _Input_espressoTimestamp(ctx context.Context, field return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Input_espressoTimestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Input_inputBoxIndex(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Input", Field: field, @@ -2998,8 +3818,8 @@ func (ec *executionContext) fieldContext_Input_espressoTimestamp(ctx context.Con return fc, nil } -func (ec *executionContext) _Input_espressoBlockNumber(ctx context.Context, field graphql.CollectedField, obj *model.Input) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Input_espressoBlockNumber(ctx, field) +func (ec *executionContext) _Input_blockTimestamp(ctx context.Context, field graphql.CollectedField, obj *model.Input) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Input_blockTimestamp(ctx, field) if err != nil { return graphql.Null } @@ -3012,7 +3832,7 @@ func (ec *executionContext) _Input_espressoBlockNumber(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.EspressoBlockNumber, nil + return obj.BlockTimestamp, nil }) if err != nil { ec.Error(ctx, err) @@ -3023,24 +3843,24 @@ func (ec *executionContext) _Input_espressoBlockNumber(ctx context.Context, fiel } res := resTmp.(string) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalOBigInt2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Input_espressoBlockNumber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Input_blockTimestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Input", 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 nil, errors.New("field of type BigInt does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Input_inputBoxIndex(ctx context.Context, field graphql.CollectedField, obj *model.Input) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Input_inputBoxIndex(ctx, field) +func (ec *executionContext) _Input_prevRandao(ctx context.Context, field graphql.CollectedField, obj *model.Input) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Input_prevRandao(ctx, field) if err != nil { return graphql.Null } @@ -3053,7 +3873,7 @@ func (ec *executionContext) _Input_inputBoxIndex(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.InputBoxIndex, nil + return obj.PrevRandao, nil }) if err != nil { ec.Error(ctx, err) @@ -3067,7 +3887,7 @@ func (ec *executionContext) _Input_inputBoxIndex(ctx context.Context, field grap return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Input_inputBoxIndex(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Input_prevRandao(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Input", Field: field, @@ -3080,8 +3900,8 @@ func (ec *executionContext) fieldContext_Input_inputBoxIndex(ctx context.Context return fc, nil } -func (ec *executionContext) _Input_blockTimestamp(ctx context.Context, field graphql.CollectedField, obj *model.Input) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Input_blockTimestamp(ctx, field) +func (ec *executionContext) _Input_application(ctx context.Context, field graphql.CollectedField, obj *model.Input) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Input_application(ctx, field) if err != nil { return graphql.Null } @@ -3094,35 +3914,46 @@ func (ec *executionContext) _Input_blockTimestamp(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.BlockTimestamp, nil + return ec.resolvers.Input().Application(rctx, obj) }) 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) + res := resTmp.(*model.Application) fc.Result = res - return ec.marshalOBigInt2string(ctx, field.Selections, res) + return ec.marshalNApplication2ᚖgithubᚗcomᚋcartesiᚋrollupsᚑgraphqlᚋpkgᚋreaderᚋmodelᚐApplication(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Input_blockTimestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Input_application(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Input", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type BigInt does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Application_id(ctx, field) + case "name": + return ec.fieldContext_Application_name(ctx, field) + case "address": + return ec.fieldContext_Application_address(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Application", field.Name) }, } return fc, nil } -func (ec *executionContext) _Input_prevRandao(ctx context.Context, field graphql.CollectedField, obj *model.Input) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Input_prevRandao(ctx, field) +func (ec *executionContext) _Input_applications(ctx context.Context, field graphql.CollectedField, obj *model.Input) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Input_applications(ctx, field) if err != nil { return graphql.Null } @@ -3135,30 +3966,52 @@ func (ec *executionContext) _Input_prevRandao(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PrevRandao, nil + return ec.resolvers.Input().Applications(rctx, obj, fc.Args["first"].(*int), fc.Args["last"].(*int), fc.Args["after"].(*string), fc.Args["before"].(*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.(string) + res := resTmp.(*model.AppConnection) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalNAppConnection2ᚖgithubᚗcomᚋcartesiᚋrollupsᚑgraphqlᚋpkgᚋreaderᚋmodelᚐAppConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Input_prevRandao(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Input_applications(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Input", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "totalCount": + return ec.fieldContext_AppConnection_totalCount(ctx, field) + case "edges": + return ec.fieldContext_AppConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_AppConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type AppConnection", 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_Input_applications_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } @@ -3381,6 +4234,10 @@ func (ec *executionContext) fieldContext_InputEdge_node(ctx context.Context, fie return ec.fieldContext_Input_blockTimestamp(ctx, field) case "prevRandao": return ec.fieldContext_Input_prevRandao(ctx, field) + case "application": + return ec.fieldContext_Input_application(ctx, field) + case "applications": + return ec.fieldContext_Input_applications(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type Input", field.Name) }, @@ -3547,6 +4404,10 @@ func (ec *executionContext) fieldContext_Notice_input(ctx context.Context, field return ec.fieldContext_Input_blockTimestamp(ctx, field) case "prevRandao": return ec.fieldContext_Input_prevRandao(ctx, field) + case "application": + return ec.fieldContext_Input_application(ctx, field) + case "applications": + return ec.fieldContext_Input_applications(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type Input", field.Name) }, @@ -3645,6 +4506,58 @@ func (ec *executionContext) fieldContext_Notice_proof(ctx context.Context, field return fc, nil } +func (ec *executionContext) _Notice_application(ctx context.Context, field graphql.CollectedField, obj *model.Notice) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Notice_application(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.Notice().Application(rctx, obj) + }) + 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.(*model.Application) + fc.Result = res + return ec.marshalNApplication2ᚖgithubᚗcomᚋcartesiᚋrollupsᚑgraphqlᚋpkgᚋreaderᚋmodelᚐApplication(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Notice_application(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Notice", + 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_Application_id(ctx, field) + case "name": + return ec.fieldContext_Application_name(ctx, field) + case "address": + return ec.fieldContext_Application_address(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Application", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) _NoticeConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *model.Connection[*model.Notice]) (ret graphql.Marshaler) { fc, err := ec.fieldContext_NoticeConnection_totalCount(ctx, field) if err != nil { @@ -3840,6 +4753,8 @@ func (ec *executionContext) fieldContext_NoticeEdge_node(ctx context.Context, fi return ec.fieldContext_Notice_payload(ctx, field) case "proof": return ec.fieldContext_Notice_proof(ctx, field) + case "application": + return ec.fieldContext_Notice_application(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type Notice", field.Name) }, @@ -4220,6 +5135,10 @@ func (ec *executionContext) fieldContext_Query_input(ctx context.Context, field return ec.fieldContext_Input_blockTimestamp(ctx, field) case "prevRandao": return ec.fieldContext_Input_prevRandao(ctx, field) + case "application": + return ec.fieldContext_Input_application(ctx, field) + case "applications": + return ec.fieldContext_Input_applications(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type Input", field.Name) }, @@ -4293,6 +5212,8 @@ func (ec *executionContext) fieldContext_Query_voucher(ctx context.Context, fiel return ec.fieldContext_Voucher_executed(ctx, field) case "transactionHash": return ec.fieldContext_Voucher_transactionHash(ctx, field) + case "application": + return ec.fieldContext_Voucher_application(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type Voucher", field.Name) }, @@ -4364,6 +5285,8 @@ func (ec *executionContext) fieldContext_Query_delegateCallVoucher(ctx context.C return ec.fieldContext_DelegateCallVoucher_executed(ctx, field) case "transactionHash": return ec.fieldContext_DelegateCallVoucher_transactionHash(ctx, field) + case "application": + return ec.fieldContext_DelegateCallVoucher_application(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type DelegateCallVoucher", field.Name) }, @@ -4429,6 +5352,8 @@ func (ec *executionContext) fieldContext_Query_notice(ctx context.Context, field return ec.fieldContext_Notice_payload(ctx, field) case "proof": return ec.fieldContext_Notice_proof(ctx, field) + case "application": + return ec.fieldContext_Notice_application(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type Notice", field.Name) }, @@ -4492,6 +5417,8 @@ func (ec *executionContext) fieldContext_Query_report(ctx context.Context, field return ec.fieldContext_Report_input(ctx, field) case "payload": return ec.fieldContext_Report_payload(ctx, field) + case "application": + return ec.fieldContext_Report_application(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type Report", field.Name) }, @@ -4825,6 +5752,69 @@ func (ec *executionContext) fieldContext_Query_reports(ctx context.Context, fiel return fc, nil } +func (ec *executionContext) _Query_applications(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_applications(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().Applications(rctx, fc.Args["first"].(*int), fc.Args["last"].(*int), fc.Args["after"].(*string), fc.Args["before"].(*string), fc.Args["where"].(*model.AppFilter)) + }) + 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.(*model.Connection[*model.Input]) + fc.Result = res + return ec.marshalNInputConnection2ᚖgithubᚗcomᚋcartesiᚋrollupsᚑgraphqlᚋpkgᚋreaderᚋmodelᚐConnection(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_applications(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 "totalCount": + return ec.fieldContext_InputConnection_totalCount(ctx, field) + case "edges": + return ec.fieldContext_InputConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_InputConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type InputConnection", 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_applications_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + 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 { @@ -5069,6 +6059,10 @@ func (ec *executionContext) fieldContext_Report_input(ctx context.Context, field return ec.fieldContext_Input_blockTimestamp(ctx, field) case "prevRandao": return ec.fieldContext_Input_prevRandao(ctx, field) + case "application": + return ec.fieldContext_Input_application(ctx, field) + case "applications": + return ec.fieldContext_Input_applications(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type Input", field.Name) }, @@ -5120,6 +6114,58 @@ func (ec *executionContext) fieldContext_Report_payload(ctx context.Context, fie return fc, nil } +func (ec *executionContext) _Report_application(ctx context.Context, field graphql.CollectedField, obj *model.Report) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Report_application(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.Report().Application(rctx, obj) + }) + 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.(*model.Application) + fc.Result = res + return ec.marshalNApplication2ᚖgithubᚗcomᚋcartesiᚋrollupsᚑgraphqlᚋpkgᚋreaderᚋmodelᚐApplication(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Report_application(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Report", + 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_Application_id(ctx, field) + case "name": + return ec.fieldContext_Application_name(ctx, field) + case "address": + return ec.fieldContext_Application_address(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Application", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) _ReportConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *model.Connection[*model.Report]) (ret graphql.Marshaler) { fc, err := ec.fieldContext_ReportConnection_totalCount(ctx, field) if err != nil { @@ -5313,6 +6359,8 @@ func (ec *executionContext) fieldContext_ReportEdge_node(ctx context.Context, fi return ec.fieldContext_Report_input(ctx, field) case "payload": return ec.fieldContext_Report_payload(ctx, field) + case "application": + return ec.fieldContext_Report_application(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type Report", field.Name) }, @@ -5479,6 +6527,10 @@ func (ec *executionContext) fieldContext_Voucher_input(ctx context.Context, fiel return ec.fieldContext_Input_blockTimestamp(ctx, field) case "prevRandao": return ec.fieldContext_Input_prevRandao(ctx, field) + case "application": + return ec.fieldContext_Input_application(ctx, field) + case "applications": + return ec.fieldContext_Input_applications(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type Input", field.Name) }, @@ -5738,7 +6790,59 @@ func (ec *executionContext) fieldContext_Voucher_transactionHash(ctx context.Con 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 nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Voucher_application(ctx context.Context, field graphql.CollectedField, obj *model.Voucher) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Voucher_application(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.Voucher().Application(rctx, obj) + }) + 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.(*model.Application) + fc.Result = res + return ec.marshalNApplication2ᚖgithubᚗcomᚋcartesiᚋrollupsᚑgraphqlᚋpkgᚋreaderᚋmodelᚐApplication(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Voucher_application(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Voucher", + 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_Application_id(ctx, field) + case "name": + return ec.fieldContext_Application_name(ctx, field) + case "address": + return ec.fieldContext_Application_address(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Application", field.Name) }, } return fc, nil @@ -5947,6 +7051,8 @@ func (ec *executionContext) fieldContext_VoucherEdge_node(ctx context.Context, f return ec.fieldContext_Voucher_executed(ctx, field) case "transactionHash": return ec.fieldContext_Voucher_transactionHash(ctx, field) + case "application": + return ec.fieldContext_Voucher_application(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type Voucher", field.Name) }, @@ -7833,6 +8939,54 @@ func (ec *executionContext) unmarshalInputAddressFilterInput(ctx context.Context return it, nil } +func (ec *executionContext) unmarshalInputAppFilter(ctx context.Context, obj interface{}) (model.AppFilter, error) { + var it model.AppFilter + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"indexLowerThan", "indexGreaterThan", "name", "address"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "indexLowerThan": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("indexLowerThan")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) + if err != nil { + return it, err + } + it.IndexLowerThan = data + case "indexGreaterThan": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("indexGreaterThan")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) + if err != nil { + return it, err + } + it.IndexGreaterThan = data + case "name": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Name = data + case "address": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("address")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Address = data + } + } + + return it, nil +} + func (ec *executionContext) unmarshalInputBooleanFilterInput(ctx context.Context, obj interface{}) (model.BooleanFilterInput, error) { var it model.BooleanFilterInput asMap := map[string]interface{}{} @@ -7985,6 +9139,148 @@ func (ec *executionContext) unmarshalInputInputFilter(ctx context.Context, obj i // region **************************** object.gotpl **************************** +var appConnectionImplementors = []string{"AppConnection"} + +func (ec *executionContext) _AppConnection(ctx context.Context, sel ast.SelectionSet, obj *model.AppConnection) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, appConnectionImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("AppConnection") + case "totalCount": + out.Values[i] = ec._AppConnection_totalCount(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "edges": + out.Values[i] = ec._AppConnection_edges(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "pageInfo": + out.Values[i] = ec._AppConnection_pageInfo(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var appEdgeImplementors = []string{"AppEdge"} + +func (ec *executionContext) _AppEdge(ctx context.Context, sel ast.SelectionSet, obj *model.AppEdge) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, appEdgeImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("AppEdge") + case "node": + out.Values[i] = ec._AppEdge_node(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "cursor": + out.Values[i] = ec._AppEdge_cursor(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var applicationImplementors = []string{"Application"} + +func (ec *executionContext) _Application(ctx context.Context, sel ast.SelectionSet, obj *model.Application) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, applicationImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Application") + case "id": + out.Values[i] = ec._Application_id(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "name": + out.Values[i] = ec._Application_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "address": + out.Values[i] = ec._Application_address(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + var delegateCallVoucherImplementors = []string{"DelegateCallVoucher"} func (ec *executionContext) _DelegateCallVoucher(ctx context.Context, sel ast.SelectionSet, obj *model.DelegateCallVoucher) graphql.Marshaler { @@ -8053,6 +9349,42 @@ func (ec *executionContext) _DelegateCallVoucher(ctx context.Context, sel ast.Se out.Values[i] = ec._DelegateCallVoucher_executed(ctx, field, obj) case "transactionHash": out.Values[i] = ec._DelegateCallVoucher_transactionHash(ctx, field, obj) + case "application": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._DelegateCallVoucher_application(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -8210,12 +9542,84 @@ func (ec *executionContext) _Input(ctx context.Context, sel ast.SelectionSet, ob if out.Values[i] == graphql.Null { atomic.AddUint32(&out.Invalids, 1) } - case "payload": - out.Values[i] = ec._Input_payload(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) + case "payload": + out.Values[i] = ec._Input_payload(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "vouchers": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Input_vouchers(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "delegateCallVouchers": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Input_delegateCallVouchers(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue } - case "vouchers": + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "notices": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -8224,7 +9628,7 @@ func (ec *executionContext) _Input(ctx context.Context, sel ast.SelectionSet, ob ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Input_vouchers(ctx, field, obj) + res = ec._Input_notices(ctx, field, obj) if res == graphql.Null { atomic.AddUint32(&fs.Invalids, 1) } @@ -8251,7 +9655,7 @@ func (ec *executionContext) _Input(ctx context.Context, sel ast.SelectionSet, ob } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "delegateCallVouchers": + case "reports": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -8260,7 +9664,7 @@ func (ec *executionContext) _Input(ctx context.Context, sel ast.SelectionSet, ob ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Input_delegateCallVouchers(ctx, field, obj) + res = ec._Input_reports(ctx, field, obj) if res == graphql.Null { atomic.AddUint32(&fs.Invalids, 1) } @@ -8287,7 +9691,17 @@ func (ec *executionContext) _Input(ctx context.Context, sel ast.SelectionSet, ob } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "notices": + case "espressoTimestamp": + out.Values[i] = ec._Input_espressoTimestamp(ctx, field, obj) + case "espressoBlockNumber": + out.Values[i] = ec._Input_espressoBlockNumber(ctx, field, obj) + case "inputBoxIndex": + out.Values[i] = ec._Input_inputBoxIndex(ctx, field, obj) + case "blockTimestamp": + out.Values[i] = ec._Input_blockTimestamp(ctx, field, obj) + case "prevRandao": + out.Values[i] = ec._Input_prevRandao(ctx, field, obj) + case "application": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -8296,7 +9710,7 @@ func (ec *executionContext) _Input(ctx context.Context, sel ast.SelectionSet, ob ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Input_notices(ctx, field, obj) + res = ec._Input_application(ctx, field, obj) if res == graphql.Null { atomic.AddUint32(&fs.Invalids, 1) } @@ -8323,7 +9737,7 @@ func (ec *executionContext) _Input(ctx context.Context, sel ast.SelectionSet, ob } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "reports": + case "applications": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -8332,7 +9746,7 @@ func (ec *executionContext) _Input(ctx context.Context, sel ast.SelectionSet, ob ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Input_reports(ctx, field, obj) + res = ec._Input_applications(ctx, field, obj) if res == graphql.Null { atomic.AddUint32(&fs.Invalids, 1) } @@ -8359,16 +9773,6 @@ func (ec *executionContext) _Input(ctx context.Context, sel ast.SelectionSet, ob } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "espressoTimestamp": - out.Values[i] = ec._Input_espressoTimestamp(ctx, field, obj) - case "espressoBlockNumber": - out.Values[i] = ec._Input_espressoBlockNumber(ctx, field, obj) - case "inputBoxIndex": - out.Values[i] = ec._Input_inputBoxIndex(ctx, field, obj) - case "blockTimestamp": - out.Values[i] = ec._Input_blockTimestamp(ctx, field, obj) - case "prevRandao": - out.Values[i] = ec._Input_prevRandao(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -8544,6 +9948,42 @@ func (ec *executionContext) _Notice(ctx context.Context, sel ast.SelectionSet, o } case "proof": out.Values[i] = ec._Notice_proof(ctx, field, obj) + case "application": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Notice_application(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -8990,6 +10430,28 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) } + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) + case "applications": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_applications(ctx, field) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, + func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + } + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) case "__type": out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { @@ -9079,6 +10541,42 @@ func (ec *executionContext) _Report(ctx context.Context, sel ast.SelectionSet, o if out.Values[i] == graphql.Null { atomic.AddUint32(&out.Invalids, 1) } + case "application": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Report_application(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -9265,6 +10763,42 @@ func (ec *executionContext) _Voucher(ctx context.Context, sel ast.SelectionSet, out.Values[i] = ec._Voucher_executed(ctx, field, obj) case "transactionHash": out.Values[i] = ec._Voucher_transactionHash(ctx, field, obj) + case "application": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Voucher_application(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -9707,6 +11241,88 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o // region ***************************** type.gotpl ***************************** +func (ec *executionContext) marshalNAppConnection2githubᚗcomᚋcartesiᚋrollupsᚑgraphqlᚋpkgᚋreaderᚋmodelᚐAppConnection(ctx context.Context, sel ast.SelectionSet, v model.AppConnection) graphql.Marshaler { + return ec._AppConnection(ctx, sel, &v) +} + +func (ec *executionContext) marshalNAppConnection2ᚖgithubᚗcomᚋcartesiᚋrollupsᚑgraphqlᚋpkgᚋreaderᚋmodelᚐAppConnection(ctx context.Context, sel ast.SelectionSet, v *model.AppConnection) 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._AppConnection(ctx, sel, v) +} + +func (ec *executionContext) marshalNAppEdge2ᚕᚖgithubᚗcomᚋcartesiᚋrollupsᚑgraphqlᚋpkgᚋreaderᚋmodelᚐAppEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.AppEdge) 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.marshalNAppEdge2ᚖgithubᚗcomᚋcartesiᚋrollupsᚑgraphqlᚋpkgᚋreaderᚋmodelᚐAppEdge(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) marshalNAppEdge2ᚖgithubᚗcomᚋcartesiᚋrollupsᚑgraphqlᚋpkgᚋreaderᚋmodelᚐAppEdge(ctx context.Context, sel ast.SelectionSet, v *model.AppEdge) 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._AppEdge(ctx, sel, v) +} + +func (ec *executionContext) marshalNApplication2githubᚗcomᚋcartesiᚋrollupsᚑgraphqlᚋpkgᚋreaderᚋmodelᚐApplication(ctx context.Context, sel ast.SelectionSet, v model.Application) graphql.Marshaler { + return ec._Application(ctx, sel, &v) +} + +func (ec *executionContext) marshalNApplication2ᚖgithubᚗcomᚋcartesiᚋrollupsᚑgraphqlᚋpkgᚋreaderᚋmodelᚐApplication(ctx context.Context, sel ast.SelectionSet, v *model.Application) 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._Application(ctx, sel, v) +} + func (ec *executionContext) unmarshalNBigInt2string(ctx context.Context, v interface{}) (string, error) { res, err := graphql.UnmarshalID(v) return res, graphql.ErrorOnPath(ctx, err) @@ -10484,6 +12100,14 @@ func (ec *executionContext) unmarshalOAddressFilterInput2ᚖgithubᚗcomᚋcarte return &res, graphql.ErrorOnPath(ctx, err) } +func (ec *executionContext) unmarshalOAppFilter2ᚖgithubᚗcomᚋcartesiᚋrollupsᚑgraphqlᚋpkgᚋreaderᚋmodelᚐAppFilter(ctx context.Context, v interface{}) (*model.AppFilter, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputAppFilter(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + func (ec *executionContext) unmarshalOBigInt2string(ctx context.Context, v interface{}) (string, error) { res, err := graphql.UnmarshalID(v) return res, graphql.ErrorOnPath(ctx, err) diff --git a/pkg/reader/model/generated.go b/pkg/reader/model/generated.go index 1dd1848..aa73186 100644 --- a/pkg/reader/model/generated.go +++ b/pkg/reader/model/generated.go @@ -17,6 +17,43 @@ type AddressFilterInput struct { Or []*ConvenientFilter `json:"or,omitempty"` } +type AppConnection struct { + // Total number of entries that match the query + TotalCount int `json:"totalCount"` + // Pagination entries returned for the current page + Edges []*AppEdge `json:"edges"` + // Pagination metadata + PageInfo *PageInfo `json:"pageInfo"` +} + +type AppEdge struct { + // Node instance + Node *Application `json:"node"` + // Pagination cursor + Cursor string `json:"cursor"` +} + +// Filter object to restrict results depending on input properties +type AppFilter struct { + // Filter only inputs with index lower than a given value + IndexLowerThan *int `json:"indexLowerThan,omitempty"` + // Filter only inputs with index greater than a given value + IndexGreaterThan *int `json:"indexGreaterThan,omitempty"` + // Filter only apps with name + Name *string `json:"name,omitempty"` + // Filter only apps with address + Address *string `json:"address,omitempty"` +} + +type Application struct { + // Application ID + ID string `json:"id"` + // Application name + Name string `json:"name"` + // Application Address + Address string `json:"address"` +} + type BooleanFilterInput struct { Eq *bool `json:"eq,omitempty"` Ne *bool `json:"ne,omitempty"` diff --git a/pkg/reader/reader.resolvers.go b/pkg/reader/reader.resolvers.go index 64d3d47..2118209 100644 --- a/pkg/reader/reader.resolvers.go +++ b/pkg/reader/reader.resolvers.go @@ -6,6 +6,7 @@ package reader import ( "context" + "fmt" "log/slog" "github.com/cartesi/rollups-graphql/pkg/reader/graph" @@ -17,6 +18,11 @@ func (r *delegateCallVoucherResolver) Input(ctx context.Context, obj *model.Dele return r.adapter.GetInputByIndex(ctx, obj.InputIndex) } +// Application is the resolver for the application field. +func (r *delegateCallVoucherResolver) Application(ctx context.Context, obj *model.DelegateCallVoucher) (*model.Application, error) { + panic(fmt.Errorf("not implemented: Application - application")) +} + // Vouchers is the resolver for the vouchers field. func (r *inputResolver) Vouchers(ctx context.Context, obj *model.Input, first *int, last *int, after *string, before *string) (*model.Connection[*model.Voucher], error) { if first == nil && last == nil && after == nil && before == nil { @@ -49,6 +55,16 @@ func (r *inputResolver) Reports(ctx context.Context, obj *model.Input, first *in return r.adapter.GetReports(ctx, first, last, after, before, &obj.Index) } +// Application is the resolver for the application field. +func (r *inputResolver) Application(ctx context.Context, obj *model.Input) (*model.Application, error) { + panic(fmt.Errorf("not implemented: Application - application")) +} + +// Applications is the resolver for the applications field. +func (r *inputResolver) Applications(ctx context.Context, obj *model.Input, first *int, last *int, after *string, before *string) (*model.AppConnection, error) { + panic(fmt.Errorf("not implemented: Applications - applications")) +} + // Input is the resolver for the input field. func (r *noticeResolver) Input(ctx context.Context, obj *model.Notice) (*model.Input, error) { slog.Debug("Find input by index", "inputIndex", obj.InputIndex) @@ -60,6 +76,11 @@ func (r *noticeResolver) Input(ctx context.Context, obj *model.Notice) (*model.I return input, nil } +// Application is the resolver for the application field. +func (r *noticeResolver) Application(ctx context.Context, obj *model.Notice) (*model.Application, error) { + panic(fmt.Errorf("not implemented: Application - application")) +} + // Input is the resolver for the input field. func (r *queryResolver) Input(ctx context.Context, id string) (*model.Input, error) { slog.Debug("queryResolver.Input", "id", id) @@ -111,16 +132,31 @@ func (r *queryResolver) Reports(ctx context.Context, first *int, last *int, afte return r.adapter.GetReports(ctx, first, last, after, before, nil) } +// Applications is the resolver for the applications field. +func (r *queryResolver) Applications(ctx context.Context, first *int, last *int, after *string, before *string, where *model.AppFilter) (*model.Connection[*model.Input], error) { + panic(fmt.Errorf("not implemented: Applications - applications")) +} + // Input is the resolver for the input field. func (r *reportResolver) Input(ctx context.Context, obj *model.Report) (*model.Input, error) { return r.adapter.GetInputByIndex(ctx, obj.InputIndex) } +// Application is the resolver for the application field. +func (r *reportResolver) Application(ctx context.Context, obj *model.Report) (*model.Application, error) { + panic(fmt.Errorf("not implemented: Application - application")) +} + // Input is the resolver for the input field. func (r *voucherResolver) Input(ctx context.Context, obj *model.Voucher) (*model.Input, error) { return r.adapter.GetInputByIndex(ctx, obj.InputIndex) } +// Application is the resolver for the application field. +func (r *voucherResolver) Application(ctx context.Context, obj *model.Voucher) (*model.Application, error) { + panic(fmt.Errorf("not implemented: Application - application")) +} + // DelegateCallVoucher returns graph.DelegateCallVoucherResolver implementation. func (r *Resolver) DelegateCallVoucher() graph.DelegateCallVoucherResolver { return &delegateCallVoucherResolver{r}