...
|
...
|
@@ -12,6 +12,8 @@ import ( |
|
|
|
|
|
"github.com/99designs/gqlgen/graphql"
|
|
|
"github.com/99designs/gqlgen/graphql/introspection"
|
|
|
"github.com/tiptok/godevp/pkg/domain"
|
|
|
"github.com/tiptok/godevp/pkg/port/graphql/graph/libs"
|
|
|
"github.com/tiptok/godevp/pkg/port/graphql/graph/model"
|
|
|
gqlparser "github.com/vektah/gqlparser/v2"
|
|
|
"github.com/vektah/gqlparser/v2/ast"
|
...
|
...
|
@@ -35,8 +37,11 @@ type Config struct { |
|
|
}
|
|
|
|
|
|
type ResolverRoot interface {
|
|
|
Access() AccessResolver
|
|
|
ClientVersion() ClientVersionResolver
|
|
|
Mutation() MutationResolver
|
|
|
Query() QueryResolver
|
|
|
Role() RoleResolver
|
|
|
Users() UsersResolver
|
|
|
}
|
|
|
|
...
|
...
|
@@ -44,18 +49,54 @@ type DirectiveRoot struct { |
|
|
}
|
|
|
|
|
|
type ComplexityRoot struct {
|
|
|
Access struct {
|
|
|
AccessCode func(childComplexity int) int
|
|
|
AccessName func(childComplexity int) int
|
|
|
AccessType func(childComplexity int) int
|
|
|
Action func(childComplexity int) int
|
|
|
ID func(childComplexity int) int
|
|
|
Icon func(childComplexity int) int
|
|
|
Module func(childComplexity int) int
|
|
|
Object func(childComplexity int) int
|
|
|
ParentID func(childComplexity int) int
|
|
|
Sort func(childComplexity int) int
|
|
|
Status func(childComplexity int) int
|
|
|
User func(childComplexity int) int
|
|
|
}
|
|
|
|
|
|
ClientPackageInfo struct {
|
|
|
FileName func(childComplexity int) int
|
|
|
Path func(childComplexity int) int
|
|
|
}
|
|
|
|
|
|
ClientVersion struct {
|
|
|
ClientPackageInfo func(childComplexity int) int
|
|
|
Commiter func(childComplexity int) int
|
|
|
CreateTime func(childComplexity int) int
|
|
|
Id func(childComplexity int) int
|
|
|
ProjectName func(childComplexity int) int
|
|
|
Remark func(childComplexity int) int
|
|
|
Title func(childComplexity int) int
|
|
|
Version func(childComplexity int) int
|
|
|
}
|
|
|
|
|
|
Mutation struct {
|
|
|
CreateMenu func(childComplexity int, input *model.MenuAccessInput) int
|
|
|
CreateUsers func(childComplexity int, input model.CreateUsersInput) int
|
|
|
RemoveUsers func(childComplexity int, input model.RemoveUsersInput) int
|
|
|
UpdateUsers func(childComplexity int, input model.UpdateUsersInput) int
|
|
|
}
|
|
|
|
|
|
Query struct {
|
|
|
User func(childComplexity int, input model.GetUsersInput) int
|
|
|
Users func(childComplexity int, input model.ListUsersInput) int
|
|
|
ClientVersion func(childComplexity int, id *int) int
|
|
|
Menu func(childComplexity int, input *model.MenuAccessInput) int
|
|
|
Menus func(childComplexity int, input *model.MenuAccessInput) int
|
|
|
User func(childComplexity int, input model.GetUsersInput) int
|
|
|
Users func(childComplexity int, input model.ListUsersInput) int
|
|
|
}
|
|
|
|
|
|
Role struct {
|
|
|
Access func(childComplexity int) int
|
|
|
CreateTime func(childComplexity int) int
|
|
|
ID func(childComplexity int) int
|
|
|
ParentID func(childComplexity int) int
|
...
|
...
|
@@ -74,14 +115,27 @@ type ComplexityRoot struct { |
|
|
}
|
|
|
}
|
|
|
|
|
|
type AccessResolver interface {
|
|
|
User(ctx context.Context, obj *model.Access) (*model.Users, error)
|
|
|
}
|
|
|
type ClientVersionResolver interface {
|
|
|
CreateTime(ctx context.Context, obj *domain.ClientVersion) (*libs.Datetime, error)
|
|
|
}
|
|
|
type MutationResolver interface {
|
|
|
CreateUsers(ctx context.Context, input model.CreateUsersInput) (*model.Users, error)
|
|
|
RemoveUsers(ctx context.Context, input model.RemoveUsersInput) (*model.Users, error)
|
|
|
UpdateUsers(ctx context.Context, input model.UpdateUsersInput) (*model.Users, error)
|
|
|
CreateMenu(ctx context.Context, input *model.MenuAccessInput) ([]*model.Access, error)
|
|
|
}
|
|
|
type QueryResolver interface {
|
|
|
User(ctx context.Context, input model.GetUsersInput) (*model.Users, error)
|
|
|
Users(ctx context.Context, input model.ListUsersInput) ([]*model.Users, error)
|
|
|
Menus(ctx context.Context, input *model.MenuAccessInput) ([]*model.Access, error)
|
|
|
ClientVersion(ctx context.Context, id *int) (*domain.ClientVersion, error)
|
|
|
Menu(ctx context.Context, input *model.MenuAccessInput) ([]*model.Access, error)
|
|
|
}
|
|
|
type RoleResolver interface {
|
|
|
Access(ctx context.Context, obj *model.Role) ([]*model.Access, error)
|
|
|
}
|
|
|
type UsersResolver interface {
|
|
|
Roles(ctx context.Context, obj *model.Users) ([]*model.Role, error)
|
...
|
...
|
@@ -102,6 +156,172 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in |
|
|
_ = ec
|
|
|
switch typeName + "." + field {
|
|
|
|
|
|
case "Access.accessCode":
|
|
|
if e.complexity.Access.AccessCode == nil {
|
|
|
break
|
|
|
}
|
|
|
|
|
|
return e.complexity.Access.AccessCode(childComplexity), true
|
|
|
|
|
|
case "Access.accessName":
|
|
|
if e.complexity.Access.AccessName == nil {
|
|
|
break
|
|
|
}
|
|
|
|
|
|
return e.complexity.Access.AccessName(childComplexity), true
|
|
|
|
|
|
case "Access.accessType":
|
|
|
if e.complexity.Access.AccessType == nil {
|
|
|
break
|
|
|
}
|
|
|
|
|
|
return e.complexity.Access.AccessType(childComplexity), true
|
|
|
|
|
|
case "Access.action":
|
|
|
if e.complexity.Access.Action == nil {
|
|
|
break
|
|
|
}
|
|
|
|
|
|
return e.complexity.Access.Action(childComplexity), true
|
|
|
|
|
|
case "Access.id":
|
|
|
if e.complexity.Access.ID == nil {
|
|
|
break
|
|
|
}
|
|
|
|
|
|
return e.complexity.Access.ID(childComplexity), true
|
|
|
|
|
|
case "Access.icon":
|
|
|
if e.complexity.Access.Icon == nil {
|
|
|
break
|
|
|
}
|
|
|
|
|
|
return e.complexity.Access.Icon(childComplexity), true
|
|
|
|
|
|
case "Access.module":
|
|
|
if e.complexity.Access.Module == nil {
|
|
|
break
|
|
|
}
|
|
|
|
|
|
return e.complexity.Access.Module(childComplexity), true
|
|
|
|
|
|
case "Access.object":
|
|
|
if e.complexity.Access.Object == nil {
|
|
|
break
|
|
|
}
|
|
|
|
|
|
return e.complexity.Access.Object(childComplexity), true
|
|
|
|
|
|
case "Access.parentId":
|
|
|
if e.complexity.Access.ParentID == nil {
|
|
|
break
|
|
|
}
|
|
|
|
|
|
return e.complexity.Access.ParentID(childComplexity), true
|
|
|
|
|
|
case "Access.sort":
|
|
|
if e.complexity.Access.Sort == nil {
|
|
|
break
|
|
|
}
|
|
|
|
|
|
return e.complexity.Access.Sort(childComplexity), true
|
|
|
|
|
|
case "Access.status":
|
|
|
if e.complexity.Access.Status == nil {
|
|
|
break
|
|
|
}
|
|
|
|
|
|
return e.complexity.Access.Status(childComplexity), true
|
|
|
|
|
|
case "Access.user":
|
|
|
if e.complexity.Access.User == nil {
|
|
|
break
|
|
|
}
|
|
|
|
|
|
return e.complexity.Access.User(childComplexity), true
|
|
|
|
|
|
case "ClientPackageInfo.FileName":
|
|
|
if e.complexity.ClientPackageInfo.FileName == nil {
|
|
|
break
|
|
|
}
|
|
|
|
|
|
return e.complexity.ClientPackageInfo.FileName(childComplexity), true
|
|
|
|
|
|
case "ClientPackageInfo.Path":
|
|
|
if e.complexity.ClientPackageInfo.Path == nil {
|
|
|
break
|
|
|
}
|
|
|
|
|
|
return e.complexity.ClientPackageInfo.Path(childComplexity), true
|
|
|
|
|
|
case "ClientVersion.clientPackageInfo":
|
|
|
if e.complexity.ClientVersion.ClientPackageInfo == nil {
|
|
|
break
|
|
|
}
|
|
|
|
|
|
return e.complexity.ClientVersion.ClientPackageInfo(childComplexity), true
|
|
|
|
|
|
case "ClientVersion.commiter":
|
|
|
if e.complexity.ClientVersion.Commiter == nil {
|
|
|
break
|
|
|
}
|
|
|
|
|
|
return e.complexity.ClientVersion.Commiter(childComplexity), true
|
|
|
|
|
|
case "ClientVersion.createTime":
|
|
|
if e.complexity.ClientVersion.CreateTime == nil {
|
|
|
break
|
|
|
}
|
|
|
|
|
|
return e.complexity.ClientVersion.CreateTime(childComplexity), true
|
|
|
|
|
|
case "ClientVersion.id":
|
|
|
if e.complexity.ClientVersion.Id == nil {
|
|
|
break
|
|
|
}
|
|
|
|
|
|
return e.complexity.ClientVersion.Id(childComplexity), true
|
|
|
|
|
|
case "ClientVersion.projectName":
|
|
|
if e.complexity.ClientVersion.ProjectName == nil {
|
|
|
break
|
|
|
}
|
|
|
|
|
|
return e.complexity.ClientVersion.ProjectName(childComplexity), true
|
|
|
|
|
|
case "ClientVersion.remark":
|
|
|
if e.complexity.ClientVersion.Remark == nil {
|
|
|
break
|
|
|
}
|
|
|
|
|
|
return e.complexity.ClientVersion.Remark(childComplexity), true
|
|
|
|
|
|
case "ClientVersion.title":
|
|
|
if e.complexity.ClientVersion.Title == nil {
|
|
|
break
|
|
|
}
|
|
|
|
|
|
return e.complexity.ClientVersion.Title(childComplexity), true
|
|
|
|
|
|
case "ClientVersion.version":
|
|
|
if e.complexity.ClientVersion.Version == nil {
|
|
|
break
|
|
|
}
|
|
|
|
|
|
return e.complexity.ClientVersion.Version(childComplexity), true
|
|
|
|
|
|
case "Mutation.createMenu":
|
|
|
if e.complexity.Mutation.CreateMenu == nil {
|
|
|
break
|
|
|
}
|
|
|
|
|
|
args, err := ec.field_Mutation_createMenu_args(context.TODO(), rawArgs)
|
|
|
if err != nil {
|
|
|
return 0, false
|
|
|
}
|
|
|
|
|
|
return e.complexity.Mutation.CreateMenu(childComplexity, args["input"].(*model.MenuAccessInput)), true
|
|
|
|
|
|
case "Mutation.createUsers":
|
|
|
if e.complexity.Mutation.CreateUsers == nil {
|
|
|
break
|
...
|
...
|
@@ -138,6 +358,42 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in |
|
|
|
|
|
return e.complexity.Mutation.UpdateUsers(childComplexity, args["input"].(model.UpdateUsersInput)), true
|
|
|
|
|
|
case "Query.clientVersion":
|
|
|
if e.complexity.Query.ClientVersion == nil {
|
|
|
break
|
|
|
}
|
|
|
|
|
|
args, err := ec.field_Query_clientVersion_args(context.TODO(), rawArgs)
|
|
|
if err != nil {
|
|
|
return 0, false
|
|
|
}
|
|
|
|
|
|
return e.complexity.Query.ClientVersion(childComplexity, args["id"].(*int)), true
|
|
|
|
|
|
case "Query.menu":
|
|
|
if e.complexity.Query.Menu == nil {
|
|
|
break
|
|
|
}
|
|
|
|
|
|
args, err := ec.field_Query_menu_args(context.TODO(), rawArgs)
|
|
|
if err != nil {
|
|
|
return 0, false
|
|
|
}
|
|
|
|
|
|
return e.complexity.Query.Menu(childComplexity, args["input"].(*model.MenuAccessInput)), true
|
|
|
|
|
|
case "Query.menus":
|
|
|
if e.complexity.Query.Menus == nil {
|
|
|
break
|
|
|
}
|
|
|
|
|
|
args, err := ec.field_Query_menus_args(context.TODO(), rawArgs)
|
|
|
if err != nil {
|
|
|
return 0, false
|
|
|
}
|
|
|
|
|
|
return e.complexity.Query.Menus(childComplexity, args["input"].(*model.MenuAccessInput)), true
|
|
|
|
|
|
case "Query.user":
|
|
|
if e.complexity.Query.User == nil {
|
|
|
break
|
...
|
...
|
@@ -162,6 +418,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in |
|
|
|
|
|
return e.complexity.Query.Users(childComplexity, args["input"].(model.ListUsersInput)), true
|
|
|
|
|
|
case "Role.access":
|
|
|
if e.complexity.Role.Access == nil {
|
|
|
break
|
|
|
}
|
|
|
|
|
|
return e.complexity.Role.Access(childComplexity), true
|
|
|
|
|
|
case "Role.createTime":
|
|
|
if e.complexity.Role.CreateTime == nil {
|
|
|
break
|
...
|
...
|
@@ -310,7 +573,9 @@ func (ec *executionContext) introspectType(name string) (*introspection.Type, er |
|
|
}
|
|
|
|
|
|
var sources = []*ast.Source{
|
|
|
{Name: "graph/schema.graphqls", Input: `## type
|
|
|
{Name: "graph/schema.graphqls", Input: `scalar Date
|
|
|
|
|
|
## type
|
|
|
type Users{
|
|
|
name: String
|
|
|
phone: String
|
...
|
...
|
@@ -326,6 +591,22 @@ type Role{ |
|
|
parentId: Int
|
|
|
createTime: String
|
|
|
updateTime: String
|
|
|
access:[Access!]
|
|
|
}
|
|
|
type ClientVersion{
|
|
|
id: Int
|
|
|
commiter: String
|
|
|
projectName: String
|
|
|
version: String
|
|
|
title: String
|
|
|
remark: String
|
|
|
clientPackageInfo: [ClientPackageInfo!]
|
|
|
createTime: Date
|
|
|
}
|
|
|
|
|
|
type ClientPackageInfo{
|
|
|
FileName: String
|
|
|
Path: String
|
|
|
}
|
|
|
|
|
|
## user input
|
...
|
...
|
@@ -351,6 +632,10 @@ input listUsersInput{ |
|
|
type Query {
|
|
|
user(input : getUsersInput!): Users!
|
|
|
users(input : listUsersInput!): [Users!]
|
|
|
|
|
|
menus(input: menuAccessInput): [Access!]
|
|
|
|
|
|
clientVersion(id :Int):ClientVersion!
|
|
|
}
|
|
|
|
|
|
type Mutation{
|
...
|
...
|
@@ -358,6 +643,32 @@ type Mutation{ |
|
|
removeUsers(input : removeUsersInput!): Users!
|
|
|
updateUsers(input : updateUsersInput!): Users!
|
|
|
}`, BuiltIn: false},
|
|
|
{Name: "graph/access/access.graphqls", Input: `## type
|
|
|
type Access{
|
|
|
id: Int
|
|
|
parentId: Int
|
|
|
accessName: String
|
|
|
accessCode: String
|
|
|
accessType: String
|
|
|
sort: Int
|
|
|
object: String
|
|
|
action: String
|
|
|
module: String
|
|
|
icon: String
|
|
|
status: Int
|
|
|
user: Users
|
|
|
}
|
|
|
|
|
|
## input
|
|
|
input menuAccessInput{
|
|
|
name: String
|
|
|
}
|
|
|
extend type Query {
|
|
|
menu(input: menuAccessInput): [Access!]
|
|
|
}
|
|
|
extend type Mutation {
|
|
|
createMenu(input: menuAccessInput): [Access!]
|
|
|
}`, BuiltIn: false},
|
|
|
}
|
|
|
var parsedSchema = gqlparser.MustLoadSchema(sources...)
|
|
|
|
...
|
...
|
@@ -365,6 +676,21 @@ var parsedSchema = gqlparser.MustLoadSchema(sources...) |
|
|
|
|
|
// region ***************************** args.gotpl *****************************
|
|
|
|
|
|
func (ec *executionContext) field_Mutation_createMenu_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
|
var err error
|
|
|
args := map[string]interface{}{}
|
|
|
var arg0 *model.MenuAccessInput
|
|
|
if tmp, ok := rawArgs["input"]; ok {
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
|
|
|
arg0, err = ec.unmarshalOmenuAccessInput2ᚖgithubᚗcomᚋtiptokᚋgodevpᚋpkgᚋportᚋgraphqlᚋgraphᚋmodelᚐMenuAccessInput(ctx, tmp)
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
|
}
|
|
|
args["input"] = arg0
|
|
|
return args, nil
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) field_Mutation_createUsers_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
|
var err error
|
|
|
args := map[string]interface{}{}
|
...
|
...
|
@@ -425,6 +751,51 @@ func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs |
|
|
return args, nil
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) field_Query_clientVersion_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["id"]; ok {
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
|
|
|
arg0, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
|
}
|
|
|
args["id"] = arg0
|
|
|
return args, nil
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) field_Query_menu_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
|
var err error
|
|
|
args := map[string]interface{}{}
|
|
|
var arg0 *model.MenuAccessInput
|
|
|
if tmp, ok := rawArgs["input"]; ok {
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
|
|
|
arg0, err = ec.unmarshalOmenuAccessInput2ᚖgithubᚗcomᚋtiptokᚋgodevpᚋpkgᚋportᚋgraphqlᚋgraphᚋmodelᚐMenuAccessInput(ctx, tmp)
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
|
}
|
|
|
args["input"] = arg0
|
|
|
return args, nil
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) field_Query_menus_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
|
var err error
|
|
|
args := map[string]interface{}{}
|
|
|
var arg0 *model.MenuAccessInput
|
|
|
if tmp, ok := rawArgs["input"]; ok {
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
|
|
|
arg0, err = ec.unmarshalOmenuAccessInput2ᚖgithubᚗcomᚋtiptokᚋgodevpᚋpkgᚋportᚋgraphqlᚋgraphᚋmodelᚐMenuAccessInput(ctx, tmp)
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
|
}
|
|
|
args["input"] = arg0
|
|
|
return args, nil
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) field_Query_user_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
|
var err error
|
|
|
args := map[string]interface{}{}
|
...
|
...
|
@@ -455,43 +826,747 @@ func (ec *executionContext) field_Query_users_args(ctx context.Context, rawArgs |
|
|
return args, nil
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
|
var err error
|
|
|
args := map[string]interface{}{}
|
|
|
var arg0 bool
|
|
|
if tmp, ok := rawArgs["includeDeprecated"]; ok {
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated"))
|
|
|
arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
|
var err error
|
|
|
args := map[string]interface{}{}
|
|
|
var arg0 bool
|
|
|
if tmp, ok := rawArgs["includeDeprecated"]; ok {
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated"))
|
|
|
arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
|
}
|
|
|
args["includeDeprecated"] = arg0
|
|
|
return args, nil
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
|
var err error
|
|
|
args := map[string]interface{}{}
|
|
|
var arg0 bool
|
|
|
if tmp, ok := rawArgs["includeDeprecated"]; ok {
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated"))
|
|
|
arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
|
}
|
|
|
args["includeDeprecated"] = arg0
|
|
|
return args, nil
|
|
|
}
|
|
|
|
|
|
// endregion ***************************** args.gotpl *****************************
|
|
|
|
|
|
// region ************************** directives.gotpl **************************
|
|
|
|
|
|
// endregion ************************** directives.gotpl **************************
|
|
|
|
|
|
// region **************************** field.gotpl *****************************
|
|
|
|
|
|
func (ec *executionContext) _Access_id(ctx context.Context, field graphql.CollectedField, obj *model.Access) (ret graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
ret = graphql.Null
|
|
|
}
|
|
|
}()
|
|
|
fc := &graphql.FieldContext{
|
|
|
Object: "Access",
|
|
|
Field: field,
|
|
|
Args: nil,
|
|
|
IsMethod: false,
|
|
|
IsResolver: false,
|
|
|
}
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
return obj.ID, nil
|
|
|
})
|
|
|
if err != nil {
|
|
|
ec.Error(ctx, err)
|
|
|
return graphql.Null
|
|
|
}
|
|
|
if resTmp == nil {
|
|
|
return graphql.Null
|
|
|
}
|
|
|
res := resTmp.(*int)
|
|
|
fc.Result = res
|
|
|
return ec.marshalOInt2ᚖint(ctx, field.Selections, res)
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) _Access_parentId(ctx context.Context, field graphql.CollectedField, obj *model.Access) (ret graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
ret = graphql.Null
|
|
|
}
|
|
|
}()
|
|
|
fc := &graphql.FieldContext{
|
|
|
Object: "Access",
|
|
|
Field: field,
|
|
|
Args: nil,
|
|
|
IsMethod: false,
|
|
|
IsResolver: false,
|
|
|
}
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
return obj.ParentID, nil
|
|
|
})
|
|
|
if err != nil {
|
|
|
ec.Error(ctx, err)
|
|
|
return graphql.Null
|
|
|
}
|
|
|
if resTmp == nil {
|
|
|
return graphql.Null
|
|
|
}
|
|
|
res := resTmp.(*int)
|
|
|
fc.Result = res
|
|
|
return ec.marshalOInt2ᚖint(ctx, field.Selections, res)
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) _Access_accessName(ctx context.Context, field graphql.CollectedField, obj *model.Access) (ret graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
ret = graphql.Null
|
|
|
}
|
|
|
}()
|
|
|
fc := &graphql.FieldContext{
|
|
|
Object: "Access",
|
|
|
Field: field,
|
|
|
Args: nil,
|
|
|
IsMethod: false,
|
|
|
IsResolver: false,
|
|
|
}
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
return obj.AccessName, nil
|
|
|
})
|
|
|
if err != nil {
|
|
|
ec.Error(ctx, err)
|
|
|
return graphql.Null
|
|
|
}
|
|
|
if resTmp == nil {
|
|
|
return graphql.Null
|
|
|
}
|
|
|
res := resTmp.(*string)
|
|
|
fc.Result = res
|
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) _Access_accessCode(ctx context.Context, field graphql.CollectedField, obj *model.Access) (ret graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
ret = graphql.Null
|
|
|
}
|
|
|
}()
|
|
|
fc := &graphql.FieldContext{
|
|
|
Object: "Access",
|
|
|
Field: field,
|
|
|
Args: nil,
|
|
|
IsMethod: false,
|
|
|
IsResolver: false,
|
|
|
}
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
return obj.AccessCode, nil
|
|
|
})
|
|
|
if err != nil {
|
|
|
ec.Error(ctx, err)
|
|
|
return graphql.Null
|
|
|
}
|
|
|
if resTmp == nil {
|
|
|
return graphql.Null
|
|
|
}
|
|
|
res := resTmp.(*string)
|
|
|
fc.Result = res
|
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) _Access_accessType(ctx context.Context, field graphql.CollectedField, obj *model.Access) (ret graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
ret = graphql.Null
|
|
|
}
|
|
|
}()
|
|
|
fc := &graphql.FieldContext{
|
|
|
Object: "Access",
|
|
|
Field: field,
|
|
|
Args: nil,
|
|
|
IsMethod: false,
|
|
|
IsResolver: false,
|
|
|
}
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
return obj.AccessType, nil
|
|
|
})
|
|
|
if err != nil {
|
|
|
ec.Error(ctx, err)
|
|
|
return graphql.Null
|
|
|
}
|
|
|
if resTmp == nil {
|
|
|
return graphql.Null
|
|
|
}
|
|
|
res := resTmp.(*string)
|
|
|
fc.Result = res
|
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) _Access_sort(ctx context.Context, field graphql.CollectedField, obj *model.Access) (ret graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
ret = graphql.Null
|
|
|
}
|
|
|
}()
|
|
|
fc := &graphql.FieldContext{
|
|
|
Object: "Access",
|
|
|
Field: field,
|
|
|
Args: nil,
|
|
|
IsMethod: false,
|
|
|
IsResolver: false,
|
|
|
}
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
return obj.Sort, nil
|
|
|
})
|
|
|
if err != nil {
|
|
|
ec.Error(ctx, err)
|
|
|
return graphql.Null
|
|
|
}
|
|
|
if resTmp == nil {
|
|
|
return graphql.Null
|
|
|
}
|
|
|
res := resTmp.(*int)
|
|
|
fc.Result = res
|
|
|
return ec.marshalOInt2ᚖint(ctx, field.Selections, res)
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) _Access_object(ctx context.Context, field graphql.CollectedField, obj *model.Access) (ret graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
ret = graphql.Null
|
|
|
}
|
|
|
}()
|
|
|
fc := &graphql.FieldContext{
|
|
|
Object: "Access",
|
|
|
Field: field,
|
|
|
Args: nil,
|
|
|
IsMethod: false,
|
|
|
IsResolver: false,
|
|
|
}
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
return obj.Object, nil
|
|
|
})
|
|
|
if err != nil {
|
|
|
ec.Error(ctx, err)
|
|
|
return graphql.Null
|
|
|
}
|
|
|
if resTmp == nil {
|
|
|
return graphql.Null
|
|
|
}
|
|
|
res := resTmp.(*string)
|
|
|
fc.Result = res
|
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) _Access_action(ctx context.Context, field graphql.CollectedField, obj *model.Access) (ret graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
ret = graphql.Null
|
|
|
}
|
|
|
}()
|
|
|
fc := &graphql.FieldContext{
|
|
|
Object: "Access",
|
|
|
Field: field,
|
|
|
Args: nil,
|
|
|
IsMethod: false,
|
|
|
IsResolver: false,
|
|
|
}
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
return obj.Action, nil
|
|
|
})
|
|
|
if err != nil {
|
|
|
ec.Error(ctx, err)
|
|
|
return graphql.Null
|
|
|
}
|
|
|
if resTmp == nil {
|
|
|
return graphql.Null
|
|
|
}
|
|
|
res := resTmp.(*string)
|
|
|
fc.Result = res
|
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) _Access_module(ctx context.Context, field graphql.CollectedField, obj *model.Access) (ret graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
ret = graphql.Null
|
|
|
}
|
|
|
}()
|
|
|
fc := &graphql.FieldContext{
|
|
|
Object: "Access",
|
|
|
Field: field,
|
|
|
Args: nil,
|
|
|
IsMethod: false,
|
|
|
IsResolver: false,
|
|
|
}
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
return obj.Module, nil
|
|
|
})
|
|
|
if err != nil {
|
|
|
ec.Error(ctx, err)
|
|
|
return graphql.Null
|
|
|
}
|
|
|
if resTmp == nil {
|
|
|
return graphql.Null
|
|
|
}
|
|
|
res := resTmp.(*string)
|
|
|
fc.Result = res
|
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) _Access_icon(ctx context.Context, field graphql.CollectedField, obj *model.Access) (ret graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
ret = graphql.Null
|
|
|
}
|
|
|
}()
|
|
|
fc := &graphql.FieldContext{
|
|
|
Object: "Access",
|
|
|
Field: field,
|
|
|
Args: nil,
|
|
|
IsMethod: false,
|
|
|
IsResolver: false,
|
|
|
}
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
return obj.Icon, nil
|
|
|
})
|
|
|
if err != nil {
|
|
|
ec.Error(ctx, err)
|
|
|
return graphql.Null
|
|
|
}
|
|
|
if resTmp == nil {
|
|
|
return graphql.Null
|
|
|
}
|
|
|
res := resTmp.(*string)
|
|
|
fc.Result = res
|
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) _Access_status(ctx context.Context, field graphql.CollectedField, obj *model.Access) (ret graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
ret = graphql.Null
|
|
|
}
|
|
|
}()
|
|
|
fc := &graphql.FieldContext{
|
|
|
Object: "Access",
|
|
|
Field: field,
|
|
|
Args: nil,
|
|
|
IsMethod: false,
|
|
|
IsResolver: false,
|
|
|
}
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
return obj.Status, nil
|
|
|
})
|
|
|
if err != nil {
|
|
|
ec.Error(ctx, err)
|
|
|
return graphql.Null
|
|
|
}
|
|
|
if resTmp == nil {
|
|
|
return graphql.Null
|
|
|
}
|
|
|
res := resTmp.(*int)
|
|
|
fc.Result = res
|
|
|
return ec.marshalOInt2ᚖint(ctx, field.Selections, res)
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) _Access_user(ctx context.Context, field graphql.CollectedField, obj *model.Access) (ret graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
ret = graphql.Null
|
|
|
}
|
|
|
}()
|
|
|
fc := &graphql.FieldContext{
|
|
|
Object: "Access",
|
|
|
Field: field,
|
|
|
Args: nil,
|
|
|
IsMethod: true,
|
|
|
IsResolver: true,
|
|
|
}
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
return ec.resolvers.Access().User(rctx, obj)
|
|
|
})
|
|
|
if err != nil {
|
|
|
ec.Error(ctx, err)
|
|
|
return graphql.Null
|
|
|
}
|
|
|
if resTmp == nil {
|
|
|
return graphql.Null
|
|
|
}
|
|
|
res := resTmp.(*model.Users)
|
|
|
fc.Result = res
|
|
|
return ec.marshalOUsers2ᚖgithubᚗcomᚋtiptokᚋgodevpᚋpkgᚋportᚋgraphqlᚋgraphᚋmodelᚐUsers(ctx, field.Selections, res)
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) _ClientPackageInfo_FileName(ctx context.Context, field graphql.CollectedField, obj *domain.ClientPackageInfo) (ret graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
ret = graphql.Null
|
|
|
}
|
|
|
}()
|
|
|
fc := &graphql.FieldContext{
|
|
|
Object: "ClientPackageInfo",
|
|
|
Field: field,
|
|
|
Args: nil,
|
|
|
IsMethod: false,
|
|
|
IsResolver: false,
|
|
|
}
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
return obj.FileName, 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) _ClientPackageInfo_Path(ctx context.Context, field graphql.CollectedField, obj *domain.ClientPackageInfo) (ret graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
ret = graphql.Null
|
|
|
}
|
|
|
}()
|
|
|
fc := &graphql.FieldContext{
|
|
|
Object: "ClientPackageInfo",
|
|
|
Field: field,
|
|
|
Args: nil,
|
|
|
IsMethod: false,
|
|
|
IsResolver: false,
|
|
|
}
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
return obj.Path, 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) _ClientVersion_id(ctx context.Context, field graphql.CollectedField, obj *domain.ClientVersion) (ret graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
ret = graphql.Null
|
|
|
}
|
|
|
}()
|
|
|
fc := &graphql.FieldContext{
|
|
|
Object: "ClientVersion",
|
|
|
Field: field,
|
|
|
Args: nil,
|
|
|
IsMethod: false,
|
|
|
IsResolver: false,
|
|
|
}
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
return obj.Id, nil
|
|
|
})
|
|
|
if err != nil {
|
|
|
ec.Error(ctx, err)
|
|
|
return graphql.Null
|
|
|
}
|
|
|
if resTmp == nil {
|
|
|
return graphql.Null
|
|
|
}
|
|
|
res := resTmp.(int64)
|
|
|
fc.Result = res
|
|
|
return ec.marshalOInt2int64(ctx, field.Selections, res)
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) _ClientVersion_commiter(ctx context.Context, field graphql.CollectedField, obj *domain.ClientVersion) (ret graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
ret = graphql.Null
|
|
|
}
|
|
|
}()
|
|
|
fc := &graphql.FieldContext{
|
|
|
Object: "ClientVersion",
|
|
|
Field: field,
|
|
|
Args: nil,
|
|
|
IsMethod: false,
|
|
|
IsResolver: false,
|
|
|
}
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
return obj.Commiter, 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) _ClientVersion_projectName(ctx context.Context, field graphql.CollectedField, obj *domain.ClientVersion) (ret graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
ret = graphql.Null
|
|
|
}
|
|
|
}()
|
|
|
fc := &graphql.FieldContext{
|
|
|
Object: "ClientVersion",
|
|
|
Field: field,
|
|
|
Args: nil,
|
|
|
IsMethod: false,
|
|
|
IsResolver: false,
|
|
|
}
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
return obj.ProjectName, 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) _ClientVersion_version(ctx context.Context, field graphql.CollectedField, obj *domain.ClientVersion) (ret graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
ret = graphql.Null
|
|
|
}
|
|
|
}()
|
|
|
fc := &graphql.FieldContext{
|
|
|
Object: "ClientVersion",
|
|
|
Field: field,
|
|
|
Args: nil,
|
|
|
IsMethod: false,
|
|
|
IsResolver: false,
|
|
|
}
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
return obj.Version, 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) _ClientVersion_title(ctx context.Context, field graphql.CollectedField, obj *domain.ClientVersion) (ret graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
ret = graphql.Null
|
|
|
}
|
|
|
}()
|
|
|
fc := &graphql.FieldContext{
|
|
|
Object: "ClientVersion",
|
|
|
Field: field,
|
|
|
Args: nil,
|
|
|
IsMethod: false,
|
|
|
IsResolver: false,
|
|
|
}
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
return obj.Title, 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) _ClientVersion_remark(ctx context.Context, field graphql.CollectedField, obj *domain.ClientVersion) (ret graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
ret = graphql.Null
|
|
|
}
|
|
|
}()
|
|
|
fc := &graphql.FieldContext{
|
|
|
Object: "ClientVersion",
|
|
|
Field: field,
|
|
|
Args: nil,
|
|
|
IsMethod: false,
|
|
|
IsResolver: false,
|
|
|
}
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
return obj.Remark, 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) _ClientVersion_clientPackageInfo(ctx context.Context, field graphql.CollectedField, obj *domain.ClientVersion) (ret graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
ret = graphql.Null
|
|
|
}
|
|
|
}()
|
|
|
fc := &graphql.FieldContext{
|
|
|
Object: "ClientVersion",
|
|
|
Field: field,
|
|
|
Args: nil,
|
|
|
IsMethod: false,
|
|
|
IsResolver: false,
|
|
|
}
|
|
|
args["includeDeprecated"] = arg0
|
|
|
return args, nil
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
|
var err error
|
|
|
args := map[string]interface{}{}
|
|
|
var arg0 bool
|
|
|
if tmp, ok := rawArgs["includeDeprecated"]; ok {
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated"))
|
|
|
arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
return obj.ClientPackageInfo, nil
|
|
|
})
|
|
|
if err != nil {
|
|
|
ec.Error(ctx, err)
|
|
|
return graphql.Null
|
|
|
}
|
|
|
args["includeDeprecated"] = arg0
|
|
|
return args, nil
|
|
|
if resTmp == nil {
|
|
|
return graphql.Null
|
|
|
}
|
|
|
res := resTmp.([]*domain.ClientPackageInfo)
|
|
|
fc.Result = res
|
|
|
return ec.marshalOClientPackageInfo2ᚕᚖgithubᚗcomᚋtiptokᚋgodevpᚋpkgᚋdomainᚐClientPackageInfoᚄ(ctx, field.Selections, res)
|
|
|
}
|
|
|
|
|
|
// endregion ***************************** args.gotpl *****************************
|
|
|
|
|
|
// region ************************** directives.gotpl **************************
|
|
|
|
|
|
// endregion ************************** directives.gotpl **************************
|
|
|
func (ec *executionContext) _ClientVersion_createTime(ctx context.Context, field graphql.CollectedField, obj *domain.ClientVersion) (ret graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
ret = graphql.Null
|
|
|
}
|
|
|
}()
|
|
|
fc := &graphql.FieldContext{
|
|
|
Object: "ClientVersion",
|
|
|
Field: field,
|
|
|
Args: nil,
|
|
|
IsMethod: true,
|
|
|
IsResolver: true,
|
|
|
}
|
|
|
|
|
|
// region **************************** field.gotpl *****************************
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
return ec.resolvers.ClientVersion().CreateTime(rctx, obj)
|
|
|
})
|
|
|
if err != nil {
|
|
|
ec.Error(ctx, err)
|
|
|
return graphql.Null
|
|
|
}
|
|
|
if resTmp == nil {
|
|
|
return graphql.Null
|
|
|
}
|
|
|
res := resTmp.(*libs.Datetime)
|
|
|
fc.Result = res
|
|
|
return ec.marshalODate2ᚖgithubᚗcomᚋtiptokᚋgodevpᚋpkgᚋportᚋgraphqlᚋgraphᚋlibsᚐDatetime(ctx, field.Selections, res)
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) _Mutation_createUsers(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
|
defer func() {
|
...
|
...
|
@@ -619,6 +1694,45 @@ func (ec *executionContext) _Mutation_updateUsers(ctx context.Context, field gra |
|
|
return ec.marshalNUsers2ᚖgithubᚗcomᚋtiptokᚋgodevpᚋpkgᚋportᚋgraphqlᚋgraphᚋmodelᚐUsers(ctx, field.Selections, res)
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) _Mutation_createMenu(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
ret = graphql.Null
|
|
|
}
|
|
|
}()
|
|
|
fc := &graphql.FieldContext{
|
|
|
Object: "Mutation",
|
|
|
Field: field,
|
|
|
Args: nil,
|
|
|
IsMethod: true,
|
|
|
IsResolver: true,
|
|
|
}
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
|
args, err := ec.field_Mutation_createMenu_args(ctx, rawArgs)
|
|
|
if err != nil {
|
|
|
ec.Error(ctx, err)
|
|
|
return graphql.Null
|
|
|
}
|
|
|
fc.Args = args
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
return ec.resolvers.Mutation().CreateMenu(rctx, args["input"].(*model.MenuAccessInput))
|
|
|
})
|
|
|
if err != nil {
|
|
|
ec.Error(ctx, err)
|
|
|
return graphql.Null
|
|
|
}
|
|
|
if resTmp == nil {
|
|
|
return graphql.Null
|
|
|
}
|
|
|
res := resTmp.([]*model.Access)
|
|
|
fc.Result = res
|
|
|
return ec.marshalOAccess2ᚕᚖgithubᚗcomᚋtiptokᚋgodevpᚋpkgᚋportᚋgraphqlᚋgraphᚋmodelᚐAccessᚄ(ctx, field.Selections, res)
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) _Query_user(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
...
|
...
|
@@ -700,6 +1814,126 @@ func (ec *executionContext) _Query_users(ctx context.Context, field graphql.Coll |
|
|
return ec.marshalOUsers2ᚕᚖgithubᚗcomᚋtiptokᚋgodevpᚋpkgᚋportᚋgraphqlᚋgraphᚋmodelᚐUsersᚄ(ctx, field.Selections, res)
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) _Query_menus(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
ret = graphql.Null
|
|
|
}
|
|
|
}()
|
|
|
fc := &graphql.FieldContext{
|
|
|
Object: "Query",
|
|
|
Field: field,
|
|
|
Args: nil,
|
|
|
IsMethod: true,
|
|
|
IsResolver: true,
|
|
|
}
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
|
args, err := ec.field_Query_menus_args(ctx, rawArgs)
|
|
|
if err != nil {
|
|
|
ec.Error(ctx, err)
|
|
|
return graphql.Null
|
|
|
}
|
|
|
fc.Args = args
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
return ec.resolvers.Query().Menus(rctx, args["input"].(*model.MenuAccessInput))
|
|
|
})
|
|
|
if err != nil {
|
|
|
ec.Error(ctx, err)
|
|
|
return graphql.Null
|
|
|
}
|
|
|
if resTmp == nil {
|
|
|
return graphql.Null
|
|
|
}
|
|
|
res := resTmp.([]*model.Access)
|
|
|
fc.Result = res
|
|
|
return ec.marshalOAccess2ᚕᚖgithubᚗcomᚋtiptokᚋgodevpᚋpkgᚋportᚋgraphqlᚋgraphᚋmodelᚐAccessᚄ(ctx, field.Selections, res)
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) _Query_clientVersion(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
ret = graphql.Null
|
|
|
}
|
|
|
}()
|
|
|
fc := &graphql.FieldContext{
|
|
|
Object: "Query",
|
|
|
Field: field,
|
|
|
Args: nil,
|
|
|
IsMethod: true,
|
|
|
IsResolver: true,
|
|
|
}
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
|
args, err := ec.field_Query_clientVersion_args(ctx, rawArgs)
|
|
|
if err != nil {
|
|
|
ec.Error(ctx, err)
|
|
|
return graphql.Null
|
|
|
}
|
|
|
fc.Args = args
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
return ec.resolvers.Query().ClientVersion(rctx, args["id"].(*int))
|
|
|
})
|
|
|
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.(*domain.ClientVersion)
|
|
|
fc.Result = res
|
|
|
return ec.marshalNClientVersion2ᚖgithubᚗcomᚋtiptokᚋgodevpᚋpkgᚋdomainᚐClientVersion(ctx, field.Selections, res)
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) _Query_menu(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
ret = graphql.Null
|
|
|
}
|
|
|
}()
|
|
|
fc := &graphql.FieldContext{
|
|
|
Object: "Query",
|
|
|
Field: field,
|
|
|
Args: nil,
|
|
|
IsMethod: true,
|
|
|
IsResolver: true,
|
|
|
}
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
|
args, err := ec.field_Query_menu_args(ctx, rawArgs)
|
|
|
if err != nil {
|
|
|
ec.Error(ctx, err)
|
|
|
return graphql.Null
|
|
|
}
|
|
|
fc.Args = args
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
return ec.resolvers.Query().Menu(rctx, args["input"].(*model.MenuAccessInput))
|
|
|
})
|
|
|
if err != nil {
|
|
|
ec.Error(ctx, err)
|
|
|
return graphql.Null
|
|
|
}
|
|
|
if resTmp == nil {
|
|
|
return graphql.Null
|
|
|
}
|
|
|
res := resTmp.([]*model.Access)
|
|
|
fc.Result = res
|
|
|
return ec.marshalOAccess2ᚕᚖgithubᚗcomᚋtiptokᚋgodevpᚋpkgᚋportᚋgraphqlᚋgraphᚋmodelᚐAccessᚄ(ctx, field.Selections, res)
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
...
|
...
|
@@ -931,6 +2165,38 @@ func (ec *executionContext) _Role_updateTime(ctx context.Context, field graphql. |
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) _Role_access(ctx context.Context, field graphql.CollectedField, obj *model.Role) (ret graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
ret = graphql.Null
|
|
|
}
|
|
|
}()
|
|
|
fc := &graphql.FieldContext{
|
|
|
Object: "Role",
|
|
|
Field: field,
|
|
|
Args: nil,
|
|
|
IsMethod: true,
|
|
|
IsResolver: true,
|
|
|
}
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
return ec.resolvers.Role().Access(rctx, obj)
|
|
|
})
|
|
|
if err != nil {
|
|
|
ec.Error(ctx, err)
|
|
|
return graphql.Null
|
|
|
}
|
|
|
if resTmp == nil {
|
|
|
return graphql.Null
|
|
|
}
|
|
|
res := resTmp.([]*model.Access)
|
|
|
fc.Result = res
|
|
|
return ec.marshalOAccess2ᚕᚖgithubᚗcomᚋtiptokᚋgodevpᚋpkgᚋportᚋgraphqlᚋgraphᚋmodelᚐAccessᚄ(ctx, field.Selections, res)
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) _Users_name(ctx context.Context, field graphql.CollectedField, obj *model.Users) (ret graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
...
|
...
|
@@ -2307,8 +3573,28 @@ func (ec *executionContext) unmarshalInputlistUsersInput(ctx context.Context, ob |
|
|
case "limit":
|
|
|
var err error
|
|
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("limit"))
|
|
|
it.Limit, err = ec.unmarshalNInt2int(ctx, v)
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("limit"))
|
|
|
it.Limit, err = ec.unmarshalNInt2int(ctx, v)
|
|
|
if err != nil {
|
|
|
return it, err
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return it, nil
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) unmarshalInputmenuAccessInput(ctx context.Context, obj interface{}) (model.MenuAccessInput, error) {
|
|
|
var it model.MenuAccessInput
|
|
|
var asMap = obj.(map[string]interface{})
|
|
|
|
|
|
for k, v := range asMap {
|
|
|
switch k {
|
|
|
case "name":
|
|
|
var err error
|
|
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
|
|
|
it.Name, err = ec.unmarshalOString2ᚖstring(ctx, v)
|
|
|
if err != nil {
|
|
|
return it, err
|
|
|
}
|
...
|
...
|
@@ -2374,6 +3660,134 @@ func (ec *executionContext) unmarshalInputupdateUsersInput(ctx context.Context, |
|
|
|
|
|
// region **************************** object.gotpl ****************************
|
|
|
|
|
|
var accessImplementors = []string{"Access"}
|
|
|
|
|
|
func (ec *executionContext) _Access(ctx context.Context, sel ast.SelectionSet, obj *model.Access) graphql.Marshaler {
|
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, accessImplementors)
|
|
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
|
var invalids uint32
|
|
|
for i, field := range fields {
|
|
|
switch field.Name {
|
|
|
case "__typename":
|
|
|
out.Values[i] = graphql.MarshalString("Access")
|
|
|
case "id":
|
|
|
out.Values[i] = ec._Access_id(ctx, field, obj)
|
|
|
case "parentId":
|
|
|
out.Values[i] = ec._Access_parentId(ctx, field, obj)
|
|
|
case "accessName":
|
|
|
out.Values[i] = ec._Access_accessName(ctx, field, obj)
|
|
|
case "accessCode":
|
|
|
out.Values[i] = ec._Access_accessCode(ctx, field, obj)
|
|
|
case "accessType":
|
|
|
out.Values[i] = ec._Access_accessType(ctx, field, obj)
|
|
|
case "sort":
|
|
|
out.Values[i] = ec._Access_sort(ctx, field, obj)
|
|
|
case "object":
|
|
|
out.Values[i] = ec._Access_object(ctx, field, obj)
|
|
|
case "action":
|
|
|
out.Values[i] = ec._Access_action(ctx, field, obj)
|
|
|
case "module":
|
|
|
out.Values[i] = ec._Access_module(ctx, field, obj)
|
|
|
case "icon":
|
|
|
out.Values[i] = ec._Access_icon(ctx, field, obj)
|
|
|
case "status":
|
|
|
out.Values[i] = ec._Access_status(ctx, field, obj)
|
|
|
case "user":
|
|
|
field := field
|
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
}
|
|
|
}()
|
|
|
res = ec._Access_user(ctx, field, obj)
|
|
|
return res
|
|
|
})
|
|
|
default:
|
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
|
}
|
|
|
}
|
|
|
out.Dispatch()
|
|
|
if invalids > 0 {
|
|
|
return graphql.Null
|
|
|
}
|
|
|
return out
|
|
|
}
|
|
|
|
|
|
var clientPackageInfoImplementors = []string{"ClientPackageInfo"}
|
|
|
|
|
|
func (ec *executionContext) _ClientPackageInfo(ctx context.Context, sel ast.SelectionSet, obj *domain.ClientPackageInfo) graphql.Marshaler {
|
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, clientPackageInfoImplementors)
|
|
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
|
var invalids uint32
|
|
|
for i, field := range fields {
|
|
|
switch field.Name {
|
|
|
case "__typename":
|
|
|
out.Values[i] = graphql.MarshalString("ClientPackageInfo")
|
|
|
case "FileName":
|
|
|
out.Values[i] = ec._ClientPackageInfo_FileName(ctx, field, obj)
|
|
|
case "Path":
|
|
|
out.Values[i] = ec._ClientPackageInfo_Path(ctx, field, obj)
|
|
|
default:
|
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
|
}
|
|
|
}
|
|
|
out.Dispatch()
|
|
|
if invalids > 0 {
|
|
|
return graphql.Null
|
|
|
}
|
|
|
return out
|
|
|
}
|
|
|
|
|
|
var clientVersionImplementors = []string{"ClientVersion"}
|
|
|
|
|
|
func (ec *executionContext) _ClientVersion(ctx context.Context, sel ast.SelectionSet, obj *domain.ClientVersion) graphql.Marshaler {
|
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, clientVersionImplementors)
|
|
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
|
var invalids uint32
|
|
|
for i, field := range fields {
|
|
|
switch field.Name {
|
|
|
case "__typename":
|
|
|
out.Values[i] = graphql.MarshalString("ClientVersion")
|
|
|
case "id":
|
|
|
out.Values[i] = ec._ClientVersion_id(ctx, field, obj)
|
|
|
case "commiter":
|
|
|
out.Values[i] = ec._ClientVersion_commiter(ctx, field, obj)
|
|
|
case "projectName":
|
|
|
out.Values[i] = ec._ClientVersion_projectName(ctx, field, obj)
|
|
|
case "version":
|
|
|
out.Values[i] = ec._ClientVersion_version(ctx, field, obj)
|
|
|
case "title":
|
|
|
out.Values[i] = ec._ClientVersion_title(ctx, field, obj)
|
|
|
case "remark":
|
|
|
out.Values[i] = ec._ClientVersion_remark(ctx, field, obj)
|
|
|
case "clientPackageInfo":
|
|
|
out.Values[i] = ec._ClientVersion_clientPackageInfo(ctx, field, obj)
|
|
|
case "createTime":
|
|
|
field := field
|
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
}
|
|
|
}()
|
|
|
res = ec._ClientVersion_createTime(ctx, field, obj)
|
|
|
return res
|
|
|
})
|
|
|
default:
|
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
|
}
|
|
|
}
|
|
|
out.Dispatch()
|
|
|
if invalids > 0 {
|
|
|
return graphql.Null
|
|
|
}
|
|
|
return out
|
|
|
}
|
|
|
|
|
|
var mutationImplementors = []string{"Mutation"}
|
|
|
|
|
|
func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
|
...
|
...
|
@@ -2404,6 +3818,8 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) |
|
|
if out.Values[i] == graphql.Null {
|
|
|
invalids++
|
|
|
}
|
|
|
case "createMenu":
|
|
|
out.Values[i] = ec._Mutation_createMenu(ctx, field)
|
|
|
default:
|
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
|
}
|
...
|
...
|
@@ -2455,6 +3871,42 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr |
|
|
res = ec._Query_users(ctx, field)
|
|
|
return res
|
|
|
})
|
|
|
case "menus":
|
|
|
field := field
|
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
}
|
|
|
}()
|
|
|
res = ec._Query_menus(ctx, field)
|
|
|
return res
|
|
|
})
|
|
|
case "clientVersion":
|
|
|
field := field
|
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
}
|
|
|
}()
|
|
|
res = ec._Query_clientVersion(ctx, field)
|
|
|
if res == graphql.Null {
|
|
|
atomic.AddUint32(&invalids, 1)
|
|
|
}
|
|
|
return res
|
|
|
})
|
|
|
case "menu":
|
|
|
field := field
|
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
}
|
|
|
}()
|
|
|
res = ec._Query_menu(ctx, field)
|
|
|
return res
|
|
|
})
|
|
|
case "__type":
|
|
|
out.Values[i] = ec._Query___type(ctx, field)
|
|
|
case "__schema":
|
...
|
...
|
@@ -2491,6 +3943,17 @@ func (ec *executionContext) _Role(ctx context.Context, sel ast.SelectionSet, obj |
|
|
out.Values[i] = ec._Role_createTime(ctx, field, obj)
|
|
|
case "updateTime":
|
|
|
out.Values[i] = ec._Role_updateTime(ctx, field, obj)
|
|
|
case "access":
|
|
|
field := field
|
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
}
|
|
|
}()
|
|
|
res = ec._Role_access(ctx, field, obj)
|
|
|
return res
|
|
|
})
|
|
|
default:
|
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
|
}
|
...
|
...
|
@@ -2792,6 +4255,16 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o |
|
|
|
|
|
// region ***************************** type.gotpl *****************************
|
|
|
|
|
|
func (ec *executionContext) marshalNAccess2ᚖgithubᚗcomᚋtiptokᚋgodevpᚋpkgᚋportᚋgraphqlᚋgraphᚋmodelᚐAccess(ctx context.Context, sel ast.SelectionSet, v *model.Access) graphql.Marshaler {
|
|
|
if v == nil {
|
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
|
ec.Errorf(ctx, "must not be null")
|
|
|
}
|
|
|
return graphql.Null
|
|
|
}
|
|
|
return ec._Access(ctx, sel, v)
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) {
|
|
|
res, err := graphql.UnmarshalBoolean(v)
|
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
...
|
...
|
@@ -2807,6 +4280,30 @@ func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.Se |
|
|
return res
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) marshalNClientPackageInfo2ᚖgithubᚗcomᚋtiptokᚋgodevpᚋpkgᚋdomainᚐClientPackageInfo(ctx context.Context, sel ast.SelectionSet, v *domain.ClientPackageInfo) graphql.Marshaler {
|
|
|
if v == nil {
|
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
|
ec.Errorf(ctx, "must not be null")
|
|
|
}
|
|
|
return graphql.Null
|
|
|
}
|
|
|
return ec._ClientPackageInfo(ctx, sel, v)
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) marshalNClientVersion2githubᚗcomᚋtiptokᚋgodevpᚋpkgᚋdomainᚐClientVersion(ctx context.Context, sel ast.SelectionSet, v domain.ClientVersion) graphql.Marshaler {
|
|
|
return ec._ClientVersion(ctx, sel, &v)
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) marshalNClientVersion2ᚖgithubᚗcomᚋtiptokᚋgodevpᚋpkgᚋdomainᚐClientVersion(ctx context.Context, sel ast.SelectionSet, v *domain.ClientVersion) graphql.Marshaler {
|
|
|
if v == nil {
|
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
|
ec.Errorf(ctx, "must not be null")
|
|
|
}
|
|
|
return graphql.Null
|
|
|
}
|
|
|
return ec._ClientVersion(ctx, sel, v)
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{}) (int, error) {
|
|
|
res, err := graphql.UnmarshalInt(v)
|
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
...
|
...
|
@@ -3115,6 +4612,46 @@ func (ec *executionContext) unmarshalNupdateUsersInput2githubᚗcomᚋtiptokᚋg |
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) marshalOAccess2ᚕᚖgithubᚗcomᚋtiptokᚋgodevpᚋpkgᚋportᚋgraphqlᚋgraphᚋmodelᚐAccessᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Access) graphql.Marshaler {
|
|
|
if v == nil {
|
|
|
return graphql.Null
|
|
|
}
|
|
|
ret := make(graphql.Array, len(v))
|
|
|
var wg sync.WaitGroup
|
|
|
isLen1 := len(v) == 1
|
|
|
if !isLen1 {
|
|
|
wg.Add(len(v))
|
|
|
}
|
|
|
for i := range v {
|
|
|
i := i
|
|
|
fc := &graphql.FieldContext{
|
|
|
Index: &i,
|
|
|
Result: &v[i],
|
|
|
}
|
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
|
f := func(i int) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
ret = nil
|
|
|
}
|
|
|
}()
|
|
|
if !isLen1 {
|
|
|
defer wg.Done()
|
|
|
}
|
|
|
ret[i] = ec.marshalNAccess2ᚖgithubᚗcomᚋtiptokᚋgodevpᚋpkgᚋportᚋgraphqlᚋgraphᚋmodelᚐAccess(ctx, sel, v[i])
|
|
|
}
|
|
|
if isLen1 {
|
|
|
f(i)
|
|
|
} else {
|
|
|
go f(i)
|
|
|
}
|
|
|
|
|
|
}
|
|
|
wg.Wait()
|
|
|
return ret
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) {
|
|
|
res, err := graphql.UnmarshalBoolean(v)
|
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
...
|
...
|
@@ -3139,6 +4676,71 @@ func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast |
|
|
return graphql.MarshalBoolean(*v)
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) marshalOClientPackageInfo2ᚕᚖgithubᚗcomᚋtiptokᚋgodevpᚋpkgᚋdomainᚐClientPackageInfoᚄ(ctx context.Context, sel ast.SelectionSet, v []*domain.ClientPackageInfo) graphql.Marshaler {
|
|
|
if v == nil {
|
|
|
return graphql.Null
|
|
|
}
|
|
|
ret := make(graphql.Array, len(v))
|
|
|
var wg sync.WaitGroup
|
|
|
isLen1 := len(v) == 1
|
|
|
if !isLen1 {
|
|
|
wg.Add(len(v))
|
|
|
}
|
|
|
for i := range v {
|
|
|
i := i
|
|
|
fc := &graphql.FieldContext{
|
|
|
Index: &i,
|
|
|
Result: &v[i],
|
|
|
}
|
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
|
f := func(i int) {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
ret = nil
|
|
|
}
|
|
|
}()
|
|
|
if !isLen1 {
|
|
|
defer wg.Done()
|
|
|
}
|
|
|
ret[i] = ec.marshalNClientPackageInfo2ᚖgithubᚗcomᚋtiptokᚋgodevpᚋpkgᚋdomainᚐClientPackageInfo(ctx, sel, v[i])
|
|
|
}
|
|
|
if isLen1 {
|
|
|
f(i)
|
|
|
} else {
|
|
|
go f(i)
|
|
|
}
|
|
|
|
|
|
}
|
|
|
wg.Wait()
|
|
|
return ret
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) unmarshalODate2ᚖgithubᚗcomᚋtiptokᚋgodevpᚋpkgᚋportᚋgraphqlᚋgraphᚋlibsᚐDatetime(ctx context.Context, v interface{}) (*libs.Datetime, error) {
|
|
|
if v == nil {
|
|
|
return nil, nil
|
|
|
}
|
|
|
var res = new(libs.Datetime)
|
|
|
err := res.UnmarshalGQL(v)
|
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) marshalODate2ᚖgithubᚗcomᚋtiptokᚋgodevpᚋpkgᚋportᚋgraphqlᚋgraphᚋlibsᚐDatetime(ctx context.Context, sel ast.SelectionSet, v *libs.Datetime) graphql.Marshaler {
|
|
|
if v == nil {
|
|
|
return graphql.Null
|
|
|
}
|
|
|
return v
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) unmarshalOInt2int64(ctx context.Context, v interface{}) (int64, error) {
|
|
|
res, err := graphql.UnmarshalInt64(v)
|
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) marshalOInt2int64(ctx context.Context, sel ast.SelectionSet, v int64) graphql.Marshaler {
|
|
|
return graphql.MarshalInt64(v)
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) unmarshalOInt2ᚖint(ctx context.Context, v interface{}) (*int, error) {
|
|
|
if v == nil {
|
|
|
return nil, nil
|
...
|
...
|
@@ -3258,6 +4860,13 @@ func (ec *executionContext) marshalOUsers2ᚕᚖgithubᚗcomᚋtiptokᚋgodevp |
|
|
return ret
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) marshalOUsers2ᚖgithubᚗcomᚋtiptokᚋgodevpᚋpkgᚋportᚋgraphqlᚋgraphᚋmodelᚐUsers(ctx context.Context, sel ast.SelectionSet, v *model.Users) graphql.Marshaler {
|
|
|
if v == nil {
|
|
|
return graphql.Null
|
|
|
}
|
|
|
return ec._Users(ctx, sel, v)
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler {
|
|
|
if v == nil {
|
|
|
return graphql.Null
|
...
|
...
|
@@ -3432,4 +5041,12 @@ func (ec *executionContext) marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgen |
|
|
return ec.___Type(ctx, sel, v)
|
|
|
}
|
|
|
|
|
|
func (ec *executionContext) unmarshalOmenuAccessInput2ᚖgithubᚗcomᚋtiptokᚋgodevpᚋpkgᚋportᚋgraphqlᚋgraphᚋmodelᚐMenuAccessInput(ctx context.Context, v interface{}) (*model.MenuAccessInput, error) {
|
|
|
if v == nil {
|
|
|
return nil, nil
|
|
|
}
|
|
|
res, err := ec.unmarshalInputmenuAccessInput(ctx, v)
|
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
|
}
|
|
|
|
|
|
// endregion ***************************** type.gotpl ***************************** |
...
|
...
|
|