Fix types generation

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2025-08-07 18:34:26 +02:00
parent 987c85652c
commit c9ab0678be
13 changed files with 66 additions and 117 deletions

View File

@@ -17,6 +17,8 @@ import (
"github.com/getprobo/probo/pkg/gid"
"github.com/getprobo/probo/pkg/page"
"github.com/getprobo/probo/pkg/server/api/trust/v1/types"
"github.com/getprobo/probo/pkg/server/graphql/types/cursor"
gid1 "github.com/getprobo/probo/pkg/server/graphql/types/gid"
gqlparser "github.com/vektah/gqlparser/v2"
"github.com/vektah/gqlparser/v2/ast"
)
@@ -7333,13 +7335,13 @@ func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.Se
}
func (ec *executionContext) unmarshalNCursorKey2githubᚗcomᚋgetproboᚋproboᚋpkgᚋpageᚐCursorKey(ctx context.Context, v any) (page.CursorKey, error) {
res, err := types.UnmarshalCursorKeyScalar(v)
res, err := cursor.UnmarshalCursorKeyScalar(v)
return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalNCursorKey2githubᚗcomᚋgetproboᚋproboᚋpkgᚋpageᚐCursorKey(ctx context.Context, sel ast.SelectionSet, v page.CursorKey) graphql.Marshaler {
_ = sel
res := types.MarshalCursorKeyScalar(v)
res := cursor.MarshalCursorKeyScalar(v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
@@ -7490,13 +7492,13 @@ func (ec *executionContext) marshalNFramework2ᚖgithubᚗcomᚋgetproboᚋprobo
}
func (ec *executionContext) unmarshalNID2githubᚗcomᚋgetproboᚋproboᚋpkgᚋgidᚐGID(ctx context.Context, v any) (gid.GID, error) {
res, err := types.UnmarshalGIDScalar(v)
res, err := gid1.UnmarshalGIDScalar(v)
return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalNID2githubᚗcomᚋgetproboᚋproboᚋpkgᚋgidᚐGID(ctx context.Context, sel ast.SelectionSet, v gid.GID) graphql.Marshaler {
_ = sel
res := types.MarshalGIDScalar(v)
res := gid1.MarshalGIDScalar(v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
@@ -7978,7 +7980,7 @@ func (ec *executionContext) unmarshalOCursorKey2ᚖgithubᚗcomᚋgetproboᚋpro
if v == nil {
return nil, nil
}
res, err := types.UnmarshalCursorKeyScalar(v)
res, err := cursor.UnmarshalCursorKeyScalar(v)
return &res, graphql.ErrorOnPath(ctx, err)
}
@@ -7988,7 +7990,7 @@ func (ec *executionContext) marshalOCursorKey2ᚖgithubᚗcomᚋgetproboᚋprobo
}
_ = sel
_ = ctx
res := types.MarshalCursorKeyScalar(*v)
res := cursor.MarshalCursorKeyScalar(*v)
return res
}