|
|
|
@ -170,6 +170,8 @@ type ComplexityRoot struct {
|
|
|
|
|
GetAccounts func(childComplexity int, addresses []string) int
|
|
|
|
|
GetAuctionsByIds func(childComplexity int, ids []string) int
|
|
|
|
|
GetBondsByIds func(childComplexity int, ids []string) int
|
|
|
|
|
GetParticipantByAddress func(childComplexity int, cosmosAddress string) int
|
|
|
|
|
GetParticipantByNitroAddress func(childComplexity int, nitroAddress string) int
|
|
|
|
|
GetParticipants func(childComplexity int) int
|
|
|
|
|
GetRecordsByIds func(childComplexity int, ids []string) int
|
|
|
|
|
GetStatus func(childComplexity int) int
|
|
|
|
@ -234,6 +236,8 @@ type QueryResolver interface {
|
|
|
|
|
ResolveNames(ctx context.Context, names []string) ([]*Record, error)
|
|
|
|
|
GetAuctionsByIds(ctx context.Context, ids []string) ([]*Auction, error)
|
|
|
|
|
GetParticipants(ctx context.Context) ([]*Participant, error)
|
|
|
|
|
GetParticipantByAddress(ctx context.Context, cosmosAddress string) (*Participant, error)
|
|
|
|
|
GetParticipantByNitroAddress(ctx context.Context, nitroAddress string) (*Participant, error)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type executableSchema struct {
|
|
|
|
@ -728,6 +732,30 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
|
|
|
|
|
|
|
|
|
return e.complexity.Query.GetBondsByIds(childComplexity, args["ids"].([]string)), true
|
|
|
|
|
|
|
|
|
|
case "Query.getParticipantByAddress":
|
|
|
|
|
if e.complexity.Query.GetParticipantByAddress == nil {
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
args, err := ec.field_Query_getParticipantByAddress_args(context.TODO(), rawArgs)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return 0, false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return e.complexity.Query.GetParticipantByAddress(childComplexity, args["cosmosAddress"].(string)), true
|
|
|
|
|
|
|
|
|
|
case "Query.getParticipantByNitroAddress":
|
|
|
|
|
if e.complexity.Query.GetParticipantByNitroAddress == nil {
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
args, err := ec.field_Query_getParticipantByNitroAddress_args(context.TODO(), rawArgs)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return 0, false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return e.complexity.Query.GetParticipantByNitroAddress(childComplexity, args["nitroAddress"].(string)), true
|
|
|
|
|
|
|
|
|
|
case "Query.getParticipants":
|
|
|
|
|
if e.complexity.Query.GetParticipants == nil {
|
|
|
|
|
break
|
|
|
|
@ -1128,6 +1156,36 @@ func (ec *executionContext) field_Query_getBondsByIds_args(ctx context.Context,
|
|
|
|
|
return args, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) field_Query_getParticipantByAddress_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
|
|
|
var err error
|
|
|
|
|
args := map[string]interface{}{}
|
|
|
|
|
var arg0 string
|
|
|
|
|
if tmp, ok := rawArgs["cosmosAddress"]; ok {
|
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cosmosAddress"))
|
|
|
|
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
args["cosmosAddress"] = arg0
|
|
|
|
|
return args, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) field_Query_getParticipantByNitroAddress_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
|
|
|
var err error
|
|
|
|
|
args := map[string]interface{}{}
|
|
|
|
|
var arg0 string
|
|
|
|
|
if tmp, ok := rawArgs["nitroAddress"]; ok {
|
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nitroAddress"))
|
|
|
|
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
args["nitroAddress"] = arg0
|
|
|
|
|
return args, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) field_Query_getRecordsByIds_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
|
|
|
var err error
|
|
|
|
|
args := map[string]interface{}{}
|
|
|
|
@ -4951,6 +5009,136 @@ func (ec *executionContext) fieldContext_Query_getParticipants(ctx context.Conte
|
|
|
|
|
return fc, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) _Query_getParticipantByAddress(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
|
|
|
fc, err := ec.fieldContext_Query_getParticipantByAddress(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().GetParticipantByAddress(rctx, fc.Args["cosmosAddress"].(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.(*Participant)
|
|
|
|
|
fc.Result = res
|
|
|
|
|
return ec.marshalNParticipant2ᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐParticipant(ctx, field.Selections, res)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) fieldContext_Query_getParticipantByAddress(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 "cosmosAddress":
|
|
|
|
|
return ec.fieldContext_Participant_cosmosAddress(ctx, field)
|
|
|
|
|
case "nitroAddress":
|
|
|
|
|
return ec.fieldContext_Participant_nitroAddress(ctx, field)
|
|
|
|
|
case "role":
|
|
|
|
|
return ec.fieldContext_Participant_role(ctx, field)
|
|
|
|
|
case "kycId":
|
|
|
|
|
return ec.fieldContext_Participant_kycId(ctx, field)
|
|
|
|
|
}
|
|
|
|
|
return nil, fmt.Errorf("no field named %q was found under type Participant", 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_getParticipantByAddress_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
|
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
return fc, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) _Query_getParticipantByNitroAddress(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
|
|
|
fc, err := ec.fieldContext_Query_getParticipantByNitroAddress(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().GetParticipantByNitroAddress(rctx, fc.Args["nitroAddress"].(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.(*Participant)
|
|
|
|
|
fc.Result = res
|
|
|
|
|
return ec.marshalNParticipant2ᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐParticipant(ctx, field.Selections, res)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) fieldContext_Query_getParticipantByNitroAddress(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 "cosmosAddress":
|
|
|
|
|
return ec.fieldContext_Participant_cosmosAddress(ctx, field)
|
|
|
|
|
case "nitroAddress":
|
|
|
|
|
return ec.fieldContext_Participant_nitroAddress(ctx, field)
|
|
|
|
|
case "role":
|
|
|
|
|
return ec.fieldContext_Participant_role(ctx, field)
|
|
|
|
|
case "kycId":
|
|
|
|
|
return ec.fieldContext_Participant_kycId(ctx, field)
|
|
|
|
|
}
|
|
|
|
|
return nil, fmt.Errorf("no field named %q was found under type Participant", 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_getParticipantByNitroAddress_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
|
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
return fc, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
|
|
|
fc, err := ec.fieldContext_Query___type(ctx, field)
|
|
|
|
|
if err != nil {
|
|
|
|
@ -9247,6 +9435,52 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
|
|
|
|
|
return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
out.Concurrently(i, func() graphql.Marshaler {
|
|
|
|
|
return rrm(innerCtx)
|
|
|
|
|
})
|
|
|
|
|
case "getParticipantByAddress":
|
|
|
|
|
field := field
|
|
|
|
|
|
|
|
|
|
innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
|
|
|
|
|
defer func() {
|
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
res = ec._Query_getParticipantByAddress(ctx, field)
|
|
|
|
|
if res == graphql.Null {
|
|
|
|
|
atomic.AddUint32(&invalids, 1)
|
|
|
|
|
}
|
|
|
|
|
return res
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rrm := func(ctx context.Context) graphql.Marshaler {
|
|
|
|
|
return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
out.Concurrently(i, func() graphql.Marshaler {
|
|
|
|
|
return rrm(innerCtx)
|
|
|
|
|
})
|
|
|
|
|
case "getParticipantByNitroAddress":
|
|
|
|
|
field := field
|
|
|
|
|
|
|
|
|
|
innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
|
|
|
|
|
defer func() {
|
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
res = ec._Query_getParticipantByNitroAddress(ctx, field)
|
|
|
|
|
if res == graphql.Null {
|
|
|
|
|
atomic.AddUint32(&invalids, 1)
|
|
|
|
|
}
|
|
|
|
|
return res
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rrm := func(ctx context.Context) graphql.Marshaler {
|
|
|
|
|
return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
out.Concurrently(i, func() graphql.Marshaler {
|
|
|
|
|
return rrm(innerCtx)
|
|
|
|
|
})
|
|
|
|
@ -10073,6 +10307,10 @@ func (ec *executionContext) marshalNNodeInfo2ᚖgitᚗvdbᚗtoᚋcercᚑioᚋlac
|
|
|
|
|
return ec._NodeInfo(ctx, sel, v)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) marshalNParticipant2gitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐParticipant(ctx context.Context, sel ast.SelectionSet, v Participant) graphql.Marshaler {
|
|
|
|
|
return ec._Participant(ctx, sel, &v)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) marshalNParticipant2ᚕᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐParticipant(ctx context.Context, sel ast.SelectionSet, v []*Participant) graphql.Marshaler {
|
|
|
|
|
ret := make(graphql.Array, len(v))
|
|
|
|
|
var wg sync.WaitGroup
|
|
|
|
@ -10111,6 +10349,16 @@ func (ec *executionContext) marshalNParticipant2ᚕᚖgitᚗvdbᚗtoᚋcercᚑio
|
|
|
|
|
return ret
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) marshalNParticipant2ᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐParticipant(ctx context.Context, sel ast.SelectionSet, v *Participant) 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._Participant(ctx, sel, v)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) marshalNRecord2ᚕᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐRecord(ctx context.Context, sel ast.SelectionSet, v []*Record) graphql.Marshaler {
|
|
|
|
|
ret := make(graphql.Array, len(v))
|
|
|
|
|
var wg sync.WaitGroup
|
|
|
|
|