aboutsummaryrefslogtreecommitdiffstats
path: root/api/graphql/graph/identity.generated.go
diff options
context:
space:
mode:
Diffstat (limited to 'api/graphql/graph/identity.generated.go')
-rw-r--r--api/graphql/graph/identity.generated.go33
1 files changed, 10 insertions, 23 deletions
diff --git a/api/graphql/graph/identity.generated.go b/api/graphql/graph/identity.generated.go
index 7fa9b9f0..51aa188b 100644
--- a/api/graphql/graph/identity.generated.go
+++ b/api/graphql/graph/identity.generated.go
@@ -12,13 +12,13 @@ import (
"github.com/99designs/gqlgen/graphql"
"github.com/MichaelMure/git-bug/api/graphql/models"
+ "github.com/MichaelMure/git-bug/entity"
"github.com/vektah/gqlparser/v2/ast"
)
// region ************************** generated!.gotpl **************************
type IdentityResolver interface {
- ID(ctx context.Context, obj models.IdentityWrapper) (string, error)
HumanID(ctx context.Context, obj models.IdentityWrapper) (string, error)
}
@@ -48,7 +48,7 @@ func (ec *executionContext) _Identity_id(ctx context.Context, field graphql.Coll
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Identity().ID(rctx, obj)
+ return obj.Id(), nil
})
if err != nil {
ec.Error(ctx, err)
@@ -60,9 +60,9 @@ func (ec *executionContext) _Identity_id(ctx context.Context, field graphql.Coll
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(entity.Id)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNID2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentityᚐId(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Identity_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
@@ -70,9 +70,9 @@ func (ec *executionContext) fieldContext_Identity_id(ctx context.Context, field
Object: "Identity",
Field: field,
IsMethod: true,
- IsResolver: true,
+ IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- return nil, errors.New("field of type String does not have child fields")
+ return nil, errors.New("field of type ID does not have child fields")
},
}
return fc, nil
@@ -713,25 +713,12 @@ func (ec *executionContext) _Identity(ctx context.Context, sel ast.SelectionSet,
case "__typename":
out.Values[i] = graphql.MarshalString("Identity")
case "id":
- 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._Identity_id(ctx, field, obj)
- if res == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- return res
- }
- out.Concurrently(i, func() graphql.Marshaler {
- return innerFunc(ctx)
+ out.Values[i] = ec._Identity_id(ctx, field, obj)
- })
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
case "humanId":
field := field