2023-08-19 23:47:36 +02:00
// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
package graph
import (
"bytes"
"context"
"embed"
"errors"
"fmt"
"strconv"
"sync"
"sync/atomic"
"github.com/99designs/gqlgen/graphql"
"github.com/99designs/gqlgen/graphql/introspection"
gqlparser "github.com/vektah/gqlparser/v2"
"github.com/vektah/gqlparser/v2/ast"
"somepi.ddns.net/gitea/gilex-dev/YetAnotherToDoList/graph/model"
)
// region ************************** generated!.gotpl **************************
// NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
func NewExecutableSchema ( cfg Config ) graphql . ExecutableSchema {
return & executableSchema {
2023-11-18 15:51:10 +01:00
schema : cfg . Schema ,
2023-08-19 23:47:36 +02:00
resolvers : cfg . Resolvers ,
directives : cfg . Directives ,
complexity : cfg . Complexity ,
}
}
type Config struct {
2023-11-18 15:51:10 +01:00
Schema * ast . Schema
2023-08-19 23:47:36 +02:00
Resolvers ResolverRoot
Directives DirectiveRoot
Complexity ComplexityRoot
}
type ResolverRoot interface {
Mutation ( ) MutationResolver
Query ( ) QueryResolver
2023-11-18 15:51:10 +01:00
Role ( ) RoleResolver
2023-09-01 21:33:26 +02:00
Todo ( ) TodoResolver
2023-10-10 22:26:07 +02:00
User ( ) UserResolver
2023-08-19 23:47:36 +02:00
}
type DirectiveRoot struct {
2024-02-02 21:23:32 +01:00
AsUser func ( ctx context . Context , obj interface { } , next graphql . Resolver , id string ) ( res interface { } , err error )
HasPrivilege func ( ctx context . Context , obj interface { } , next graphql . Resolver , privilege model . Privilege ) ( res interface { } , err error )
2023-08-19 23:47:36 +02:00
}
type ComplexityRoot struct {
Mutation struct {
2023-11-18 15:51:10 +01:00
AddUserRole func ( childComplexity int , userID string , roleID string , userIsRoleManager bool ) int
2023-11-05 17:42:14 +01:00
CreateRefreshToken func ( childComplexity int , input model . NewRefreshToken ) int
CreateRole func ( childComplexity int , input model . NewRole ) int
CreateTodo func ( childComplexity int , input model . NewTodo ) int
CreateUser func ( childComplexity int , input model . NewUser ) int
DeleteRefreshToken func ( childComplexity int , id string ) int
DeleteRole func ( childComplexity int , id string ) int
DeleteTodo func ( childComplexity int , id string ) int
DeleteUser func ( childComplexity int , id string ) int
2023-11-18 15:51:10 +01:00
RemoveUserRole func ( childComplexity int , userID string , roleID string ) int
2023-11-05 17:42:14 +01:00
UpdateRefreshToken func ( childComplexity int , id string , changes model . UpdateRefreshToken ) int
UpdateRole func ( childComplexity int , id string , changes model . UpdateRole ) int
UpdateTodo func ( childComplexity int , id string , changes model . UpdateTodo ) int
UpdateUser func ( childComplexity int , id string , changes model . UpdateUser ) int
2023-11-18 15:51:10 +01:00
UpdateUserRole func ( childComplexity int , userID string , roleID string , userIsRoleManager bool ) int
2023-08-19 23:47:36 +02:00
}
Query struct {
2023-11-05 17:42:14 +01:00
RefreshToken func ( childComplexity int , id string ) int
RefreshTokens func ( childComplexity int ) int
Role func ( childComplexity int , id string ) int
Roles func ( childComplexity int ) int
Todo func ( childComplexity int , id string ) int
Todos func ( childComplexity int ) int
User func ( childComplexity int , id string ) int
Users func ( childComplexity int ) int
}
RefreshToken struct {
ExpiryDate func ( childComplexity int ) int
ID func ( childComplexity int ) int
Selector func ( childComplexity int ) int
Token func ( childComplexity int ) int
TokenName func ( childComplexity int ) int
UserID func ( childComplexity int ) int
}
2023-11-18 15:51:10 +01:00
RelationRoleUser struct {
User func ( childComplexity int ) int
UserIsRoleManager func ( childComplexity int ) int
}
RelationUserRole struct {
Role func ( childComplexity int ) int
UserIsRoleManager func ( childComplexity int ) int
}
2023-11-05 17:42:14 +01:00
Role struct {
ID func ( childComplexity int ) int
IsAdmin func ( childComplexity int ) int
IsUserCreator func ( childComplexity int ) int
2023-11-18 15:51:10 +01:00
RoleMembers func ( childComplexity int ) int
2023-11-05 17:42:14 +01:00
RoleName func ( childComplexity int ) int
2023-08-19 23:47:36 +02:00
}
Todo struct {
Done func ( childComplexity int ) int
ID func ( childComplexity int ) int
Text func ( childComplexity int ) int
User func ( childComplexity int ) int
}
User struct {
2023-10-10 22:26:07 +02:00
FullName func ( childComplexity int ) int
ID func ( childComplexity int ) int
2023-11-05 17:42:14 +01:00
Roles func ( childComplexity int ) int
2023-10-10 22:26:07 +02:00
Todos func ( childComplexity int ) int
UserName func ( childComplexity int ) int
2023-08-19 23:47:36 +02:00
}
}
type MutationResolver interface {
2023-10-10 22:26:07 +02:00
CreateUser ( ctx context . Context , input model . NewUser ) ( * model . User , error )
2023-08-19 23:47:36 +02:00
CreateTodo ( ctx context . Context , input model . NewTodo ) ( * model . Todo , error )
2023-11-05 17:42:14 +01:00
CreateRole ( ctx context . Context , input model . NewRole ) ( * model . Role , error )
CreateRefreshToken ( ctx context . Context , input model . NewRefreshToken ) ( * model . RefreshToken , error )
2023-10-10 22:26:07 +02:00
UpdateTodo ( ctx context . Context , id string , changes model . UpdateTodo ) ( * model . Todo , error )
UpdateUser ( ctx context . Context , id string , changes model . UpdateUser ) ( * model . User , error )
2023-11-05 17:42:14 +01:00
UpdateRole ( ctx context . Context , id string , changes model . UpdateRole ) ( * model . Role , error )
UpdateRefreshToken ( ctx context . Context , id string , changes model . UpdateRefreshToken ) ( * model . RefreshToken , error )
2023-10-10 22:26:07 +02:00
DeleteUser ( ctx context . Context , id string ) ( * string , error )
DeleteTodo ( ctx context . Context , id string ) ( * string , error )
2023-11-05 17:42:14 +01:00
DeleteRole ( ctx context . Context , id string ) ( * string , error )
DeleteRefreshToken ( ctx context . Context , id string ) ( * string , error )
2023-11-18 15:51:10 +01:00
AddUserRole ( ctx context . Context , userID string , roleID string , userIsRoleManager bool ) ( [ ] * model . RelationUserRole , error )
UpdateUserRole ( ctx context . Context , userID string , roleID string , userIsRoleManager bool ) ( [ ] * model . RelationUserRole , error )
RemoveUserRole ( ctx context . Context , userID string , roleID string ) ( [ ] * model . RelationUserRole , error )
2023-08-19 23:47:36 +02:00
}
type QueryResolver interface {
Todos ( ctx context . Context ) ( [ ] * model . Todo , error )
2023-10-10 22:26:07 +02:00
Users ( ctx context . Context ) ( [ ] * model . User , error )
2023-11-05 17:42:14 +01:00
Roles ( ctx context . Context ) ( [ ] * model . Role , error )
RefreshTokens ( ctx context . Context ) ( [ ] * model . RefreshToken , error )
2023-10-10 22:26:07 +02:00
User ( ctx context . Context , id string ) ( * model . User , error )
Todo ( ctx context . Context , id string ) ( * model . Todo , error )
2023-11-05 17:42:14 +01:00
Role ( ctx context . Context , id string ) ( * model . Role , error )
RefreshToken ( ctx context . Context , id string ) ( * model . RefreshToken , error )
2023-08-19 23:47:36 +02:00
}
2023-11-18 15:51:10 +01:00
type RoleResolver interface {
RoleMembers ( ctx context . Context , obj * model . Role ) ( [ ] * model . RelationRoleUser , error )
}
2023-09-01 21:33:26 +02:00
type TodoResolver interface {
User ( ctx context . Context , obj * model . Todo ) ( * model . User , error )
}
2023-10-10 22:26:07 +02:00
type UserResolver interface {
Todos ( ctx context . Context , obj * model . User ) ( [ ] * model . Todo , error )
2023-11-18 15:51:10 +01:00
Roles ( ctx context . Context , obj * model . User ) ( [ ] * model . RelationUserRole , error )
2023-10-10 22:26:07 +02:00
}
2023-08-19 23:47:36 +02:00
type executableSchema struct {
2023-11-18 15:51:10 +01:00
schema * ast . Schema
2023-08-19 23:47:36 +02:00
resolvers ResolverRoot
directives DirectiveRoot
complexity ComplexityRoot
}
func ( e * executableSchema ) Schema ( ) * ast . Schema {
2023-11-18 15:51:10 +01:00
if e . schema != nil {
return e . schema
}
2023-08-19 23:47:36 +02:00
return parsedSchema
}
func ( e * executableSchema ) Complexity ( typeName , field string , childComplexity int , rawArgs map [ string ] interface { } ) ( int , bool ) {
ec := executionContext { nil , e , 0 , 0 , nil }
_ = ec
switch typeName + "." + field {
2023-11-18 15:51:10 +01:00
case "Mutation.addUserRole" :
if e . complexity . Mutation . AddUserRole == nil {
2023-11-05 17:42:14 +01:00
break
}
2023-11-18 15:51:10 +01:00
args , err := ec . field_Mutation_addUserRole_args ( context . TODO ( ) , rawArgs )
2023-11-05 17:42:14 +01:00
if err != nil {
return 0 , false
}
2023-11-18 15:51:10 +01:00
return e . complexity . Mutation . AddUserRole ( childComplexity , args [ "userId" ] . ( string ) , args [ "roleId" ] . ( string ) , args [ "userIsRoleManager" ] . ( bool ) ) , true
2023-11-05 17:42:14 +01:00
case "Mutation.createRefreshToken" :
if e . complexity . Mutation . CreateRefreshToken == nil {
break
}
args , err := ec . field_Mutation_createRefreshToken_args ( context . TODO ( ) , rawArgs )
if err != nil {
return 0 , false
}
return e . complexity . Mutation . CreateRefreshToken ( childComplexity , args [ "input" ] . ( model . NewRefreshToken ) ) , true
case "Mutation.createRole" :
if e . complexity . Mutation . CreateRole == nil {
break
}
args , err := ec . field_Mutation_createRole_args ( context . TODO ( ) , rawArgs )
if err != nil {
return 0 , false
}
return e . complexity . Mutation . CreateRole ( childComplexity , args [ "input" ] . ( model . NewRole ) ) , true
2023-08-19 23:47:36 +02:00
case "Mutation.createTodo" :
if e . complexity . Mutation . CreateTodo == nil {
break
}
args , err := ec . field_Mutation_createTodo_args ( context . TODO ( ) , rawArgs )
if err != nil {
return 0 , false
}
return e . complexity . Mutation . CreateTodo ( childComplexity , args [ "input" ] . ( model . NewTodo ) ) , true
2023-10-10 22:26:07 +02:00
case "Mutation.createUser" :
if e . complexity . Mutation . CreateUser == nil {
break
}
args , err := ec . field_Mutation_createUser_args ( context . TODO ( ) , rawArgs )
if err != nil {
return 0 , false
}
return e . complexity . Mutation . CreateUser ( childComplexity , args [ "input" ] . ( model . NewUser ) ) , true
2023-11-05 17:42:14 +01:00
case "Mutation.deleteRefreshToken" :
if e . complexity . Mutation . DeleteRefreshToken == nil {
break
}
args , err := ec . field_Mutation_deleteRefreshToken_args ( context . TODO ( ) , rawArgs )
if err != nil {
return 0 , false
}
return e . complexity . Mutation . DeleteRefreshToken ( childComplexity , args [ "id" ] . ( string ) ) , true
case "Mutation.deleteRole" :
if e . complexity . Mutation . DeleteRole == nil {
break
}
args , err := ec . field_Mutation_deleteRole_args ( context . TODO ( ) , rawArgs )
if err != nil {
return 0 , false
}
return e . complexity . Mutation . DeleteRole ( childComplexity , args [ "id" ] . ( string ) ) , true
2023-10-10 22:26:07 +02:00
case "Mutation.deleteTodo" :
if e . complexity . Mutation . DeleteTodo == nil {
break
}
args , err := ec . field_Mutation_deleteTodo_args ( context . TODO ( ) , rawArgs )
if err != nil {
return 0 , false
}
return e . complexity . Mutation . DeleteTodo ( childComplexity , args [ "id" ] . ( string ) ) , true
case "Mutation.deleteUser" :
if e . complexity . Mutation . DeleteUser == nil {
break
}
args , err := ec . field_Mutation_deleteUser_args ( context . TODO ( ) , rawArgs )
if err != nil {
return 0 , false
}
return e . complexity . Mutation . DeleteUser ( childComplexity , args [ "id" ] . ( string ) ) , true
2023-11-18 15:51:10 +01:00
case "Mutation.removeUserRole" :
if e . complexity . Mutation . RemoveUserRole == nil {
2023-11-05 17:42:14 +01:00
break
}
2023-11-18 15:51:10 +01:00
args , err := ec . field_Mutation_removeUserRole_args ( context . TODO ( ) , rawArgs )
2023-11-05 17:42:14 +01:00
if err != nil {
return 0 , false
}
2023-11-18 15:51:10 +01:00
return e . complexity . Mutation . RemoveUserRole ( childComplexity , args [ "userId" ] . ( string ) , args [ "roleId" ] . ( string ) ) , true
2023-11-05 17:42:14 +01:00
case "Mutation.updateRefreshToken" :
if e . complexity . Mutation . UpdateRefreshToken == nil {
break
}
args , err := ec . field_Mutation_updateRefreshToken_args ( context . TODO ( ) , rawArgs )
if err != nil {
return 0 , false
}
return e . complexity . Mutation . UpdateRefreshToken ( childComplexity , args [ "id" ] . ( string ) , args [ "changes" ] . ( model . UpdateRefreshToken ) ) , true
case "Mutation.updateRole" :
if e . complexity . Mutation . UpdateRole == nil {
break
}
args , err := ec . field_Mutation_updateRole_args ( context . TODO ( ) , rawArgs )
if err != nil {
return 0 , false
}
return e . complexity . Mutation . UpdateRole ( childComplexity , args [ "id" ] . ( string ) , args [ "changes" ] . ( model . UpdateRole ) ) , true
2023-10-10 22:26:07 +02:00
case "Mutation.updateTodo" :
if e . complexity . Mutation . UpdateTodo == nil {
break
}
args , err := ec . field_Mutation_updateTodo_args ( context . TODO ( ) , rawArgs )
if err != nil {
return 0 , false
}
return e . complexity . Mutation . UpdateTodo ( childComplexity , args [ "id" ] . ( string ) , args [ "changes" ] . ( model . UpdateTodo ) ) , true
case "Mutation.updateUser" :
if e . complexity . Mutation . UpdateUser == nil {
break
}
args , err := ec . field_Mutation_updateUser_args ( context . TODO ( ) , rawArgs )
if err != nil {
return 0 , false
}
return e . complexity . Mutation . UpdateUser ( childComplexity , args [ "id" ] . ( string ) , args [ "changes" ] . ( model . UpdateUser ) ) , true
2024-02-02 21:23:32 +01:00
case "Mutation.updateUserRole" :
2023-11-18 15:51:10 +01:00
if e . complexity . Mutation . UpdateUserRole == nil {
break
}
2024-02-02 21:23:32 +01:00
args , err := ec . field_Mutation_updateUserRole_args ( context . TODO ( ) , rawArgs )
2023-11-18 15:51:10 +01:00
if err != nil {
return 0 , false
}
return e . complexity . Mutation . UpdateUserRole ( childComplexity , args [ "userId" ] . ( string ) , args [ "roleId" ] . ( string ) , args [ "userIsRoleManager" ] . ( bool ) ) , true
2023-11-05 17:42:14 +01:00
case "Query.refreshToken" :
if e . complexity . Query . RefreshToken == nil {
break
}
args , err := ec . field_Query_refreshToken_args ( context . TODO ( ) , rawArgs )
if err != nil {
return 0 , false
}
return e . complexity . Query . RefreshToken ( childComplexity , args [ "id" ] . ( string ) ) , true
case "Query.refreshTokens" :
if e . complexity . Query . RefreshTokens == nil {
break
}
return e . complexity . Query . RefreshTokens ( childComplexity ) , true
case "Query.role" :
if e . complexity . Query . Role == nil {
break
}
args , err := ec . field_Query_role_args ( context . TODO ( ) , rawArgs )
if err != nil {
return 0 , false
}
return e . complexity . Query . Role ( childComplexity , args [ "id" ] . ( string ) ) , true
case "Query.roles" :
if e . complexity . Query . Roles == nil {
break
}
return e . complexity . Query . Roles ( childComplexity ) , true
2023-10-10 22:26:07 +02:00
case "Query.todo" :
if e . complexity . Query . Todo == nil {
break
}
args , err := ec . field_Query_todo_args ( context . TODO ( ) , rawArgs )
if err != nil {
return 0 , false
}
return e . complexity . Query . Todo ( childComplexity , args [ "id" ] . ( string ) ) , true
2023-08-19 23:47:36 +02:00
case "Query.todos" :
if e . complexity . Query . Todos == nil {
break
}
return e . complexity . Query . Todos ( childComplexity ) , true
2023-10-10 22:26:07 +02:00
case "Query.user" :
if e . complexity . Query . User == nil {
break
}
args , err := ec . field_Query_user_args ( context . TODO ( ) , rawArgs )
if err != nil {
return 0 , false
}
return e . complexity . Query . User ( childComplexity , args [ "id" ] . ( string ) ) , true
case "Query.users" :
if e . complexity . Query . Users == nil {
break
}
return e . complexity . Query . Users ( childComplexity ) , true
2023-11-05 17:42:14 +01:00
case "RefreshToken.expiryDate" :
if e . complexity . RefreshToken . ExpiryDate == nil {
break
}
return e . complexity . RefreshToken . ExpiryDate ( childComplexity ) , true
case "RefreshToken.id" :
if e . complexity . RefreshToken . ID == nil {
break
}
return e . complexity . RefreshToken . ID ( childComplexity ) , true
case "RefreshToken.selector" :
if e . complexity . RefreshToken . Selector == nil {
break
}
return e . complexity . RefreshToken . Selector ( childComplexity ) , true
case "RefreshToken.token" :
if e . complexity . RefreshToken . Token == nil {
break
}
return e . complexity . RefreshToken . Token ( childComplexity ) , true
case "RefreshToken.tokenName" :
if e . complexity . RefreshToken . TokenName == nil {
break
}
return e . complexity . RefreshToken . TokenName ( childComplexity ) , true
case "RefreshToken.userId" :
if e . complexity . RefreshToken . UserID == nil {
break
}
return e . complexity . RefreshToken . UserID ( childComplexity ) , true
2023-11-18 15:51:10 +01:00
case "RelationRoleUser.user" :
if e . complexity . RelationRoleUser . User == nil {
break
}
return e . complexity . RelationRoleUser . User ( childComplexity ) , true
case "RelationRoleUser.userIsRoleManager" :
if e . complexity . RelationRoleUser . UserIsRoleManager == nil {
break
}
return e . complexity . RelationRoleUser . UserIsRoleManager ( childComplexity ) , true
case "RelationUserRole.role" :
if e . complexity . RelationUserRole . Role == nil {
break
}
return e . complexity . RelationUserRole . Role ( childComplexity ) , true
case "RelationUserRole.userIsRoleManager" :
if e . complexity . RelationUserRole . UserIsRoleManager == nil {
break
}
return e . complexity . RelationUserRole . UserIsRoleManager ( childComplexity ) , true
2023-11-05 17:42:14 +01:00
case "Role.id" :
if e . complexity . Role . ID == nil {
break
}
return e . complexity . Role . ID ( childComplexity ) , true
case "Role.isAdmin" :
if e . complexity . Role . IsAdmin == nil {
break
}
return e . complexity . Role . IsAdmin ( childComplexity ) , true
case "Role.isUserCreator" :
if e . complexity . Role . IsUserCreator == nil {
break
}
return e . complexity . Role . IsUserCreator ( childComplexity ) , true
2023-11-18 15:51:10 +01:00
case "Role.roleMembers" :
if e . complexity . Role . RoleMembers == nil {
break
}
return e . complexity . Role . RoleMembers ( childComplexity ) , true
2023-11-05 17:42:14 +01:00
case "Role.roleName" :
if e . complexity . Role . RoleName == nil {
break
}
return e . complexity . Role . RoleName ( childComplexity ) , true
2023-08-19 23:47:36 +02:00
case "Todo.done" :
if e . complexity . Todo . Done == nil {
break
}
return e . complexity . Todo . Done ( childComplexity ) , true
case "Todo.id" :
if e . complexity . Todo . ID == nil {
break
}
return e . complexity . Todo . ID ( childComplexity ) , true
case "Todo.text" :
if e . complexity . Todo . Text == nil {
break
}
return e . complexity . Todo . Text ( childComplexity ) , true
case "Todo.user" :
if e . complexity . Todo . User == nil {
break
}
return e . complexity . Todo . User ( childComplexity ) , true
2023-10-10 22:26:07 +02:00
case "User.fullName" :
if e . complexity . User . FullName == nil {
break
}
return e . complexity . User . FullName ( childComplexity ) , true
2023-08-19 23:47:36 +02:00
case "User.id" :
if e . complexity . User . ID == nil {
break
}
return e . complexity . User . ID ( childComplexity ) , true
2023-11-05 17:42:14 +01:00
case "User.roles" :
if e . complexity . User . Roles == nil {
break
}
return e . complexity . User . Roles ( childComplexity ) , true
2023-10-10 22:26:07 +02:00
case "User.todos" :
if e . complexity . User . Todos == nil {
break
}
return e . complexity . User . Todos ( childComplexity ) , true
case "User.userName" :
if e . complexity . User . UserName == nil {
2023-08-19 23:47:36 +02:00
break
}
2023-10-10 22:26:07 +02:00
return e . complexity . User . UserName ( childComplexity ) , true
2023-08-19 23:47:36 +02:00
}
return 0 , false
}
func ( e * executableSchema ) Exec ( ctx context . Context ) graphql . ResponseHandler {
rc := graphql . GetOperationContext ( ctx )
ec := executionContext { rc , e , 0 , 0 , make ( chan graphql . DeferredResult ) }
inputUnmarshalMap := graphql . BuildUnmarshalerMap (
2023-11-05 17:42:14 +01:00
ec . unmarshalInputNewRefreshToken ,
ec . unmarshalInputNewRole ,
2023-08-19 23:47:36 +02:00
ec . unmarshalInputNewTodo ,
2023-10-10 22:26:07 +02:00
ec . unmarshalInputNewUser ,
2023-11-05 17:42:14 +01:00
ec . unmarshalInputUpdateRefreshToken ,
ec . unmarshalInputUpdateRole ,
ec . unmarshalInputUpdateTodo ,
ec . unmarshalInputUpdateUser ,
2023-08-19 23:47:36 +02:00
)
first := true
switch rc . Operation . Operation {
case ast . Query :
return func ( ctx context . Context ) * graphql . Response {
var response graphql . Response
var data graphql . Marshaler
if first {
first = false
ctx = graphql . WithUnmarshalerMap ( ctx , inputUnmarshalMap )
2024-02-02 21:23:32 +01:00
data = ec . _queryMiddleware ( ctx , rc . Operation , func ( ctx context . Context ) ( interface { } , error ) {
return ec . _Query ( ctx , rc . Operation . SelectionSet ) , nil
} )
2023-08-19 23:47:36 +02:00
} else {
if atomic . LoadInt32 ( & ec . pendingDeferred ) > 0 {
result := <- ec . deferredResults
atomic . AddInt32 ( & ec . pendingDeferred , - 1 )
data = result . Result
response . Path = result . Path
response . Label = result . Label
response . Errors = result . Errors
} else {
return nil
}
}
var buf bytes . Buffer
data . MarshalGQL ( & buf )
response . Data = buf . Bytes ( )
if atomic . LoadInt32 ( & ec . deferred ) > 0 {
hasNext := atomic . LoadInt32 ( & ec . pendingDeferred ) > 0
response . HasNext = & hasNext
}
return & response
}
case ast . Mutation :
return func ( ctx context . Context ) * graphql . Response {
if ! first {
return nil
}
first = false
ctx = graphql . WithUnmarshalerMap ( ctx , inputUnmarshalMap )
2024-02-02 21:23:32 +01:00
data := ec . _mutationMiddleware ( ctx , rc . Operation , func ( ctx context . Context ) ( interface { } , error ) {
return ec . _Mutation ( ctx , rc . Operation . SelectionSet ) , nil
} )
2023-08-19 23:47:36 +02:00
var buf bytes . Buffer
data . MarshalGQL ( & buf )
return & graphql . Response {
Data : buf . Bytes ( ) ,
}
}
default :
return graphql . OneShot ( graphql . ErrorResponse ( ctx , "unsupported GraphQL operation" ) )
}
}
type executionContext struct {
* graphql . OperationContext
* executableSchema
deferred int32
pendingDeferred int32
deferredResults chan graphql . DeferredResult
}
func ( ec * executionContext ) processDeferredGroup ( dg graphql . DeferredGroup ) {
atomic . AddInt32 ( & ec . pendingDeferred , 1 )
go func ( ) {
ctx := graphql . WithFreshResponseContext ( dg . Context )
dg . FieldSet . Dispatch ( ctx )
ds := graphql . DeferredResult {
Path : dg . Path ,
Label : dg . Label ,
Result : dg . FieldSet ,
Errors : graphql . GetErrors ( ctx ) ,
}
// null fields should bubble up
if dg . FieldSet . Invalids > 0 {
ds . Result = graphql . Null
}
ec . deferredResults <- ds
} ( )
}
func ( ec * executionContext ) introspectSchema ( ) ( * introspection . Schema , error ) {
if ec . DisableIntrospection {
return nil , errors . New ( "introspection disabled" )
}
2023-11-18 15:51:10 +01:00
return introspection . WrapSchema ( ec . Schema ( ) ) , nil
2023-08-19 23:47:36 +02:00
}
func ( ec * executionContext ) introspectType ( name string ) ( * introspection . Type , error ) {
if ec . DisableIntrospection {
return nil , errors . New ( "introspection disabled" )
}
2023-11-18 15:51:10 +01:00
return introspection . WrapTypeFromDef ( ec . Schema ( ) , ec . Schema ( ) . Types [ name ] ) , nil
2023-08-19 23:47:36 +02:00
}
//go:embed "schema.graphqls"
var sourcesFS embed . FS
func sourceData ( filename string ) string {
data , err := sourcesFS . ReadFile ( filename )
if err != nil {
panic ( fmt . Sprintf ( "codegen problem: %s not available" , filename ) )
}
return string ( data )
}
var sources = [ ] * ast . Source {
{ Name : "schema.graphqls" , Input : sourceData ( "schema.graphqls" ) , BuiltIn : false } ,
}
var parsedSchema = gqlparser . MustLoadSchema ( sources ... )
// endregion ************************** generated!.gotpl **************************
// region ***************************** args.gotpl *****************************
2024-02-02 21:23:32 +01:00
func ( ec * executionContext ) dir_asUser_args ( ctx context . Context , rawArgs map [ string ] interface { } ) ( map [ string ] interface { } , error ) {
2023-11-18 15:51:10 +01:00
var err error
args := map [ string ] interface { } { }
var arg0 string
2024-02-02 21:23:32 +01:00
if tmp , ok := rawArgs [ "id" ] ; ok {
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "id" ) )
2023-11-18 15:51:10 +01:00
arg0 , err = ec . unmarshalNID2string ( ctx , tmp )
if err != nil {
return nil , err
}
}
2024-02-02 21:23:32 +01:00
args [ "id" ] = arg0
return args , nil
}
func ( ec * executionContext ) dir_hasPrivilege_args ( ctx context . Context , rawArgs map [ string ] interface { } ) ( map [ string ] interface { } , error ) {
var err error
args := map [ string ] interface { } { }
var arg0 model . Privilege
if tmp , ok := rawArgs [ "privilege" ] ; ok {
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "privilege" ) )
arg0 , err = ec . unmarshalNPrivilege2somepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐPrivilege ( ctx , tmp )
2023-11-18 15:51:10 +01:00
if err != nil {
return nil , err
}
}
2024-02-02 21:23:32 +01:00
args [ "privilege" ] = arg0
2023-11-18 15:51:10 +01:00
return args , nil
}
func ( ec * executionContext ) field_Mutation_addUserRole_args ( ctx context . Context , rawArgs map [ string ] interface { } ) ( map [ string ] interface { } , error ) {
2023-11-05 17:42:14 +01:00
var err error
args := map [ string ] interface { } { }
var arg0 string
if tmp , ok := rawArgs [ "userId" ] ; ok {
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "userId" ) )
arg0 , err = ec . unmarshalNID2string ( ctx , tmp )
if err != nil {
return nil , err
}
}
args [ "userId" ] = arg0
var arg1 string
if tmp , ok := rawArgs [ "roleId" ] ; ok {
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "roleId" ) )
arg1 , err = ec . unmarshalNID2string ( ctx , tmp )
if err != nil {
return nil , err
}
}
args [ "roleId" ] = arg1
2023-11-18 15:51:10 +01:00
var arg2 bool
if tmp , ok := rawArgs [ "userIsRoleManager" ] ; ok {
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "userIsRoleManager" ) )
arg2 , err = ec . unmarshalNBoolean2bool ( ctx , tmp )
if err != nil {
return nil , err
}
}
args [ "userIsRoleManager" ] = arg2
2023-11-05 17:42:14 +01:00
return args , nil
}
func ( ec * executionContext ) field_Mutation_createRefreshToken_args ( ctx context . Context , rawArgs map [ string ] interface { } ) ( map [ string ] interface { } , error ) {
var err error
args := map [ string ] interface { } { }
var arg0 model . NewRefreshToken
if tmp , ok := rawArgs [ "input" ] ; ok {
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "input" ) )
arg0 , err = ec . unmarshalNNewRefreshToken2somepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐNewRefreshToken ( ctx , tmp )
if err != nil {
return nil , err
}
}
args [ "input" ] = arg0
return args , nil
}
func ( ec * executionContext ) field_Mutation_createRole_args ( ctx context . Context , rawArgs map [ string ] interface { } ) ( map [ string ] interface { } , error ) {
var err error
args := map [ string ] interface { } { }
var arg0 model . NewRole
if tmp , ok := rawArgs [ "input" ] ; ok {
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "input" ) )
arg0 , err = ec . unmarshalNNewRole2somepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐNewRole ( ctx , tmp )
if err != nil {
return nil , err
}
}
args [ "input" ] = arg0
return args , nil
}
2023-08-19 23:47:36 +02:00
func ( ec * executionContext ) field_Mutation_createTodo_args ( ctx context . Context , rawArgs map [ string ] interface { } ) ( map [ string ] interface { } , error ) {
var err error
args := map [ string ] interface { } { }
var arg0 model . NewTodo
if tmp , ok := rawArgs [ "input" ] ; ok {
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "input" ) )
arg0 , err = ec . unmarshalNNewTodo2somepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐNewTodo ( ctx , tmp )
if err != nil {
return nil , err
}
}
2023-10-10 22:26:07 +02:00
args [ "input" ] = arg0
return args , nil
}
func ( ec * executionContext ) field_Mutation_createUser_args ( ctx context . Context , rawArgs map [ string ] interface { } ) ( map [ string ] interface { } , error ) {
var err error
args := map [ string ] interface { } { }
var arg0 model . NewUser
if tmp , ok := rawArgs [ "input" ] ; ok {
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "input" ) )
arg0 , err = ec . unmarshalNNewUser2somepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐNewUser ( ctx , tmp )
if err != nil {
return nil , err
}
}
args [ "input" ] = arg0
return args , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) field_Mutation_deleteRefreshToken_args ( ctx context . Context , rawArgs map [ string ] interface { } ) ( map [ string ] interface { } , error ) {
2023-10-10 22:26:07 +02:00
var err error
args := map [ string ] interface { } { }
var arg0 string
if tmp , ok := rawArgs [ "id" ] ; ok {
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "id" ) )
arg0 , err = ec . unmarshalNID2string ( ctx , tmp )
if err != nil {
return nil , err
}
}
args [ "id" ] = arg0
return args , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) field_Mutation_deleteRole_args ( ctx context . Context , rawArgs map [ string ] interface { } ) ( map [ string ] interface { } , error ) {
2023-10-10 22:26:07 +02:00
var err error
args := map [ string ] interface { } { }
var arg0 string
if tmp , ok := rawArgs [ "id" ] ; ok {
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "id" ) )
arg0 , err = ec . unmarshalNID2string ( ctx , tmp )
if err != nil {
return nil , err
}
}
args [ "id" ] = arg0
return args , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) field_Mutation_deleteTodo_args ( ctx context . Context , rawArgs map [ string ] interface { } ) ( map [ string ] interface { } , error ) {
2023-10-10 22:26:07 +02:00
var err error
args := map [ string ] interface { } { }
var arg0 string
if tmp , ok := rawArgs [ "id" ] ; ok {
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "id" ) )
arg0 , err = ec . unmarshalNID2string ( ctx , tmp )
if err != nil {
return nil , err
}
}
args [ "id" ] = arg0
2023-11-05 17:42:14 +01:00
return args , nil
}
func ( ec * executionContext ) field_Mutation_deleteUser_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 [ "id" ] ; ok {
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "id" ) )
arg0 , err = ec . unmarshalNID2string ( ctx , tmp )
2023-10-10 22:26:07 +02:00
if err != nil {
return nil , err
}
}
2023-11-05 17:42:14 +01:00
args [ "id" ] = arg0
2023-10-10 22:26:07 +02:00
return args , nil
}
2023-11-18 15:51:10 +01:00
func ( ec * executionContext ) field_Mutation_removeUserRole_args ( ctx context . Context , rawArgs map [ string ] interface { } ) ( map [ string ] interface { } , error ) {
2023-11-05 17:42:14 +01:00
var err error
args := map [ string ] interface { } { }
var arg0 string
if tmp , ok := rawArgs [ "userId" ] ; ok {
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "userId" ) )
arg0 , err = ec . unmarshalNID2string ( ctx , tmp )
if err != nil {
return nil , err
}
}
args [ "userId" ] = arg0
var arg1 string
if tmp , ok := rawArgs [ "roleId" ] ; ok {
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "roleId" ) )
arg1 , err = ec . unmarshalNID2string ( ctx , tmp )
if err != nil {
return nil , err
}
}
args [ "roleId" ] = arg1
return args , nil
}
func ( ec * executionContext ) field_Mutation_updateRefreshToken_args ( ctx context . Context , rawArgs map [ string ] interface { } ) ( map [ string ] interface { } , error ) {
2023-10-10 22:26:07 +02:00
var err error
args := map [ string ] interface { } { }
var arg0 string
if tmp , ok := rawArgs [ "id" ] ; ok {
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "id" ) )
arg0 , err = ec . unmarshalNID2string ( ctx , tmp )
if err != nil {
return nil , err
}
}
args [ "id" ] = arg0
2023-11-05 17:42:14 +01:00
var arg1 model . UpdateRefreshToken
2023-10-10 22:26:07 +02:00
if tmp , ok := rawArgs [ "changes" ] ; ok {
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "changes" ) )
2023-11-05 17:42:14 +01:00
arg1 , err = ec . unmarshalNUpdateRefreshToken2somepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐUpdateRefreshToken ( ctx , tmp )
2023-10-10 22:26:07 +02:00
if err != nil {
return nil , err
}
}
args [ "changes" ] = arg1
return args , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) field_Mutation_updateRole_args ( ctx context . Context , rawArgs map [ string ] interface { } ) ( map [ string ] interface { } , error ) {
2023-10-10 22:26:07 +02:00
var err error
args := map [ string ] interface { } { }
var arg0 string
2023-11-05 17:42:14 +01:00
if tmp , ok := rawArgs [ "id" ] ; ok {
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "id" ) )
arg0 , err = ec . unmarshalNID2string ( ctx , tmp )
2023-10-10 22:26:07 +02:00
if err != nil {
return nil , err
}
}
2023-11-05 17:42:14 +01:00
args [ "id" ] = arg0
var arg1 model . UpdateRole
if tmp , ok := rawArgs [ "changes" ] ; ok {
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "changes" ) )
arg1 , err = ec . unmarshalNUpdateRole2somepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐUpdateRole ( ctx , tmp )
if err != nil {
return nil , err
}
}
args [ "changes" ] = arg1
2023-10-10 22:26:07 +02:00
return args , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) field_Mutation_updateTodo_args ( ctx context . Context , rawArgs map [ string ] interface { } ) ( map [ string ] interface { } , error ) {
2023-10-10 22:26:07 +02:00
var err error
args := map [ string ] interface { } { }
var arg0 string
if tmp , ok := rawArgs [ "id" ] ; ok {
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "id" ) )
arg0 , err = ec . unmarshalNID2string ( ctx , tmp )
if err != nil {
return nil , err
}
}
args [ "id" ] = arg0
2023-11-05 17:42:14 +01:00
var arg1 model . UpdateTodo
if tmp , ok := rawArgs [ "changes" ] ; ok {
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "changes" ) )
arg1 , err = ec . unmarshalNUpdateTodo2somepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐUpdateTodo ( ctx , tmp )
if err != nil {
return nil , err
}
}
args [ "changes" ] = arg1
2023-10-10 22:26:07 +02:00
return args , nil
}
2024-02-02 21:23:32 +01:00
func ( ec * executionContext ) field_Mutation_updateUserRole_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 [ "userId" ] ; ok {
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "userId" ) )
arg0 , err = ec . unmarshalNID2string ( ctx , tmp )
if err != nil {
return nil , err
}
}
args [ "userId" ] = arg0
var arg1 string
if tmp , ok := rawArgs [ "roleId" ] ; ok {
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "roleId" ) )
arg1 , err = ec . unmarshalNID2string ( ctx , tmp )
if err != nil {
return nil , err
}
}
args [ "roleId" ] = arg1
var arg2 bool
if tmp , ok := rawArgs [ "userIsRoleManager" ] ; ok {
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "userIsRoleManager" ) )
arg2 , err = ec . unmarshalNBoolean2bool ( ctx , tmp )
if err != nil {
return nil , err
}
}
args [ "userIsRoleManager" ] = arg2
return args , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) field_Mutation_updateUser_args ( ctx context . Context , rawArgs map [ string ] interface { } ) ( map [ string ] interface { } , error ) {
2023-10-10 22:26:07 +02:00
var err error
args := map [ string ] interface { } { }
var arg0 string
if tmp , ok := rawArgs [ "id" ] ; ok {
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "id" ) )
arg0 , err = ec . unmarshalNID2string ( ctx , tmp )
if err != nil {
return nil , err
}
}
args [ "id" ] = arg0
2023-11-05 17:42:14 +01:00
var arg1 model . UpdateUser
if tmp , ok := rawArgs [ "changes" ] ; ok {
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "changes" ) )
arg1 , err = ec . unmarshalNUpdateUser2somepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐUpdateUser ( ctx , tmp )
2023-10-10 22:26:07 +02:00
if err != nil {
return nil , err
}
}
2023-11-05 17:42:14 +01:00
args [ "changes" ] = arg1
2023-10-10 22:26:07 +02:00
return args , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) field_Query___type_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 [ "name" ] ; ok {
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "name" ) )
arg0 , err = ec . unmarshalNString2string ( ctx , tmp )
if err != nil {
return nil , err
}
}
args [ "name" ] = arg0
return args , nil
}
func ( ec * executionContext ) field_Query_refreshToken_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 [ "id" ] ; ok {
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "id" ) )
arg0 , err = ec . unmarshalNID2string ( ctx , tmp )
if err != nil {
return nil , err
}
}
args [ "id" ] = arg0
return args , nil
}
func ( ec * executionContext ) field_Query_role_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 [ "id" ] ; ok {
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "id" ) )
arg0 , err = ec . unmarshalNID2string ( ctx , tmp )
if err != nil {
return nil , err
}
}
args [ "id" ] = arg0
return args , nil
}
func ( ec * executionContext ) field_Query_todo_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 [ "id" ] ; ok {
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "id" ) )
arg0 , err = ec . unmarshalNID2string ( ctx , tmp )
if err != nil {
return nil , err
}
}
args [ "id" ] = 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 { } { }
var arg0 string
if tmp , ok := rawArgs [ "id" ] ; ok {
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "id" ) )
arg0 , err = ec . unmarshalNID2string ( ctx , tmp )
if err != nil {
return nil , err
}
}
args [ "id" ] = arg0
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
}
}
args [ "includeDeprecated" ] = arg0
return args , nil
}
func ( ec * executionContext ) field___Type_fields_args ( ctx context . Context , rawArgs map [ string ] interface { } ) ( map [ string ] interface { } , error ) {
2023-10-10 22:26:07 +02:00
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 **************************
2024-02-02 21:23:32 +01:00
func ( ec * executionContext ) _queryMiddleware ( ctx context . Context , obj * ast . OperationDefinition , next func ( ctx context . Context ) ( interface { } , error ) ) graphql . Marshaler {
for _ , d := range obj . Directives {
switch d . Name {
case "asUser" :
rawArgs := d . ArgumentMap ( ec . Variables )
args , err := ec . dir_asUser_args ( ctx , rawArgs )
if err != nil {
ec . Error ( ctx , err )
return graphql . Null
}
n := next
next = func ( ctx context . Context ) ( interface { } , error ) {
if ec . directives . AsUser == nil {
return nil , errors . New ( "directive asUser is not implemented" )
}
return ec . directives . AsUser ( ctx , obj , n , args [ "id" ] . ( string ) )
}
}
}
tmp , err := next ( ctx )
if err != nil {
ec . Error ( ctx , err )
return graphql . Null
}
if data , ok := tmp . ( graphql . Marshaler ) ; ok {
return data
}
ec . Errorf ( ctx , ` unexpected type %T from directive, should be graphql.Marshaler ` , tmp )
return graphql . Null
}
func ( ec * executionContext ) _mutationMiddleware ( ctx context . Context , obj * ast . OperationDefinition , next func ( ctx context . Context ) ( interface { } , error ) ) graphql . Marshaler {
for _ , d := range obj . Directives {
switch d . Name {
case "asUser" :
rawArgs := d . ArgumentMap ( ec . Variables )
args , err := ec . dir_asUser_args ( ctx , rawArgs )
if err != nil {
ec . Error ( ctx , err )
return graphql . Null
}
n := next
next = func ( ctx context . Context ) ( interface { } , error ) {
if ec . directives . AsUser == nil {
return nil , errors . New ( "directive asUser is not implemented" )
}
return ec . directives . AsUser ( ctx , obj , n , args [ "id" ] . ( string ) )
}
}
}
tmp , err := next ( ctx )
if err != nil {
ec . Error ( ctx , err )
return graphql . Null
}
if data , ok := tmp . ( graphql . Marshaler ) ; ok {
return data
}
ec . Errorf ( ctx , ` unexpected type %T from directive, should be graphql.Marshaler ` , tmp )
return graphql . Null
}
2023-10-10 22:26:07 +02:00
// endregion ************************** directives.gotpl **************************
// region **************************** field.gotpl *****************************
func ( ec * executionContext ) _Mutation_createUser ( ctx context . Context , field graphql . CollectedField ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Mutation_createUser ( 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 ) {
2024-02-02 21:23:32 +01:00
directive0 := func ( rctx context . Context ) ( interface { } , error ) {
ctx = rctx // use context from middleware stack in children
return ec . resolvers . Mutation ( ) . CreateUser ( rctx , fc . Args [ "input" ] . ( model . NewUser ) )
}
directive1 := func ( ctx context . Context ) ( interface { } , error ) {
privilege , err := ec . unmarshalNPrivilege2somepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐPrivilege ( ctx , "isUserCreator" )
if err != nil {
return nil , err
}
if ec . directives . HasPrivilege == nil {
return nil , errors . New ( "directive hasPrivilege is not implemented" )
}
return ec . directives . HasPrivilege ( ctx , nil , directive0 , privilege )
}
tmp , err := directive1 ( rctx )
if err != nil {
return nil , graphql . ErrorOnPath ( ctx , err )
}
if tmp == nil {
return nil , nil
}
if data , ok := tmp . ( * model . User ) ; ok {
return data , nil
}
return nil , fmt . Errorf ( ` unexpected type %T from directive, should be *somepi.ddns.net/gitea/gilex-dev/YetAnotherToDoList/graph/model.User ` , tmp )
2023-10-10 22:26:07 +02:00
} )
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 . User )
fc . Result = res
return ec . marshalNUser2ᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐUser ( ctx , field . Selections , res )
}
func ( ec * executionContext ) fieldContext_Mutation_createUser ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "Mutation" ,
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_User_id ( ctx , field )
case "userName" :
return ec . fieldContext_User_userName ( ctx , field )
case "fullName" :
return ec . fieldContext_User_fullName ( ctx , field )
case "todos" :
return ec . fieldContext_User_todos ( ctx , field )
2023-11-05 17:42:14 +01:00
case "roles" :
return ec . fieldContext_User_roles ( ctx , field )
2023-10-10 22:26:07 +02:00
}
return nil , fmt . Errorf ( "no field named %q was found under type User" , 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_Mutation_createUser_args ( ctx , field . ArgumentMap ( ec . Variables ) ) ; err != nil {
ec . Error ( ctx , err )
return fc , err
}
return fc , nil
}
func ( ec * executionContext ) _Mutation_createTodo ( ctx context . Context , field graphql . CollectedField ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Mutation_createTodo ( 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 . Mutation ( ) . CreateTodo ( rctx , fc . Args [ "input" ] . ( model . NewTodo ) )
} )
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 . Todo )
fc . Result = res
return ec . marshalNTodo2ᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐTodo ( ctx , field . Selections , res )
}
func ( ec * executionContext ) fieldContext_Mutation_createTodo ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "Mutation" ,
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_Todo_id ( ctx , field )
case "text" :
return ec . fieldContext_Todo_text ( ctx , field )
case "done" :
return ec . fieldContext_Todo_done ( ctx , field )
case "user" :
return ec . fieldContext_Todo_user ( ctx , field )
}
return nil , fmt . Errorf ( "no field named %q was found under type Todo" , 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_Mutation_createTodo_args ( ctx , field . ArgumentMap ( ec . Variables ) ) ; err != nil {
ec . Error ( ctx , err )
return fc , err
}
return fc , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _Mutation_createRole ( ctx context . Context , field graphql . CollectedField ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Mutation_createRole ( ctx , field )
2023-10-10 22:26:07 +02:00
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 ) {
2024-02-02 21:23:32 +01:00
directive0 := func ( rctx context . Context ) ( interface { } , error ) {
ctx = rctx // use context from middleware stack in children
return ec . resolvers . Mutation ( ) . CreateRole ( rctx , fc . Args [ "input" ] . ( model . NewRole ) )
}
directive1 := func ( ctx context . Context ) ( interface { } , error ) {
privilege , err := ec . unmarshalNPrivilege2somepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐPrivilege ( ctx , "isAdmin" )
if err != nil {
return nil , err
}
if ec . directives . HasPrivilege == nil {
return nil , errors . New ( "directive hasPrivilege is not implemented" )
}
return ec . directives . HasPrivilege ( ctx , nil , directive0 , privilege )
}
tmp , err := directive1 ( rctx )
if err != nil {
return nil , graphql . ErrorOnPath ( ctx , err )
}
if tmp == nil {
return nil , nil
}
if data , ok := tmp . ( * model . Role ) ; ok {
return data , nil
}
return nil , fmt . Errorf ( ` unexpected type %T from directive, should be *somepi.ddns.net/gitea/gilex-dev/YetAnotherToDoList/graph/model.Role ` , tmp )
2023-10-10 22:26:07 +02:00
} )
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
}
2023-11-05 17:42:14 +01:00
res := resTmp . ( * model . Role )
2023-10-10 22:26:07 +02:00
fc . Result = res
2023-11-05 17:42:14 +01:00
return ec . marshalNRole2ᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐRole ( ctx , field . Selections , res )
2023-10-10 22:26:07 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_Mutation_createRole ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-10-10 22:26:07 +02:00
fc = & graphql . FieldContext {
Object : "Mutation" ,
Field : field ,
IsMethod : true ,
IsResolver : true ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
switch field . Name {
case "id" :
2023-11-05 17:42:14 +01:00
return ec . fieldContext_Role_id ( ctx , field )
case "roleName" :
return ec . fieldContext_Role_roleName ( ctx , field )
case "isAdmin" :
return ec . fieldContext_Role_isAdmin ( ctx , field )
case "isUserCreator" :
return ec . fieldContext_Role_isUserCreator ( ctx , field )
2023-11-18 15:51:10 +01:00
case "roleMembers" :
return ec . fieldContext_Role_roleMembers ( ctx , field )
2023-10-10 22:26:07 +02:00
}
2023-11-05 17:42:14 +01:00
return nil , fmt . Errorf ( "no field named %q was found under type Role" , field . Name )
2023-10-10 22:26:07 +02:00
} ,
}
defer func ( ) {
if r := recover ( ) ; r != nil {
err = ec . Recover ( ctx , r )
ec . Error ( ctx , err )
}
} ( )
ctx = graphql . WithFieldContext ( ctx , fc )
2023-11-05 17:42:14 +01:00
if fc . Args , err = ec . field_Mutation_createRole_args ( ctx , field . ArgumentMap ( ec . Variables ) ) ; err != nil {
2023-10-10 22:26:07 +02:00
ec . Error ( ctx , err )
return fc , err
}
return fc , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _Mutation_createRefreshToken ( ctx context . Context , field graphql . CollectedField ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Mutation_createRefreshToken ( ctx , field )
2023-10-10 22:26:07 +02:00
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
2023-11-05 17:42:14 +01:00
return ec . resolvers . Mutation ( ) . CreateRefreshToken ( rctx , fc . Args [ "input" ] . ( model . NewRefreshToken ) )
2023-10-10 22:26:07 +02:00
} )
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
}
2023-11-05 17:42:14 +01:00
res := resTmp . ( * model . RefreshToken )
2023-10-10 22:26:07 +02:00
fc . Result = res
2023-11-05 17:42:14 +01:00
return ec . marshalNRefreshToken2ᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐRefreshToken ( ctx , field . Selections , res )
2023-10-10 22:26:07 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_Mutation_createRefreshToken ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-10-10 22:26:07 +02:00
fc = & graphql . FieldContext {
Object : "Mutation" ,
Field : field ,
IsMethod : true ,
IsResolver : true ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
switch field . Name {
case "id" :
2023-11-05 17:42:14 +01:00
return ec . fieldContext_RefreshToken_id ( ctx , field )
case "expiryDate" :
return ec . fieldContext_RefreshToken_expiryDate ( ctx , field )
case "tokenName" :
return ec . fieldContext_RefreshToken_tokenName ( ctx , field )
case "selector" :
return ec . fieldContext_RefreshToken_selector ( ctx , field )
case "token" :
return ec . fieldContext_RefreshToken_token ( ctx , field )
case "userId" :
return ec . fieldContext_RefreshToken_userId ( ctx , field )
2023-10-10 22:26:07 +02:00
}
2023-11-05 17:42:14 +01:00
return nil , fmt . Errorf ( "no field named %q was found under type RefreshToken" , field . Name )
2023-10-10 22:26:07 +02:00
} ,
}
defer func ( ) {
if r := recover ( ) ; r != nil {
err = ec . Recover ( ctx , r )
ec . Error ( ctx , err )
}
} ( )
ctx = graphql . WithFieldContext ( ctx , fc )
2023-11-05 17:42:14 +01:00
if fc . Args , err = ec . field_Mutation_createRefreshToken_args ( ctx , field . ArgumentMap ( ec . Variables ) ) ; err != nil {
2023-10-10 22:26:07 +02:00
ec . Error ( ctx , err )
return fc , err
}
return fc , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _Mutation_updateTodo ( ctx context . Context , field graphql . CollectedField ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Mutation_updateTodo ( ctx , field )
2023-10-10 22:26:07 +02:00
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
2023-11-05 17:42:14 +01:00
return ec . resolvers . Mutation ( ) . UpdateTodo ( rctx , fc . Args [ "id" ] . ( string ) , fc . Args [ "changes" ] . ( model . UpdateTodo ) )
2023-10-10 22:26:07 +02:00
} )
if err != nil {
ec . Error ( ctx , err )
return graphql . Null
}
if resTmp == nil {
2023-11-05 17:42:14 +01:00
if ! graphql . HasFieldError ( ctx , fc ) {
ec . Errorf ( ctx , "must not be null" )
}
2023-10-10 22:26:07 +02:00
return graphql . Null
}
2023-11-05 17:42:14 +01:00
res := resTmp . ( * model . Todo )
2023-10-10 22:26:07 +02:00
fc . Result = res
2023-11-05 17:42:14 +01:00
return ec . marshalNTodo2ᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐTodo ( ctx , field . Selections , res )
2023-10-10 22:26:07 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_Mutation_updateTodo ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-10-10 22:26:07 +02:00
fc = & graphql . FieldContext {
Object : "Mutation" ,
Field : field ,
IsMethod : true ,
IsResolver : true ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
2023-11-05 17:42:14 +01:00
switch field . Name {
case "id" :
return ec . fieldContext_Todo_id ( ctx , field )
case "text" :
return ec . fieldContext_Todo_text ( ctx , field )
case "done" :
return ec . fieldContext_Todo_done ( ctx , field )
case "user" :
return ec . fieldContext_Todo_user ( ctx , field )
}
return nil , fmt . Errorf ( "no field named %q was found under type Todo" , field . Name )
2023-10-10 22:26:07 +02:00
} ,
}
defer func ( ) {
if r := recover ( ) ; r != nil {
err = ec . Recover ( ctx , r )
ec . Error ( ctx , err )
}
} ( )
ctx = graphql . WithFieldContext ( ctx , fc )
2023-11-05 17:42:14 +01:00
if fc . Args , err = ec . field_Mutation_updateTodo_args ( ctx , field . ArgumentMap ( ec . Variables ) ) ; err != nil {
2023-10-10 22:26:07 +02:00
ec . Error ( ctx , err )
return fc , err
}
return fc , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _Mutation_updateUser ( ctx context . Context , field graphql . CollectedField ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Mutation_updateUser ( ctx , field )
2023-10-10 22:26:07 +02:00
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
2023-11-05 17:42:14 +01:00
return ec . resolvers . Mutation ( ) . UpdateUser ( rctx , fc . Args [ "id" ] . ( string ) , fc . Args [ "changes" ] . ( model . UpdateUser ) )
2023-10-10 22:26:07 +02:00
} )
if err != nil {
ec . Error ( ctx , err )
return graphql . Null
}
if resTmp == nil {
2023-11-05 17:42:14 +01:00
if ! graphql . HasFieldError ( ctx , fc ) {
ec . Errorf ( ctx , "must not be null" )
}
2023-10-10 22:26:07 +02:00
return graphql . Null
}
2023-11-05 17:42:14 +01:00
res := resTmp . ( * model . User )
2023-10-10 22:26:07 +02:00
fc . Result = res
2023-11-05 17:42:14 +01:00
return ec . marshalNUser2ᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐUser ( ctx , field . Selections , res )
2023-10-10 22:26:07 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_Mutation_updateUser ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-10-10 22:26:07 +02:00
fc = & graphql . FieldContext {
Object : "Mutation" ,
Field : field ,
IsMethod : true ,
IsResolver : true ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
2023-11-05 17:42:14 +01:00
switch field . Name {
case "id" :
return ec . fieldContext_User_id ( ctx , field )
case "userName" :
return ec . fieldContext_User_userName ( ctx , field )
case "fullName" :
return ec . fieldContext_User_fullName ( ctx , field )
case "todos" :
return ec . fieldContext_User_todos ( ctx , field )
case "roles" :
return ec . fieldContext_User_roles ( ctx , field )
}
return nil , fmt . Errorf ( "no field named %q was found under type User" , field . Name )
2023-10-10 22:26:07 +02:00
} ,
}
defer func ( ) {
if r := recover ( ) ; r != nil {
err = ec . Recover ( ctx , r )
ec . Error ( ctx , err )
}
} ( )
ctx = graphql . WithFieldContext ( ctx , fc )
2023-11-05 17:42:14 +01:00
if fc . Args , err = ec . field_Mutation_updateUser_args ( ctx , field . ArgumentMap ( ec . Variables ) ) ; err != nil {
2023-10-10 22:26:07 +02:00
ec . Error ( ctx , err )
return fc , err
}
return fc , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _Mutation_updateRole ( ctx context . Context , field graphql . CollectedField ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Mutation_updateRole ( ctx , field )
2023-10-10 22:26:07 +02:00
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 ) {
2024-02-02 21:23:32 +01:00
directive0 := func ( rctx context . Context ) ( interface { } , error ) {
ctx = rctx // use context from middleware stack in children
return ec . resolvers . Mutation ( ) . UpdateRole ( rctx , fc . Args [ "id" ] . ( string ) , fc . Args [ "changes" ] . ( model . UpdateRole ) )
}
directive1 := func ( ctx context . Context ) ( interface { } , error ) {
privilege , err := ec . unmarshalNPrivilege2somepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐPrivilege ( ctx , "isAdmin" )
if err != nil {
return nil , err
}
if ec . directives . HasPrivilege == nil {
return nil , errors . New ( "directive hasPrivilege is not implemented" )
}
return ec . directives . HasPrivilege ( ctx , nil , directive0 , privilege )
}
tmp , err := directive1 ( rctx )
if err != nil {
return nil , graphql . ErrorOnPath ( ctx , err )
}
if tmp == nil {
return nil , nil
}
if data , ok := tmp . ( * model . Role ) ; ok {
return data , nil
}
return nil , fmt . Errorf ( ` unexpected type %T from directive, should be *somepi.ddns.net/gitea/gilex-dev/YetAnotherToDoList/graph/model.Role ` , tmp )
2023-10-10 22:26:07 +02:00
} )
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
}
2023-11-05 17:42:14 +01:00
res := resTmp . ( * model . Role )
2023-10-10 22:26:07 +02:00
fc . Result = res
2023-11-05 17:42:14 +01:00
return ec . marshalNRole2ᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐRole ( ctx , field . Selections , res )
2023-10-10 22:26:07 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_Mutation_updateRole ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-10-10 22:26:07 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "Mutation" ,
2023-10-10 22:26:07 +02:00
Field : field ,
IsMethod : true ,
IsResolver : true ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
switch field . Name {
case "id" :
2023-11-05 17:42:14 +01:00
return ec . fieldContext_Role_id ( ctx , field )
case "roleName" :
return ec . fieldContext_Role_roleName ( ctx , field )
case "isAdmin" :
return ec . fieldContext_Role_isAdmin ( ctx , field )
case "isUserCreator" :
return ec . fieldContext_Role_isUserCreator ( ctx , field )
2023-11-18 15:51:10 +01:00
case "roleMembers" :
return ec . fieldContext_Role_roleMembers ( ctx , field )
2023-10-10 22:26:07 +02:00
}
2023-11-05 17:42:14 +01:00
return nil , fmt . Errorf ( "no field named %q was found under type Role" , field . Name )
2023-10-10 22:26:07 +02:00
} ,
}
2023-11-05 17:42:14 +01:00
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_Mutation_updateRole_args ( ctx , field . ArgumentMap ( ec . Variables ) ) ; err != nil {
ec . Error ( ctx , err )
return fc , err
}
2023-10-10 22:26:07 +02:00
return fc , nil
2023-08-19 23:47:36 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _Mutation_updateRefreshToken ( ctx context . Context , field graphql . CollectedField ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Mutation_updateRefreshToken ( ctx , field )
2023-10-10 22:26:07 +02:00
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
2023-08-19 23:47:36 +02:00
}
2023-10-10 22:26:07 +02:00
} ( )
resTmp , err := ec . ResolverMiddleware ( ctx , func ( rctx context . Context ) ( interface { } , error ) {
ctx = rctx // use context from middleware stack in children
2023-11-05 17:42:14 +01:00
return ec . resolvers . Mutation ( ) . UpdateRefreshToken ( rctx , fc . Args [ "id" ] . ( string ) , fc . Args [ "changes" ] . ( model . UpdateRefreshToken ) )
2023-10-10 22:26:07 +02:00
} )
if err != nil {
ec . Error ( ctx , err )
return graphql . Null
2023-08-19 23:47:36 +02:00
}
2023-10-10 22:26:07 +02:00
if resTmp == nil {
if ! graphql . HasFieldError ( ctx , fc ) {
ec . Errorf ( ctx , "must not be null" )
2023-08-19 23:47:36 +02:00
}
2023-10-10 22:26:07 +02:00
return graphql . Null
2023-08-19 23:47:36 +02:00
}
2023-11-05 17:42:14 +01:00
res := resTmp . ( * model . RefreshToken )
2023-10-10 22:26:07 +02:00
fc . Result = res
2023-11-05 17:42:14 +01:00
return ec . marshalNRefreshToken2ᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐRefreshToken ( ctx , field . Selections , res )
2023-08-19 23:47:36 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_Mutation_updateRefreshToken ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-10-10 22:26:07 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "Mutation" ,
2023-10-10 22:26:07 +02:00
Field : field ,
IsMethod : true ,
IsResolver : true ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
switch field . Name {
case "id" :
2023-11-05 17:42:14 +01:00
return ec . fieldContext_RefreshToken_id ( ctx , field )
case "expiryDate" :
return ec . fieldContext_RefreshToken_expiryDate ( ctx , field )
case "tokenName" :
return ec . fieldContext_RefreshToken_tokenName ( ctx , field )
case "selector" :
return ec . fieldContext_RefreshToken_selector ( ctx , field )
case "token" :
return ec . fieldContext_RefreshToken_token ( ctx , field )
case "userId" :
return ec . fieldContext_RefreshToken_userId ( ctx , field )
2023-10-10 22:26:07 +02:00
}
2023-11-05 17:42:14 +01:00
return nil , fmt . Errorf ( "no field named %q was found under type RefreshToken" , field . Name )
2023-10-10 22:26:07 +02:00
} ,
2023-08-19 23:47:36 +02:00
}
2023-11-05 17:42:14 +01:00
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_Mutation_updateRefreshToken_args ( ctx , field . ArgumentMap ( ec . Variables ) ) ; err != nil {
ec . Error ( ctx , err )
return fc , err
}
2023-10-10 22:26:07 +02:00
return fc , nil
2023-08-19 23:47:36 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _Mutation_deleteUser ( ctx context . Context , field graphql . CollectedField ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Mutation_deleteUser ( ctx , field )
2023-08-19 23:47:36 +02:00
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 ) {
2024-02-02 21:23:32 +01:00
directive0 := func ( rctx context . Context ) ( interface { } , error ) {
ctx = rctx // use context from middleware stack in children
return ec . resolvers . Mutation ( ) . DeleteUser ( rctx , fc . Args [ "id" ] . ( string ) )
}
directive1 := func ( ctx context . Context ) ( interface { } , error ) {
privilege , err := ec . unmarshalNPrivilege2somepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐPrivilege ( ctx , "isAdmin" )
if err != nil {
return nil , err
}
if ec . directives . HasPrivilege == nil {
return nil , errors . New ( "directive hasPrivilege is not implemented" )
}
return ec . directives . HasPrivilege ( ctx , nil , directive0 , privilege )
}
tmp , err := directive1 ( rctx )
if err != nil {
return nil , graphql . ErrorOnPath ( ctx , err )
}
if tmp == nil {
return nil , nil
}
if data , ok := tmp . ( * string ) ; ok {
return data , nil
}
return nil , fmt . Errorf ( ` unexpected type %T from directive, should be *string ` , tmp )
2023-08-19 23:47:36 +02:00
} )
if err != nil {
ec . Error ( ctx , err )
return graphql . Null
}
if resTmp == nil {
return graphql . Null
}
2023-11-05 17:42:14 +01:00
res := resTmp . ( * string )
2023-08-19 23:47:36 +02:00
fc . Result = res
2023-11-05 17:42:14 +01:00
return ec . marshalOID2ᚖstring ( ctx , field . Selections , res )
2023-08-19 23:47:36 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_Mutation_deleteUser ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-08-19 23:47:36 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "Mutation" ,
2023-08-19 23:47:36 +02:00
Field : field ,
IsMethod : true ,
IsResolver : true ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
2023-11-05 17:42:14 +01:00
return nil , errors . New ( "field of type ID does not have child fields" )
2023-08-19 23:47:36 +02:00
} ,
}
defer func ( ) {
if r := recover ( ) ; r != nil {
err = ec . Recover ( ctx , r )
ec . Error ( ctx , err )
}
} ( )
ctx = graphql . WithFieldContext ( ctx , fc )
2023-11-05 17:42:14 +01:00
if fc . Args , err = ec . field_Mutation_deleteUser_args ( ctx , field . ArgumentMap ( ec . Variables ) ) ; err != nil {
2023-08-19 23:47:36 +02:00
ec . Error ( ctx , err )
return fc , err
}
return fc , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _Mutation_deleteTodo ( ctx context . Context , field graphql . CollectedField ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Mutation_deleteTodo ( ctx , field )
2023-08-19 23:47:36 +02:00
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
2023-11-05 17:42:14 +01:00
return ec . resolvers . Mutation ( ) . DeleteTodo ( rctx , fc . Args [ "id" ] . ( string ) )
2023-08-19 23:47:36 +02:00
} )
if err != nil {
ec . Error ( ctx , err )
return graphql . Null
}
if resTmp == nil {
return graphql . Null
}
2023-11-05 17:42:14 +01:00
res := resTmp . ( * string )
2023-08-19 23:47:36 +02:00
fc . Result = res
2023-11-05 17:42:14 +01:00
return ec . marshalOID2ᚖstring ( ctx , field . Selections , res )
2023-08-19 23:47:36 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_Mutation_deleteTodo ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-08-19 23:47:36 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "Mutation" ,
2023-08-19 23:47:36 +02:00
Field : field ,
IsMethod : true ,
IsResolver : true ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
2023-11-05 17:42:14 +01:00
return nil , errors . New ( "field of type ID does not have child fields" )
2023-08-19 23:47:36 +02:00
} ,
}
2023-10-10 22:26:07 +02:00
defer func ( ) {
if r := recover ( ) ; r != nil {
err = ec . Recover ( ctx , r )
ec . Error ( ctx , err )
}
} ( )
ctx = graphql . WithFieldContext ( ctx , fc )
2023-11-05 17:42:14 +01:00
if fc . Args , err = ec . field_Mutation_deleteTodo_args ( ctx , field . ArgumentMap ( ec . Variables ) ) ; err != nil {
2023-10-10 22:26:07 +02:00
ec . Error ( ctx , err )
return fc , err
}
2023-08-19 23:47:36 +02:00
return fc , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _Mutation_deleteRole ( ctx context . Context , field graphql . CollectedField ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Mutation_deleteRole ( ctx , field )
2023-08-19 23:47:36 +02:00
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 ) {
2024-02-02 21:23:32 +01:00
directive0 := func ( rctx context . Context ) ( interface { } , error ) {
ctx = rctx // use context from middleware stack in children
return ec . resolvers . Mutation ( ) . DeleteRole ( rctx , fc . Args [ "id" ] . ( string ) )
}
directive1 := func ( ctx context . Context ) ( interface { } , error ) {
privilege , err := ec . unmarshalNPrivilege2somepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐPrivilege ( ctx , "isAdmin" )
if err != nil {
return nil , err
}
if ec . directives . HasPrivilege == nil {
return nil , errors . New ( "directive hasPrivilege is not implemented" )
}
return ec . directives . HasPrivilege ( ctx , nil , directive0 , privilege )
}
tmp , err := directive1 ( rctx )
if err != nil {
return nil , graphql . ErrorOnPath ( ctx , err )
}
if tmp == nil {
return nil , nil
}
if data , ok := tmp . ( * string ) ; ok {
return data , nil
}
return nil , fmt . Errorf ( ` unexpected type %T from directive, should be *string ` , tmp )
2023-08-19 23:47:36 +02:00
} )
if err != nil {
ec . Error ( ctx , err )
return graphql . Null
}
if resTmp == nil {
return graphql . Null
}
2023-11-05 17:42:14 +01:00
res := resTmp . ( * string )
2023-08-19 23:47:36 +02:00
fc . Result = res
2023-11-05 17:42:14 +01:00
return ec . marshalOID2ᚖstring ( ctx , field . Selections , res )
2023-08-19 23:47:36 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_Mutation_deleteRole ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-08-19 23:47:36 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "Mutation" ,
2023-08-19 23:47:36 +02:00
Field : field ,
IsMethod : true ,
2023-11-05 17:42:14 +01:00
IsResolver : true ,
2023-08-19 23:47:36 +02:00
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
2023-11-05 17:42:14 +01:00
return nil , errors . New ( "field of type ID does not have child fields" )
2023-08-19 23:47:36 +02:00
} ,
}
defer func ( ) {
if r := recover ( ) ; r != nil {
err = ec . Recover ( ctx , r )
ec . Error ( ctx , err )
}
} ( )
ctx = graphql . WithFieldContext ( ctx , fc )
2023-11-05 17:42:14 +01:00
if fc . Args , err = ec . field_Mutation_deleteRole_args ( ctx , field . ArgumentMap ( ec . Variables ) ) ; err != nil {
2023-08-19 23:47:36 +02:00
ec . Error ( ctx , err )
return fc , err
}
return fc , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _Mutation_deleteRefreshToken ( ctx context . Context , field graphql . CollectedField ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Mutation_deleteRefreshToken ( ctx , field )
2023-08-19 23:47:36 +02:00
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
2023-11-05 17:42:14 +01:00
return ec . resolvers . Mutation ( ) . DeleteRefreshToken ( rctx , fc . Args [ "id" ] . ( string ) )
2023-08-19 23:47:36 +02:00
} )
if err != nil {
ec . Error ( ctx , err )
return graphql . Null
}
if resTmp == nil {
return graphql . Null
}
2023-11-05 17:42:14 +01:00
res := resTmp . ( * string )
2023-08-19 23:47:36 +02:00
fc . Result = res
2023-11-05 17:42:14 +01:00
return ec . marshalOID2ᚖstring ( ctx , field . Selections , res )
2023-08-19 23:47:36 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_Mutation_deleteRefreshToken ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-08-19 23:47:36 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "Mutation" ,
2023-08-19 23:47:36 +02:00
Field : field ,
IsMethod : true ,
2023-11-05 17:42:14 +01:00
IsResolver : true ,
2023-08-19 23:47:36 +02:00
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
2023-11-05 17:42:14 +01:00
return nil , errors . New ( "field of type ID does not have child fields" )
2023-08-19 23:47:36 +02:00
} ,
}
2023-11-05 17:42:14 +01:00
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_Mutation_deleteRefreshToken_args ( ctx , field . ArgumentMap ( ec . Variables ) ) ; err != nil {
ec . Error ( ctx , err )
return fc , err
}
2023-08-19 23:47:36 +02:00
return fc , nil
}
2023-11-18 15:51:10 +01:00
func ( ec * executionContext ) _Mutation_addUserRole ( ctx context . Context , field graphql . CollectedField ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Mutation_addUserRole ( ctx , field )
2023-08-19 23:47:36 +02:00
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 ) {
2024-02-02 21:23:32 +01:00
directive0 := func ( rctx context . Context ) ( interface { } , error ) {
ctx = rctx // use context from middleware stack in children
return ec . resolvers . Mutation ( ) . AddUserRole ( rctx , fc . Args [ "userId" ] . ( string ) , fc . Args [ "roleId" ] . ( string ) , fc . Args [ "userIsRoleManager" ] . ( bool ) )
}
directive1 := func ( ctx context . Context ) ( interface { } , error ) {
privilege , err := ec . unmarshalNPrivilege2somepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐPrivilege ( ctx , "isAdmin" )
if err != nil {
return nil , err
}
if ec . directives . HasPrivilege == nil {
return nil , errors . New ( "directive hasPrivilege is not implemented" )
}
return ec . directives . HasPrivilege ( ctx , nil , directive0 , privilege )
}
tmp , err := directive1 ( rctx )
if err != nil {
return nil , graphql . ErrorOnPath ( ctx , err )
}
if tmp == nil {
return nil , nil
}
if data , ok := tmp . ( [ ] * model . RelationUserRole ) ; ok {
return data , nil
}
return nil , fmt . Errorf ( ` unexpected type %T from directive, should be []*somepi.ddns.net/gitea/gilex-dev/YetAnotherToDoList/graph/model.RelationUserRole ` , tmp )
2023-08-19 23:47:36 +02:00
} )
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
}
2023-11-18 15:51:10 +01:00
res := resTmp . ( [ ] * model . RelationUserRole )
2023-08-19 23:47:36 +02:00
fc . Result = res
2023-11-18 15:51:10 +01:00
return ec . marshalNRelationUserRole2ᚕᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐRelationUserRoleᚄ ( ctx , field . Selections , res )
2023-08-19 23:47:36 +02:00
}
2023-11-18 15:51:10 +01:00
func ( ec * executionContext ) fieldContext_Mutation_addUserRole ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-08-19 23:47:36 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "Mutation" ,
2023-08-19 23:47:36 +02:00
Field : field ,
2023-11-05 17:42:14 +01:00
IsMethod : true ,
IsResolver : true ,
2023-08-19 23:47:36 +02:00
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
2023-11-05 17:42:14 +01:00
switch field . Name {
2023-11-18 15:51:10 +01:00
case "role" :
return ec . fieldContext_RelationUserRole_role ( ctx , field )
case "userIsRoleManager" :
return ec . fieldContext_RelationUserRole_userIsRoleManager ( ctx , field )
2023-11-05 17:42:14 +01:00
}
2023-11-18 15:51:10 +01:00
return nil , fmt . Errorf ( "no field named %q was found under type RelationUserRole" , field . Name )
2023-08-19 23:47:36 +02:00
} ,
}
2023-11-05 17:42:14 +01:00
defer func ( ) {
if r := recover ( ) ; r != nil {
err = ec . Recover ( ctx , r )
ec . Error ( ctx , err )
}
} ( )
ctx = graphql . WithFieldContext ( ctx , fc )
2023-11-18 15:51:10 +01:00
if fc . Args , err = ec . field_Mutation_addUserRole_args ( ctx , field . ArgumentMap ( ec . Variables ) ) ; err != nil {
2023-11-05 17:42:14 +01:00
ec . Error ( ctx , err )
return fc , err
}
2023-08-19 23:47:36 +02:00
return fc , nil
}
2024-02-02 21:23:32 +01:00
func ( ec * executionContext ) _Mutation_updateUserRole ( ctx context . Context , field graphql . CollectedField ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Mutation_updateUserRole ( ctx , field )
2023-08-19 23:47:36 +02:00
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 ) {
2024-02-02 21:23:32 +01:00
directive0 := func ( rctx context . Context ) ( interface { } , error ) {
ctx = rctx // use context from middleware stack in children
return ec . resolvers . Mutation ( ) . UpdateUserRole ( rctx , fc . Args [ "userId" ] . ( string ) , fc . Args [ "roleId" ] . ( string ) , fc . Args [ "userIsRoleManager" ] . ( bool ) )
}
directive1 := func ( ctx context . Context ) ( interface { } , error ) {
privilege , err := ec . unmarshalNPrivilege2somepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐPrivilege ( ctx , "isAdmin" )
if err != nil {
return nil , err
}
if ec . directives . HasPrivilege == nil {
return nil , errors . New ( "directive hasPrivilege is not implemented" )
}
return ec . directives . HasPrivilege ( ctx , nil , directive0 , privilege )
}
tmp , err := directive1 ( rctx )
if err != nil {
return nil , graphql . ErrorOnPath ( ctx , err )
}
if tmp == nil {
return nil , nil
}
if data , ok := tmp . ( [ ] * model . RelationUserRole ) ; ok {
return data , nil
}
return nil , fmt . Errorf ( ` unexpected type %T from directive, should be []*somepi.ddns.net/gitea/gilex-dev/YetAnotherToDoList/graph/model.RelationUserRole ` , tmp )
2023-08-19 23:47:36 +02:00
} )
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
}
2023-11-18 15:51:10 +01:00
res := resTmp . ( [ ] * model . RelationUserRole )
2023-08-19 23:47:36 +02:00
fc . Result = res
2023-11-18 15:51:10 +01:00
return ec . marshalNRelationUserRole2ᚕᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐRelationUserRoleᚄ ( ctx , field . Selections , res )
2023-08-19 23:47:36 +02:00
}
2024-02-02 21:23:32 +01:00
func ( ec * executionContext ) fieldContext_Mutation_updateUserRole ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-08-19 23:47:36 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "Mutation" ,
2023-08-19 23:47:36 +02:00
Field : field ,
2023-11-05 17:42:14 +01:00
IsMethod : true ,
IsResolver : true ,
2023-08-19 23:47:36 +02:00
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
2023-11-05 17:42:14 +01:00
switch field . Name {
2023-11-18 15:51:10 +01:00
case "role" :
return ec . fieldContext_RelationUserRole_role ( ctx , field )
case "userIsRoleManager" :
return ec . fieldContext_RelationUserRole_userIsRoleManager ( ctx , field )
2023-11-05 17:42:14 +01:00
}
2023-11-18 15:51:10 +01:00
return nil , fmt . Errorf ( "no field named %q was found under type RelationUserRole" , field . Name )
2023-08-19 23:47:36 +02:00
} ,
}
2023-11-05 17:42:14 +01:00
defer func ( ) {
if r := recover ( ) ; r != nil {
err = ec . Recover ( ctx , r )
ec . Error ( ctx , err )
}
} ( )
ctx = graphql . WithFieldContext ( ctx , fc )
2024-02-02 21:23:32 +01:00
if fc . Args , err = ec . field_Mutation_updateUserRole_args ( ctx , field . ArgumentMap ( ec . Variables ) ) ; err != nil {
2023-11-18 15:51:10 +01:00
ec . Error ( ctx , err )
return fc , err
}
return fc , nil
}
func ( ec * executionContext ) _Mutation_removeUserRole ( ctx context . Context , field graphql . CollectedField ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Mutation_removeUserRole ( 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 ) {
2024-02-02 21:23:32 +01:00
directive0 := func ( rctx context . Context ) ( interface { } , error ) {
ctx = rctx // use context from middleware stack in children
return ec . resolvers . Mutation ( ) . RemoveUserRole ( rctx , fc . Args [ "userId" ] . ( string ) , fc . Args [ "roleId" ] . ( string ) )
}
directive1 := func ( ctx context . Context ) ( interface { } , error ) {
privilege , err := ec . unmarshalNPrivilege2somepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐPrivilege ( ctx , "isAdmin" )
if err != nil {
return nil , err
}
if ec . directives . HasPrivilege == nil {
return nil , errors . New ( "directive hasPrivilege is not implemented" )
}
return ec . directives . HasPrivilege ( ctx , nil , directive0 , privilege )
}
tmp , err := directive1 ( rctx )
if err != nil {
return nil , graphql . ErrorOnPath ( ctx , err )
}
if tmp == nil {
return nil , nil
}
if data , ok := tmp . ( [ ] * model . RelationUserRole ) ; ok {
return data , nil
}
return nil , fmt . Errorf ( ` unexpected type %T from directive, should be []*somepi.ddns.net/gitea/gilex-dev/YetAnotherToDoList/graph/model.RelationUserRole ` , tmp )
2023-11-18 15:51:10 +01:00
} )
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 . RelationUserRole )
fc . Result = res
return ec . marshalNRelationUserRole2ᚕᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐRelationUserRoleᚄ ( ctx , field . Selections , res )
}
func ( ec * executionContext ) fieldContext_Mutation_removeUserRole ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "Mutation" ,
Field : field ,
IsMethod : true ,
IsResolver : true ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
switch field . Name {
case "role" :
return ec . fieldContext_RelationUserRole_role ( ctx , field )
case "userIsRoleManager" :
return ec . fieldContext_RelationUserRole_userIsRoleManager ( ctx , field )
}
return nil , fmt . Errorf ( "no field named %q was found under type RelationUserRole" , 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_Mutation_removeUserRole_args ( ctx , field . ArgumentMap ( ec . Variables ) ) ; err != nil {
2023-11-05 17:42:14 +01:00
ec . Error ( ctx , err )
return fc , err
}
2023-08-19 23:47:36 +02:00
return fc , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _Query_todos ( ctx context . Context , field graphql . CollectedField ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Query_todos ( ctx , field )
2023-08-19 23:47:36 +02:00
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 ) {
2024-02-02 21:23:32 +01:00
directive0 := func ( rctx context . Context ) ( interface { } , error ) {
ctx = rctx // use context from middleware stack in children
return ec . resolvers . Query ( ) . Todos ( rctx )
}
directive1 := func ( ctx context . Context ) ( interface { } , error ) {
privilege , err := ec . unmarshalNPrivilege2somepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐPrivilege ( ctx , "isAdmin" )
if err != nil {
return nil , err
}
if ec . directives . HasPrivilege == nil {
return nil , errors . New ( "directive hasPrivilege is not implemented" )
}
return ec . directives . HasPrivilege ( ctx , nil , directive0 , privilege )
}
tmp , err := directive1 ( rctx )
if err != nil {
return nil , graphql . ErrorOnPath ( ctx , err )
}
if tmp == nil {
return nil , nil
}
if data , ok := tmp . ( [ ] * model . Todo ) ; ok {
return data , nil
}
return nil , fmt . Errorf ( ` unexpected type %T from directive, should be []*somepi.ddns.net/gitea/gilex-dev/YetAnotherToDoList/graph/model.Todo ` , tmp )
2023-08-19 23:47:36 +02:00
} )
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
}
2023-11-05 17:42:14 +01:00
res := resTmp . ( [ ] * model . Todo )
2023-08-19 23:47:36 +02:00
fc . Result = res
2023-11-05 17:42:14 +01:00
return ec . marshalNTodo2ᚕᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐTodoᚄ ( ctx , field . Selections , res )
2023-08-19 23:47:36 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_Query_todos ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-08-19 23:47:36 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "Query" ,
2023-08-19 23:47:36 +02:00
Field : field ,
2023-11-05 17:42:14 +01:00
IsMethod : true ,
IsResolver : true ,
2023-08-19 23:47:36 +02:00
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
2023-11-05 17:42:14 +01:00
switch field . Name {
case "id" :
return ec . fieldContext_Todo_id ( ctx , field )
case "text" :
return ec . fieldContext_Todo_text ( ctx , field )
case "done" :
return ec . fieldContext_Todo_done ( ctx , field )
case "user" :
return ec . fieldContext_Todo_user ( ctx , field )
}
return nil , fmt . Errorf ( "no field named %q was found under type Todo" , field . Name )
2023-08-19 23:47:36 +02:00
} ,
}
return fc , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _Query_users ( ctx context . Context , field graphql . CollectedField ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Query_users ( ctx , field )
2023-08-19 23:47:36 +02:00
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
2023-11-05 17:42:14 +01:00
return ec . resolvers . Query ( ) . Users ( rctx )
2023-08-19 23:47:36 +02:00
} )
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
}
2023-11-05 17:42:14 +01:00
res := resTmp . ( [ ] * model . User )
2023-08-19 23:47:36 +02:00
fc . Result = res
2023-11-05 17:42:14 +01:00
return ec . marshalNUser2ᚕᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐUserᚄ ( ctx , field . Selections , res )
2023-08-19 23:47:36 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_Query_users ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-08-19 23:47:36 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "Query" ,
2023-08-19 23:47:36 +02:00
Field : field ,
2023-09-01 21:33:26 +02:00
IsMethod : true ,
IsResolver : true ,
2023-08-19 23:47:36 +02:00
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
switch field . Name {
case "id" :
return ec . fieldContext_User_id ( ctx , field )
2023-10-10 22:26:07 +02:00
case "userName" :
return ec . fieldContext_User_userName ( ctx , field )
case "fullName" :
return ec . fieldContext_User_fullName ( ctx , field )
case "todos" :
return ec . fieldContext_User_todos ( ctx , field )
2023-11-05 17:42:14 +01:00
case "roles" :
return ec . fieldContext_User_roles ( ctx , field )
2023-08-19 23:47:36 +02:00
}
return nil , fmt . Errorf ( "no field named %q was found under type User" , field . Name )
} ,
}
return fc , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _Query_roles ( ctx context . Context , field graphql . CollectedField ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Query_roles ( ctx , field )
2023-08-19 23:47:36 +02:00
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
2023-11-05 17:42:14 +01:00
return ec . resolvers . Query ( ) . Roles ( rctx )
2023-08-19 23:47:36 +02:00
} )
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
}
2023-11-05 17:42:14 +01:00
res := resTmp . ( [ ] * model . Role )
2023-08-19 23:47:36 +02:00
fc . Result = res
2023-11-05 17:42:14 +01:00
return ec . marshalNRole2ᚕᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐRoleᚄ ( ctx , field . Selections , res )
2023-08-19 23:47:36 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_Query_roles ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-08-19 23:47:36 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "Query" ,
2023-08-19 23:47:36 +02:00
Field : field ,
2023-11-05 17:42:14 +01:00
IsMethod : true ,
IsResolver : true ,
2023-08-19 23:47:36 +02:00
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
2023-11-05 17:42:14 +01:00
switch field . Name {
case "id" :
return ec . fieldContext_Role_id ( ctx , field )
case "roleName" :
return ec . fieldContext_Role_roleName ( ctx , field )
case "isAdmin" :
return ec . fieldContext_Role_isAdmin ( ctx , field )
case "isUserCreator" :
return ec . fieldContext_Role_isUserCreator ( ctx , field )
2023-11-18 15:51:10 +01:00
case "roleMembers" :
return ec . fieldContext_Role_roleMembers ( ctx , field )
2023-11-05 17:42:14 +01:00
}
return nil , fmt . Errorf ( "no field named %q was found under type Role" , field . Name )
2023-08-19 23:47:36 +02:00
} ,
}
return fc , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _Query_refreshTokens ( ctx context . Context , field graphql . CollectedField ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Query_refreshTokens ( ctx , field )
2023-08-19 23:47:36 +02:00
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 ) {
2024-02-02 21:23:32 +01:00
directive0 := func ( rctx context . Context ) ( interface { } , error ) {
ctx = rctx // use context from middleware stack in children
return ec . resolvers . Query ( ) . RefreshTokens ( rctx )
}
directive1 := func ( ctx context . Context ) ( interface { } , error ) {
privilege , err := ec . unmarshalNPrivilege2somepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐPrivilege ( ctx , "isAdmin" )
if err != nil {
return nil , err
}
if ec . directives . HasPrivilege == nil {
return nil , errors . New ( "directive hasPrivilege is not implemented" )
}
return ec . directives . HasPrivilege ( ctx , nil , directive0 , privilege )
}
tmp , err := directive1 ( rctx )
if err != nil {
return nil , graphql . ErrorOnPath ( ctx , err )
}
if tmp == nil {
return nil , nil
}
if data , ok := tmp . ( [ ] * model . RefreshToken ) ; ok {
return data , nil
}
return nil , fmt . Errorf ( ` unexpected type %T from directive, should be []*somepi.ddns.net/gitea/gilex-dev/YetAnotherToDoList/graph/model.RefreshToken ` , tmp )
2023-10-10 22:26:07 +02:00
} )
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
}
2023-11-05 17:42:14 +01:00
res := resTmp . ( [ ] * model . RefreshToken )
2023-10-10 22:26:07 +02:00
fc . Result = res
2023-11-05 17:42:14 +01:00
return ec . marshalNRefreshToken2ᚕᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐRefreshTokenᚄ ( ctx , field . Selections , res )
2023-10-10 22:26:07 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_Query_refreshTokens ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-10-10 22:26:07 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "Query" ,
2023-10-10 22:26:07 +02:00
Field : field ,
2023-11-05 17:42:14 +01:00
IsMethod : true ,
IsResolver : true ,
2023-10-10 22:26:07 +02:00
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
2023-11-05 17:42:14 +01:00
switch field . Name {
case "id" :
return ec . fieldContext_RefreshToken_id ( ctx , field )
case "expiryDate" :
return ec . fieldContext_RefreshToken_expiryDate ( ctx , field )
case "tokenName" :
return ec . fieldContext_RefreshToken_tokenName ( ctx , field )
case "selector" :
return ec . fieldContext_RefreshToken_selector ( ctx , field )
case "token" :
return ec . fieldContext_RefreshToken_token ( ctx , field )
case "userId" :
return ec . fieldContext_RefreshToken_userId ( ctx , field )
}
return nil , fmt . Errorf ( "no field named %q was found under type RefreshToken" , field . Name )
2023-10-10 22:26:07 +02:00
} ,
}
return fc , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _Query_user ( ctx context . Context , field graphql . CollectedField ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Query_user ( ctx , field )
2023-10-10 22:26:07 +02:00
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
2023-11-05 17:42:14 +01:00
return ec . resolvers . Query ( ) . User ( rctx , fc . Args [ "id" ] . ( string ) )
2023-08-19 23:47:36 +02:00
} )
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
}
2023-11-05 17:42:14 +01:00
res := resTmp . ( * model . User )
2023-08-19 23:47:36 +02:00
fc . Result = res
2023-11-05 17:42:14 +01:00
return ec . marshalNUser2ᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐUser ( ctx , field . Selections , res )
2023-08-19 23:47:36 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_Query_user ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-08-19 23:47:36 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "Query" ,
2023-08-19 23:47:36 +02:00
Field : field ,
2023-11-05 17:42:14 +01:00
IsMethod : true ,
IsResolver : true ,
2023-08-19 23:47:36 +02:00
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
2023-11-05 17:42:14 +01:00
switch field . Name {
case "id" :
return ec . fieldContext_User_id ( ctx , field )
case "userName" :
return ec . fieldContext_User_userName ( ctx , field )
case "fullName" :
return ec . fieldContext_User_fullName ( ctx , field )
case "todos" :
return ec . fieldContext_User_todos ( ctx , field )
case "roles" :
return ec . fieldContext_User_roles ( ctx , field )
}
return nil , fmt . Errorf ( "no field named %q was found under type User" , field . Name )
2023-08-19 23:47:36 +02:00
} ,
}
2023-11-05 17:42:14 +01:00
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_user_args ( ctx , field . ArgumentMap ( ec . Variables ) ) ; err != nil {
ec . Error ( ctx , err )
return fc , err
}
2023-08-19 23:47:36 +02:00
return fc , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _Query_todo ( ctx context . Context , field graphql . CollectedField ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Query_todo ( ctx , field )
2023-10-10 22:26:07 +02:00
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
2023-11-05 17:42:14 +01:00
return ec . resolvers . Query ( ) . Todo ( rctx , fc . Args [ "id" ] . ( string ) )
2023-10-10 22:26:07 +02:00
} )
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
}
2023-11-05 17:42:14 +01:00
res := resTmp . ( * model . Todo )
2023-10-10 22:26:07 +02:00
fc . Result = res
2023-11-05 17:42:14 +01:00
return ec . marshalNTodo2ᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐTodo ( ctx , field . Selections , res )
2023-10-10 22:26:07 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_Query_todo ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-10-10 22:26:07 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "Query" ,
2023-10-10 22:26:07 +02:00
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_Todo_id ( ctx , field )
case "text" :
return ec . fieldContext_Todo_text ( ctx , field )
case "done" :
return ec . fieldContext_Todo_done ( ctx , field )
case "user" :
return ec . fieldContext_Todo_user ( ctx , field )
}
return nil , fmt . Errorf ( "no field named %q was found under type Todo" , field . Name )
} ,
}
2023-11-05 17:42:14 +01:00
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_todo_args ( ctx , field . ArgumentMap ( ec . Variables ) ) ; err != nil {
ec . Error ( ctx , err )
return fc , err
}
2023-10-10 22:26:07 +02:00
return fc , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _Query_role ( ctx context . Context , field graphql . CollectedField ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Query_role ( ctx , field )
2023-08-19 23:47:36 +02:00
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
2023-11-05 17:42:14 +01:00
return ec . resolvers . Query ( ) . Role ( rctx , fc . Args [ "id" ] . ( string ) )
2023-08-19 23:47:36 +02:00
} )
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
}
2023-11-05 17:42:14 +01:00
res := resTmp . ( * model . Role )
2023-08-19 23:47:36 +02:00
fc . Result = res
2023-11-05 17:42:14 +01:00
return ec . marshalNRole2ᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐRole ( ctx , field . Selections , res )
2023-08-19 23:47:36 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_Query_role ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-08-19 23:47:36 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "Query" ,
2023-08-19 23:47:36 +02:00
Field : field ,
2023-11-05 17:42:14 +01:00
IsMethod : true ,
IsResolver : true ,
2023-08-19 23:47:36 +02:00
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
2023-11-05 17:42:14 +01:00
switch field . Name {
case "id" :
return ec . fieldContext_Role_id ( ctx , field )
case "roleName" :
return ec . fieldContext_Role_roleName ( ctx , field )
case "isAdmin" :
return ec . fieldContext_Role_isAdmin ( ctx , field )
case "isUserCreator" :
return ec . fieldContext_Role_isUserCreator ( ctx , field )
2023-11-18 15:51:10 +01:00
case "roleMembers" :
return ec . fieldContext_Role_roleMembers ( ctx , field )
2023-11-05 17:42:14 +01:00
}
return nil , fmt . Errorf ( "no field named %q was found under type Role" , field . Name )
2023-08-19 23:47:36 +02:00
} ,
}
2023-11-05 17:42:14 +01:00
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_role_args ( ctx , field . ArgumentMap ( ec . Variables ) ) ; err != nil {
ec . Error ( ctx , err )
return fc , err
}
2023-08-19 23:47:36 +02:00
return fc , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _Query_refreshToken ( ctx context . Context , field graphql . CollectedField ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Query_refreshToken ( ctx , field )
2023-08-19 23:47:36 +02:00
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
2023-11-05 17:42:14 +01:00
return ec . resolvers . Query ( ) . RefreshToken ( rctx , fc . Args [ "id" ] . ( string ) )
2023-08-19 23:47:36 +02:00
} )
if err != nil {
ec . Error ( ctx , err )
return graphql . Null
}
if resTmp == nil {
2023-11-05 17:42:14 +01:00
if ! graphql . HasFieldError ( ctx , fc ) {
ec . Errorf ( ctx , "must not be null" )
}
2023-08-19 23:47:36 +02:00
return graphql . Null
}
2023-11-05 17:42:14 +01:00
res := resTmp . ( * model . RefreshToken )
2023-08-19 23:47:36 +02:00
fc . Result = res
2023-11-05 17:42:14 +01:00
return ec . marshalNRefreshToken2ᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐRefreshToken ( ctx , field . Selections , res )
2023-08-19 23:47:36 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_Query_refreshToken ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-08-19 23:47:36 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "Query" ,
2023-08-19 23:47:36 +02:00
Field : field ,
IsMethod : true ,
2023-11-05 17:42:14 +01:00
IsResolver : true ,
2023-08-19 23:47:36 +02:00
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
2023-11-05 17:42:14 +01:00
switch field . Name {
case "id" :
return ec . fieldContext_RefreshToken_id ( ctx , field )
case "expiryDate" :
return ec . fieldContext_RefreshToken_expiryDate ( ctx , field )
case "tokenName" :
return ec . fieldContext_RefreshToken_tokenName ( ctx , field )
case "selector" :
return ec . fieldContext_RefreshToken_selector ( ctx , field )
case "token" :
return ec . fieldContext_RefreshToken_token ( ctx , field )
case "userId" :
return ec . fieldContext_RefreshToken_userId ( ctx , field )
}
return nil , fmt . Errorf ( "no field named %q was found under type RefreshToken" , field . Name )
2023-08-19 23:47:36 +02:00
} ,
}
2023-11-05 17:42:14 +01:00
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_refreshToken_args ( ctx , field . ArgumentMap ( ec . Variables ) ) ; err != nil {
ec . Error ( ctx , err )
return fc , err
}
2023-08-19 23:47:36 +02:00
return fc , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _Query___type ( ctx context . Context , field graphql . CollectedField ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Query___type ( ctx , field )
2023-08-19 23:47:36 +02:00
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
2023-11-05 17:42:14 +01:00
return ec . introspectType ( fc . Args [ "name" ] . ( string ) )
2023-08-19 23:47:36 +02:00
} )
if err != nil {
ec . Error ( ctx , err )
return graphql . Null
}
if resTmp == nil {
return graphql . Null
}
2023-11-05 17:42:14 +01:00
res := resTmp . ( * introspection . Type )
2023-08-19 23:47:36 +02:00
fc . Result = res
2023-11-05 17:42:14 +01:00
return ec . marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType ( ctx , field . Selections , res )
2023-08-19 23:47:36 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_Query___type ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-08-19 23:47:36 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "Query" ,
2023-08-19 23:47:36 +02:00
Field : field ,
2023-11-05 17:42:14 +01:00
IsMethod : true ,
2023-08-19 23:47:36 +02:00
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
2023-11-05 17:42:14 +01:00
switch field . Name {
case "kind" :
return ec . fieldContext___Type_kind ( ctx , field )
case "name" :
return ec . fieldContext___Type_name ( ctx , field )
case "description" :
return ec . fieldContext___Type_description ( ctx , field )
case "fields" :
return ec . fieldContext___Type_fields ( ctx , field )
case "interfaces" :
return ec . fieldContext___Type_interfaces ( ctx , field )
case "possibleTypes" :
return ec . fieldContext___Type_possibleTypes ( ctx , field )
case "enumValues" :
return ec . fieldContext___Type_enumValues ( ctx , field )
case "inputFields" :
return ec . fieldContext___Type_inputFields ( ctx , field )
case "ofType" :
return ec . fieldContext___Type_ofType ( ctx , field )
case "specifiedByURL" :
return ec . fieldContext___Type_specifiedByURL ( ctx , field )
}
return nil , fmt . Errorf ( "no field named %q was found under type __Type" , field . Name )
2023-08-19 23:47:36 +02:00
} ,
}
2023-11-05 17:42:14 +01:00
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___type_args ( ctx , field . ArgumentMap ( ec . Variables ) ) ; err != nil {
ec . Error ( ctx , err )
return fc , err
}
2023-08-19 23:47:36 +02:00
return fc , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _Query___schema ( ctx context . Context , field graphql . CollectedField ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Query___schema ( ctx , field )
2023-08-19 23:47:36 +02:00
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
2023-11-05 17:42:14 +01:00
return ec . introspectSchema ( )
2023-08-19 23:47:36 +02:00
} )
if err != nil {
ec . Error ( ctx , err )
return graphql . Null
}
if resTmp == nil {
return graphql . Null
}
2023-11-05 17:42:14 +01:00
res := resTmp . ( * introspection . Schema )
2023-08-19 23:47:36 +02:00
fc . Result = res
2023-11-05 17:42:14 +01:00
return ec . marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema ( ctx , field . Selections , res )
2023-08-19 23:47:36 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_Query___schema ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-08-19 23:47:36 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "Query" ,
2023-08-19 23:47:36 +02:00
Field : field ,
2023-11-05 17:42:14 +01:00
IsMethod : true ,
2023-08-19 23:47:36 +02:00
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
switch field . Name {
case "description" :
2023-11-05 17:42:14 +01:00
return ec . fieldContext___Schema_description ( ctx , field )
case "types" :
return ec . fieldContext___Schema_types ( ctx , field )
case "queryType" :
return ec . fieldContext___Schema_queryType ( ctx , field )
case "mutationType" :
return ec . fieldContext___Schema_mutationType ( ctx , field )
case "subscriptionType" :
return ec . fieldContext___Schema_subscriptionType ( ctx , field )
case "directives" :
return ec . fieldContext___Schema_directives ( ctx , field )
2023-08-19 23:47:36 +02:00
}
2023-11-05 17:42:14 +01:00
return nil , fmt . Errorf ( "no field named %q was found under type __Schema" , field . Name )
2023-08-19 23:47:36 +02:00
} ,
}
return fc , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _RefreshToken_id ( ctx context . Context , field graphql . CollectedField , obj * model . RefreshToken ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_RefreshToken_id ( ctx , field )
2023-08-19 23:47:36 +02:00
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
2023-11-05 17:42:14 +01:00
return obj . ID , nil
2023-08-19 23:47:36 +02:00
} )
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
}
2023-11-05 17:42:14 +01:00
res := resTmp . ( string )
2023-08-19 23:47:36 +02:00
fc . Result = res
2023-11-05 17:42:14 +01:00
return ec . marshalNID2string ( ctx , field . Selections , res )
2023-08-19 23:47:36 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_RefreshToken_id ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-08-19 23:47:36 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "RefreshToken" ,
2023-08-19 23:47:36 +02:00
Field : field ,
IsMethod : false ,
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
2023-11-05 17:42:14 +01:00
return nil , errors . New ( "field of type ID does not have child fields" )
2023-08-19 23:47:36 +02:00
} ,
}
return fc , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _RefreshToken_expiryDate ( ctx context . Context , field graphql . CollectedField , obj * model . RefreshToken ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_RefreshToken_expiryDate ( ctx , field )
2023-08-19 23:47:36 +02:00
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
2023-11-05 17:42:14 +01:00
return obj . ExpiryDate , nil
2023-08-19 23:47:36 +02:00
} )
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
}
2023-11-05 17:42:14 +01:00
res := resTmp . ( int )
2023-08-19 23:47:36 +02:00
fc . Result = res
2023-11-05 17:42:14 +01:00
return ec . marshalNInt2int ( ctx , field . Selections , res )
2023-08-19 23:47:36 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_RefreshToken_expiryDate ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-08-19 23:47:36 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "RefreshToken" ,
2023-08-19 23:47:36 +02:00
Field : field ,
IsMethod : false ,
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
2023-11-05 17:42:14 +01:00
return nil , errors . New ( "field of type Int does not have child fields" )
2023-08-19 23:47:36 +02:00
} ,
}
return fc , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _RefreshToken_tokenName ( ctx context . Context , field graphql . CollectedField , obj * model . RefreshToken ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_RefreshToken_tokenName ( ctx , field )
2023-08-19 23:47:36 +02:00
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
2023-11-05 17:42:14 +01:00
return obj . TokenName , nil
2023-08-19 23:47:36 +02:00
} )
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 )
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_RefreshToken_tokenName ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-08-19 23:47:36 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "RefreshToken" ,
2023-08-19 23:47:36 +02:00
Field : field ,
2023-11-05 17:42:14 +01:00
IsMethod : false ,
2023-08-19 23:47:36 +02:00
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
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _RefreshToken_selector ( ctx context . Context , field graphql . CollectedField , obj * model . RefreshToken ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_RefreshToken_selector ( ctx , field )
2023-08-19 23:47:36 +02:00
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
2023-11-05 17:42:14 +01:00
return obj . Selector , nil
2023-08-19 23:47:36 +02:00
} )
if err != nil {
ec . Error ( ctx , err )
return graphql . Null
}
if resTmp == nil {
return graphql . Null
}
2023-11-05 17:42:14 +01:00
res := resTmp . ( * string )
2023-08-19 23:47:36 +02:00
fc . Result = res
2023-11-05 17:42:14 +01:00
return ec . marshalOString2ᚖstring ( ctx , field . Selections , res )
2023-08-19 23:47:36 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_RefreshToken_selector ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-08-19 23:47:36 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "RefreshToken" ,
2023-08-19 23:47:36 +02:00
Field : field ,
2023-11-05 17:42:14 +01:00
IsMethod : false ,
2023-08-19 23:47:36 +02:00
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
2023-11-05 17:42:14 +01:00
return nil , errors . New ( "field of type String does not have child fields" )
2023-08-19 23:47:36 +02:00
} ,
}
return fc , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _RefreshToken_token ( ctx context . Context , field graphql . CollectedField , obj * model . RefreshToken ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_RefreshToken_token ( ctx , field )
2023-08-19 23:47:36 +02:00
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
2023-11-05 17:42:14 +01:00
return obj . Token , nil
2023-08-19 23:47:36 +02:00
} )
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 )
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_RefreshToken_token ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-08-19 23:47:36 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "RefreshToken" ,
2023-08-19 23:47:36 +02:00
Field : field ,
2023-11-05 17:42:14 +01:00
IsMethod : false ,
2023-08-19 23:47:36 +02:00
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
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _RefreshToken_userId ( ctx context . Context , field graphql . CollectedField , obj * model . RefreshToken ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_RefreshToken_userId ( ctx , field )
2023-08-19 23:47:36 +02:00
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
2023-11-05 17:42:14 +01:00
return obj . UserID , nil
2023-08-19 23:47:36 +02:00
} )
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 )
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_RefreshToken_userId ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-08-19 23:47:36 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "RefreshToken" ,
2023-08-19 23:47:36 +02:00
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
}
2023-11-18 15:51:10 +01:00
func ( ec * executionContext ) _RelationRoleUser_user ( ctx context . Context , field graphql . CollectedField , obj * model . RelationRoleUser ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_RelationRoleUser_user ( 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 . User , 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 . User )
fc . Result = res
return ec . marshalNUser2ᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐUser ( ctx , field . Selections , res )
}
func ( ec * executionContext ) fieldContext_RelationRoleUser_user ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "RelationRoleUser" ,
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_User_id ( ctx , field )
case "userName" :
return ec . fieldContext_User_userName ( ctx , field )
case "fullName" :
return ec . fieldContext_User_fullName ( ctx , field )
case "todos" :
return ec . fieldContext_User_todos ( ctx , field )
case "roles" :
return ec . fieldContext_User_roles ( ctx , field )
}
return nil , fmt . Errorf ( "no field named %q was found under type User" , field . Name )
} ,
}
return fc , nil
}
func ( ec * executionContext ) _RelationRoleUser_userIsRoleManager ( ctx context . Context , field graphql . CollectedField , obj * model . RelationRoleUser ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_RelationRoleUser_userIsRoleManager ( 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 . UserIsRoleManager , 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 . ( bool )
fc . Result = res
return ec . marshalNBoolean2bool ( ctx , field . Selections , res )
}
func ( ec * executionContext ) fieldContext_RelationRoleUser_userIsRoleManager ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "RelationRoleUser" ,
Field : field ,
IsMethod : false ,
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
return nil , errors . New ( "field of type Boolean does not have child fields" )
} ,
}
return fc , nil
}
func ( ec * executionContext ) _RelationUserRole_role ( ctx context . Context , field graphql . CollectedField , obj * model . RelationUserRole ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_RelationUserRole_role ( 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 . Role , 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 . Role )
fc . Result = res
return ec . marshalNRole2ᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐRole ( ctx , field . Selections , res )
}
func ( ec * executionContext ) fieldContext_RelationUserRole_role ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "RelationUserRole" ,
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_Role_id ( ctx , field )
case "roleName" :
return ec . fieldContext_Role_roleName ( ctx , field )
case "isAdmin" :
return ec . fieldContext_Role_isAdmin ( ctx , field )
case "isUserCreator" :
return ec . fieldContext_Role_isUserCreator ( ctx , field )
case "roleMembers" :
return ec . fieldContext_Role_roleMembers ( ctx , field )
}
return nil , fmt . Errorf ( "no field named %q was found under type Role" , field . Name )
} ,
}
return fc , nil
}
func ( ec * executionContext ) _RelationUserRole_userIsRoleManager ( ctx context . Context , field graphql . CollectedField , obj * model . RelationUserRole ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_RelationUserRole_userIsRoleManager ( 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 . UserIsRoleManager , 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 . ( bool )
fc . Result = res
return ec . marshalNBoolean2bool ( ctx , field . Selections , res )
}
func ( ec * executionContext ) fieldContext_RelationUserRole_userIsRoleManager ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "RelationUserRole" ,
Field : field ,
IsMethod : false ,
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
return nil , errors . New ( "field of type Boolean does not have child fields" )
} ,
}
return fc , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _Role_id ( ctx context . Context , field graphql . CollectedField , obj * model . Role ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Role_id ( ctx , field )
2023-08-19 23:47:36 +02:00
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
2023-11-05 17:42:14 +01:00
return obj . ID , nil
2023-08-19 23:47:36 +02:00
} )
if err != nil {
ec . Error ( ctx , err )
return graphql . Null
}
if resTmp == nil {
2023-11-05 17:42:14 +01:00
if ! graphql . HasFieldError ( ctx , fc ) {
ec . Errorf ( ctx , "must not be null" )
}
2023-08-19 23:47:36 +02:00
return graphql . Null
}
2023-11-05 17:42:14 +01:00
res := resTmp . ( string )
2023-08-19 23:47:36 +02:00
fc . Result = res
2023-11-05 17:42:14 +01:00
return ec . marshalNID2string ( ctx , field . Selections , res )
2023-08-19 23:47:36 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_Role_id ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-08-19 23:47:36 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "Role" ,
2023-08-19 23:47:36 +02:00
Field : field ,
2023-11-05 17:42:14 +01:00
IsMethod : false ,
2023-08-19 23:47:36 +02:00
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
2023-11-05 17:42:14 +01:00
return nil , errors . New ( "field of type ID does not have child fields" )
2023-08-19 23:47:36 +02:00
} ,
}
return fc , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _Role_roleName ( ctx context . Context , field graphql . CollectedField , obj * model . Role ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Role_roleName ( ctx , field )
2023-08-19 23:47:36 +02:00
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
2023-11-05 17:42:14 +01:00
return obj . RoleName , nil
2023-08-19 23:47:36 +02:00
} )
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
}
2023-11-05 17:42:14 +01:00
res := resTmp . ( string )
2023-08-19 23:47:36 +02:00
fc . Result = res
2023-11-05 17:42:14 +01:00
return ec . marshalNString2string ( ctx , field . Selections , res )
2023-08-19 23:47:36 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_Role_roleName ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-08-19 23:47:36 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "Role" ,
2023-08-19 23:47:36 +02:00
Field : field ,
IsMethod : false ,
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
2023-11-18 15:51:10 +01:00
return nil , errors . New ( "field of type String does not have child fields" )
} ,
}
return fc , nil
}
func ( ec * executionContext ) _Role_isAdmin ( ctx context . Context , field graphql . CollectedField , obj * model . Role ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Role_isAdmin ( 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 . IsAdmin , 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 . ( bool )
fc . Result = res
return ec . marshalNBoolean2bool ( ctx , field . Selections , res )
}
func ( ec * executionContext ) fieldContext_Role_isAdmin ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "Role" ,
Field : field ,
IsMethod : false ,
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
return nil , errors . New ( "field of type Boolean does not have child fields" )
2023-08-19 23:47:36 +02:00
} ,
}
return fc , nil
}
2023-11-18 15:51:10 +01:00
func ( ec * executionContext ) _Role_isUserCreator ( ctx context . Context , field graphql . CollectedField , obj * model . Role ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Role_isUserCreator ( ctx , field )
2023-08-19 23:47:36 +02:00
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
2023-11-18 15:51:10 +01:00
return obj . IsUserCreator , nil
2023-08-19 23:47:36 +02:00
} )
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
}
2023-11-05 17:42:14 +01:00
res := resTmp . ( bool )
2023-08-19 23:47:36 +02:00
fc . Result = res
2023-11-05 17:42:14 +01:00
return ec . marshalNBoolean2bool ( ctx , field . Selections , res )
2023-08-19 23:47:36 +02:00
}
2023-11-18 15:51:10 +01:00
func ( ec * executionContext ) fieldContext_Role_isUserCreator ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-08-19 23:47:36 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "Role" ,
2023-08-19 23:47:36 +02:00
Field : field ,
IsMethod : false ,
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
2023-11-05 17:42:14 +01:00
return nil , errors . New ( "field of type Boolean does not have child fields" )
2023-08-19 23:47:36 +02:00
} ,
}
return fc , nil
}
2023-11-18 15:51:10 +01:00
func ( ec * executionContext ) _Role_roleMembers ( ctx context . Context , field graphql . CollectedField , obj * model . Role ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Role_roleMembers ( ctx , field )
2023-08-19 23:47:36 +02:00
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
2023-11-18 15:51:10 +01:00
return ec . resolvers . Role ( ) . RoleMembers ( rctx , obj )
2023-08-19 23:47:36 +02:00
} )
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
}
2023-11-18 15:51:10 +01:00
res := resTmp . ( [ ] * model . RelationRoleUser )
2023-08-19 23:47:36 +02:00
fc . Result = res
2023-11-18 15:51:10 +01:00
return ec . marshalNRelationRoleUser2ᚕᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐRelationRoleUserᚄ ( ctx , field . Selections , res )
2023-08-19 23:47:36 +02:00
}
2023-11-18 15:51:10 +01:00
func ( ec * executionContext ) fieldContext_Role_roleMembers ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-08-19 23:47:36 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "Role" ,
2023-08-19 23:47:36 +02:00
Field : field ,
2023-11-18 15:51:10 +01:00
IsMethod : true ,
IsResolver : true ,
2023-08-19 23:47:36 +02:00
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
2023-11-18 15:51:10 +01:00
switch field . Name {
case "user" :
return ec . fieldContext_RelationRoleUser_user ( ctx , field )
case "userIsRoleManager" :
return ec . fieldContext_RelationRoleUser_userIsRoleManager ( ctx , field )
}
return nil , fmt . Errorf ( "no field named %q was found under type RelationRoleUser" , field . Name )
2023-08-19 23:47:36 +02:00
} ,
}
return fc , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _Todo_id ( ctx context . Context , field graphql . CollectedField , obj * model . Todo ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Todo_id ( ctx , field )
2023-08-19 23:47:36 +02:00
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
2023-11-05 17:42:14 +01:00
return obj . ID , nil
2023-08-19 23:47:36 +02:00
} )
if err != nil {
ec . Error ( ctx , err )
return graphql . Null
}
if resTmp == nil {
2023-11-05 17:42:14 +01:00
if ! graphql . HasFieldError ( ctx , fc ) {
ec . Errorf ( ctx , "must not be null" )
}
2023-08-19 23:47:36 +02:00
return graphql . Null
}
2023-11-05 17:42:14 +01:00
res := resTmp . ( string )
2023-08-19 23:47:36 +02:00
fc . Result = res
2023-11-05 17:42:14 +01:00
return ec . marshalNID2string ( ctx , field . Selections , res )
2023-08-19 23:47:36 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_Todo_id ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-08-19 23:47:36 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "Todo" ,
2023-08-19 23:47:36 +02:00
Field : field ,
2023-11-05 17:42:14 +01:00
IsMethod : false ,
2023-08-19 23:47:36 +02:00
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
2023-11-05 17:42:14 +01:00
return nil , errors . New ( "field of type ID does not have child fields" )
2023-08-19 23:47:36 +02:00
} ,
}
return fc , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _Todo_text ( ctx context . Context , field graphql . CollectedField , obj * model . Todo ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Todo_text ( ctx , field )
2023-08-19 23:47:36 +02:00
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
2023-11-05 17:42:14 +01:00
return obj . Text , nil
2023-08-19 23:47:36 +02:00
} )
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 )
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_Todo_text ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-08-19 23:47:36 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "Todo" ,
2023-08-19 23:47:36 +02:00
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
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _Todo_done ( ctx context . Context , field graphql . CollectedField , obj * model . Todo ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Todo_done ( ctx , field )
2023-08-19 23:47:36 +02:00
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
2023-11-05 17:42:14 +01:00
return obj . Done , nil
2023-08-19 23:47:36 +02:00
} )
if err != nil {
ec . Error ( ctx , err )
return graphql . Null
}
if resTmp == nil {
2023-11-05 17:42:14 +01:00
if ! graphql . HasFieldError ( ctx , fc ) {
ec . Errorf ( ctx , "must not be null" )
}
2023-08-19 23:47:36 +02:00
return graphql . Null
}
2023-11-05 17:42:14 +01:00
res := resTmp . ( bool )
2023-08-19 23:47:36 +02:00
fc . Result = res
2023-11-05 17:42:14 +01:00
return ec . marshalNBoolean2bool ( ctx , field . Selections , res )
2023-08-19 23:47:36 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_Todo_done ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-08-19 23:47:36 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "Todo" ,
2023-08-19 23:47:36 +02:00
Field : field ,
2023-11-05 17:42:14 +01:00
IsMethod : false ,
2023-08-19 23:47:36 +02:00
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
2023-11-05 17:42:14 +01:00
return nil , errors . New ( "field of type Boolean does not have child fields" )
2023-08-19 23:47:36 +02:00
} ,
}
return fc , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _Todo_user ( ctx context . Context , field graphql . CollectedField , obj * model . Todo ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_Todo_user ( ctx , field )
2023-08-19 23:47:36 +02:00
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
2023-11-05 17:42:14 +01:00
return ec . resolvers . Todo ( ) . User ( rctx , obj )
2023-08-19 23:47:36 +02:00
} )
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
}
2023-11-05 17:42:14 +01:00
res := resTmp . ( * model . User )
2023-08-19 23:47:36 +02:00
fc . Result = res
2023-11-05 17:42:14 +01:00
return ec . marshalNUser2ᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐUser ( ctx , field . Selections , res )
2023-08-19 23:47:36 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_Todo_user ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-08-19 23:47:36 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "Todo" ,
2023-08-19 23:47:36 +02:00
Field : field ,
2023-11-05 17:42:14 +01:00
IsMethod : true ,
IsResolver : true ,
2023-08-19 23:47:36 +02:00
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
switch field . Name {
2023-11-05 17:42:14 +01:00
case "id" :
return ec . fieldContext_User_id ( ctx , field )
case "userName" :
return ec . fieldContext_User_userName ( ctx , field )
case "fullName" :
return ec . fieldContext_User_fullName ( ctx , field )
case "todos" :
return ec . fieldContext_User_todos ( ctx , field )
case "roles" :
return ec . fieldContext_User_roles ( ctx , field )
2023-08-19 23:47:36 +02:00
}
2023-11-05 17:42:14 +01:00
return nil , fmt . Errorf ( "no field named %q was found under type User" , field . Name )
2023-08-19 23:47:36 +02:00
} ,
}
return fc , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _User_id ( ctx context . Context , field graphql . CollectedField , obj * model . User ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_User_id ( ctx , field )
2023-08-19 23:47:36 +02:00
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
2023-11-05 17:42:14 +01:00
return obj . ID , nil
2023-08-19 23:47:36 +02:00
} )
if err != nil {
ec . Error ( ctx , err )
return graphql . Null
}
if resTmp == nil {
2023-11-05 17:42:14 +01:00
if ! graphql . HasFieldError ( ctx , fc ) {
ec . Errorf ( ctx , "must not be null" )
}
2023-08-19 23:47:36 +02:00
return graphql . Null
}
2023-11-05 17:42:14 +01:00
res := resTmp . ( string )
2023-08-19 23:47:36 +02:00
fc . Result = res
2023-11-05 17:42:14 +01:00
return ec . marshalNID2string ( ctx , field . Selections , res )
2023-08-19 23:47:36 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_User_id ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-08-19 23:47:36 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "User" ,
2023-08-19 23:47:36 +02:00
Field : field ,
IsMethod : false ,
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
2023-11-05 17:42:14 +01:00
return nil , errors . New ( "field of type ID does not have child fields" )
2023-08-19 23:47:36 +02:00
} ,
}
return fc , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _User_userName ( ctx context . Context , field graphql . CollectedField , obj * model . User ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_User_userName ( ctx , field )
2023-08-19 23:47:36 +02:00
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
2023-11-05 17:42:14 +01:00
return obj . UserName , nil
2023-08-19 23:47:36 +02:00
} )
if err != nil {
ec . Error ( ctx , err )
return graphql . Null
}
if resTmp == nil {
2023-11-05 17:42:14 +01:00
if ! graphql . HasFieldError ( ctx , fc ) {
ec . Errorf ( ctx , "must not be null" )
}
2023-08-19 23:47:36 +02:00
return graphql . Null
}
2023-11-05 17:42:14 +01:00
res := resTmp . ( string )
2023-08-19 23:47:36 +02:00
fc . Result = res
2023-11-05 17:42:14 +01:00
return ec . marshalNString2string ( ctx , field . Selections , res )
2023-08-19 23:47:36 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_User_userName ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-08-19 23:47:36 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "User" ,
2023-08-19 23:47:36 +02:00
Field : field ,
2023-11-05 17:42:14 +01:00
IsMethod : false ,
2023-08-19 23:47:36 +02:00
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
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _User_fullName ( ctx context . Context , field graphql . CollectedField , obj * model . User ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_User_fullName ( ctx , field )
2023-08-19 23:47:36 +02:00
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
2023-11-05 17:42:14 +01:00
return obj . FullName , nil
2023-08-19 23:47:36 +02:00
} )
if err != nil {
ec . Error ( ctx , err )
return graphql . Null
}
if resTmp == nil {
return graphql . Null
}
2023-11-05 17:42:14 +01:00
res := resTmp . ( * string )
2023-08-19 23:47:36 +02:00
fc . Result = res
2023-11-05 17:42:14 +01:00
return ec . marshalOString2ᚖstring ( ctx , field . Selections , res )
2023-08-19 23:47:36 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) fieldContext_User_fullName ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
2023-08-19 23:47:36 +02:00
fc = & graphql . FieldContext {
2023-11-05 17:42:14 +01:00
Object : "User" ,
2023-08-19 23:47:36 +02:00
Field : field ,
2023-11-05 17:42:14 +01:00
IsMethod : false ,
2023-08-19 23:47:36 +02:00
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
2023-11-05 17:42:14 +01:00
return nil , errors . New ( "field of type String does not have child fields" )
2023-08-19 23:47:36 +02:00
} ,
}
return fc , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _User_todos ( ctx context . Context , field graphql . CollectedField , obj * model . User ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_User_todos ( ctx , field )
2023-08-19 23:47:36 +02:00
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
2023-11-05 17:42:14 +01:00
return ec . resolvers . User ( ) . Todos ( 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 . Todo )
fc . Result = res
return ec . marshalNTodo2ᚕᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐTodoᚄ ( ctx , field . Selections , res )
}
func ( ec * executionContext ) fieldContext_User_todos ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "User" ,
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_Todo_id ( ctx , field )
case "text" :
return ec . fieldContext_Todo_text ( ctx , field )
case "done" :
return ec . fieldContext_Todo_done ( ctx , field )
case "user" :
return ec . fieldContext_Todo_user ( ctx , field )
}
return nil , fmt . Errorf ( "no field named %q was found under type Todo" , field . Name )
} ,
}
return fc , nil
}
func ( ec * executionContext ) _User_roles ( ctx context . Context , field graphql . CollectedField , obj * model . User ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext_User_roles ( 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 . User ( ) . Roles ( 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
}
2023-11-18 15:51:10 +01:00
res := resTmp . ( [ ] * model . RelationUserRole )
2023-11-05 17:42:14 +01:00
fc . Result = res
2023-11-18 15:51:10 +01:00
return ec . marshalNRelationUserRole2ᚕᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐRelationUserRoleᚄ ( ctx , field . Selections , res )
2023-11-05 17:42:14 +01:00
}
func ( ec * executionContext ) fieldContext_User_roles ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "User" ,
Field : field ,
IsMethod : true ,
IsResolver : true ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
switch field . Name {
2023-11-18 15:51:10 +01:00
case "role" :
return ec . fieldContext_RelationUserRole_role ( ctx , field )
case "userIsRoleManager" :
return ec . fieldContext_RelationUserRole_userIsRoleManager ( ctx , field )
2023-11-05 17:42:14 +01:00
}
2023-11-18 15:51:10 +01:00
return nil , fmt . Errorf ( "no field named %q was found under type RelationUserRole" , field . Name )
2023-11-05 17:42:14 +01:00
} ,
}
return fc , nil
}
func ( ec * executionContext ) ___Directive_name ( ctx context . Context , field graphql . CollectedField , obj * introspection . Directive ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___Directive_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___Directive_name ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__Directive" ,
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 ) ___Directive_description ( ctx context . Context , field graphql . CollectedField , obj * introspection . Directive ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___Directive_description ( 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 . Description ( ) , 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 ) fieldContext___Directive_description ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__Directive" ,
Field : field ,
IsMethod : 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 fc , nil
}
func ( ec * executionContext ) ___Directive_locations ( ctx context . Context , field graphql . CollectedField , obj * introspection . Directive ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___Directive_locations ( 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 . Locations , 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 . marshalN__DirectiveLocation2ᚕstringᚄ ( ctx , field . Selections , res )
}
func ( ec * executionContext ) fieldContext___Directive_locations ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__Directive" ,
Field : field ,
IsMethod : false ,
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
return nil , errors . New ( "field of type __DirectiveLocation does not have child fields" )
} ,
}
return fc , nil
}
func ( ec * executionContext ) ___Directive_args ( ctx context . Context , field graphql . CollectedField , obj * introspection . Directive ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___Directive_args ( 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 . Args , 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 . ( [ ] introspection . InputValue )
fc . Result = res
return ec . marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ ( ctx , field . Selections , res )
}
func ( ec * executionContext ) fieldContext___Directive_args ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__Directive" ,
Field : field ,
IsMethod : false ,
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
switch field . Name {
case "name" :
return ec . fieldContext___InputValue_name ( ctx , field )
case "description" :
return ec . fieldContext___InputValue_description ( ctx , field )
case "type" :
return ec . fieldContext___InputValue_type ( ctx , field )
case "defaultValue" :
return ec . fieldContext___InputValue_defaultValue ( ctx , field )
}
return nil , fmt . Errorf ( "no field named %q was found under type __InputValue" , field . Name )
} ,
}
return fc , nil
}
func ( ec * executionContext ) ___Directive_isRepeatable ( ctx context . Context , field graphql . CollectedField , obj * introspection . Directive ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___Directive_isRepeatable ( 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 . IsRepeatable , 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 . ( bool )
fc . Result = res
return ec . marshalNBoolean2bool ( ctx , field . Selections , res )
}
func ( ec * executionContext ) fieldContext___Directive_isRepeatable ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__Directive" ,
Field : field ,
IsMethod : false ,
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
return nil , errors . New ( "field of type Boolean does not have child fields" )
} ,
}
return fc , nil
}
func ( ec * executionContext ) ___EnumValue_name ( ctx context . Context , field graphql . CollectedField , obj * introspection . EnumValue ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___EnumValue_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___EnumValue_name ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__EnumValue" ,
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 ) ___EnumValue_description ( ctx context . Context , field graphql . CollectedField , obj * introspection . EnumValue ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___EnumValue_description ( 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 . Description ( ) , 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 ) fieldContext___EnumValue_description ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__EnumValue" ,
Field : field ,
IsMethod : 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 fc , nil
}
func ( ec * executionContext ) ___EnumValue_isDeprecated ( ctx context . Context , field graphql . CollectedField , obj * introspection . EnumValue ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___EnumValue_isDeprecated ( 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 . IsDeprecated ( ) , 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 . ( bool )
fc . Result = res
return ec . marshalNBoolean2bool ( ctx , field . Selections , res )
}
func ( ec * executionContext ) fieldContext___EnumValue_isDeprecated ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__EnumValue" ,
Field : field ,
IsMethod : true ,
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
return nil , errors . New ( "field of type Boolean does not have child fields" )
} ,
}
return fc , nil
}
func ( ec * executionContext ) ___EnumValue_deprecationReason ( ctx context . Context , field graphql . CollectedField , obj * introspection . EnumValue ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___EnumValue_deprecationReason ( 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 . DeprecationReason ( ) , 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 ) fieldContext___EnumValue_deprecationReason ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__EnumValue" ,
Field : field ,
IsMethod : 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 fc , nil
}
func ( ec * executionContext ) ___Field_name ( ctx context . Context , field graphql . CollectedField , obj * introspection . Field ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___Field_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___Field_name ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__Field" ,
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 ) ___Field_description ( ctx context . Context , field graphql . CollectedField , obj * introspection . Field ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___Field_description ( 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 . Description ( ) , 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 ) fieldContext___Field_description ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__Field" ,
Field : field ,
IsMethod : 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 fc , nil
}
func ( ec * executionContext ) ___Field_args ( ctx context . Context , field graphql . CollectedField , obj * introspection . Field ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___Field_args ( 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 . Args , 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 . ( [ ] introspection . InputValue )
fc . Result = res
return ec . marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ ( ctx , field . Selections , res )
}
func ( ec * executionContext ) fieldContext___Field_args ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__Field" ,
Field : field ,
IsMethod : false ,
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
switch field . Name {
case "name" :
return ec . fieldContext___InputValue_name ( ctx , field )
case "description" :
return ec . fieldContext___InputValue_description ( ctx , field )
case "type" :
return ec . fieldContext___InputValue_type ( ctx , field )
case "defaultValue" :
return ec . fieldContext___InputValue_defaultValue ( ctx , field )
}
return nil , fmt . Errorf ( "no field named %q was found under type __InputValue" , field . Name )
} ,
}
return fc , nil
}
func ( ec * executionContext ) ___Field_type ( ctx context . Context , field graphql . CollectedField , obj * introspection . Field ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___Field_type ( 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 . Type , 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 . ( * introspection . Type )
fc . Result = res
return ec . marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType ( ctx , field . Selections , res )
}
func ( ec * executionContext ) fieldContext___Field_type ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__Field" ,
Field : field ,
IsMethod : false ,
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
switch field . Name {
case "kind" :
return ec . fieldContext___Type_kind ( ctx , field )
case "name" :
return ec . fieldContext___Type_name ( ctx , field )
case "description" :
return ec . fieldContext___Type_description ( ctx , field )
case "fields" :
return ec . fieldContext___Type_fields ( ctx , field )
case "interfaces" :
return ec . fieldContext___Type_interfaces ( ctx , field )
case "possibleTypes" :
return ec . fieldContext___Type_possibleTypes ( ctx , field )
case "enumValues" :
return ec . fieldContext___Type_enumValues ( ctx , field )
case "inputFields" :
return ec . fieldContext___Type_inputFields ( ctx , field )
case "ofType" :
return ec . fieldContext___Type_ofType ( ctx , field )
case "specifiedByURL" :
return ec . fieldContext___Type_specifiedByURL ( ctx , field )
}
return nil , fmt . Errorf ( "no field named %q was found under type __Type" , field . Name )
} ,
}
return fc , nil
}
func ( ec * executionContext ) ___Field_isDeprecated ( ctx context . Context , field graphql . CollectedField , obj * introspection . Field ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___Field_isDeprecated ( 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 . IsDeprecated ( ) , 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 . ( bool )
fc . Result = res
return ec . marshalNBoolean2bool ( ctx , field . Selections , res )
}
func ( ec * executionContext ) fieldContext___Field_isDeprecated ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__Field" ,
Field : field ,
IsMethod : true ,
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
return nil , errors . New ( "field of type Boolean does not have child fields" )
} ,
}
return fc , nil
}
func ( ec * executionContext ) ___Field_deprecationReason ( ctx context . Context , field graphql . CollectedField , obj * introspection . Field ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___Field_deprecationReason ( 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 . DeprecationReason ( ) , 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 ) fieldContext___Field_deprecationReason ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__Field" ,
Field : field ,
IsMethod : 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 fc , nil
}
func ( ec * executionContext ) ___InputValue_name ( ctx context . Context , field graphql . CollectedField , obj * introspection . InputValue ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___InputValue_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___InputValue_name ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__InputValue" ,
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 ) ___InputValue_description ( ctx context . Context , field graphql . CollectedField , obj * introspection . InputValue ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___InputValue_description ( 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 . Description ( ) , 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 ) fieldContext___InputValue_description ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__InputValue" ,
Field : field ,
IsMethod : 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 fc , nil
}
func ( ec * executionContext ) ___InputValue_type ( ctx context . Context , field graphql . CollectedField , obj * introspection . InputValue ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___InputValue_type ( 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 . Type , 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 . ( * introspection . Type )
fc . Result = res
return ec . marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType ( ctx , field . Selections , res )
}
func ( ec * executionContext ) fieldContext___InputValue_type ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__InputValue" ,
Field : field ,
IsMethod : false ,
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
switch field . Name {
case "kind" :
return ec . fieldContext___Type_kind ( ctx , field )
case "name" :
return ec . fieldContext___Type_name ( ctx , field )
case "description" :
return ec . fieldContext___Type_description ( ctx , field )
case "fields" :
return ec . fieldContext___Type_fields ( ctx , field )
case "interfaces" :
return ec . fieldContext___Type_interfaces ( ctx , field )
case "possibleTypes" :
return ec . fieldContext___Type_possibleTypes ( ctx , field )
case "enumValues" :
return ec . fieldContext___Type_enumValues ( ctx , field )
case "inputFields" :
return ec . fieldContext___Type_inputFields ( ctx , field )
case "ofType" :
return ec . fieldContext___Type_ofType ( ctx , field )
case "specifiedByURL" :
return ec . fieldContext___Type_specifiedByURL ( ctx , field )
}
return nil , fmt . Errorf ( "no field named %q was found under type __Type" , field . Name )
} ,
}
return fc , nil
}
func ( ec * executionContext ) ___InputValue_defaultValue ( ctx context . Context , field graphql . CollectedField , obj * introspection . InputValue ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___InputValue_defaultValue ( 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 . DefaultValue , 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 ) fieldContext___InputValue_defaultValue ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__InputValue" ,
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 ) ___Schema_description ( ctx context . Context , field graphql . CollectedField , obj * introspection . Schema ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___Schema_description ( 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 . Description ( ) , 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 ) fieldContext___Schema_description ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__Schema" ,
Field : field ,
IsMethod : 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 fc , nil
}
func ( ec * executionContext ) ___Schema_types ( ctx context . Context , field graphql . CollectedField , obj * introspection . Schema ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___Schema_types ( 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 . Types ( ) , 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 . ( [ ] introspection . Type )
fc . Result = res
return ec . marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ ( ctx , field . Selections , res )
}
func ( ec * executionContext ) fieldContext___Schema_types ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__Schema" ,
Field : field ,
IsMethod : true ,
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
switch field . Name {
case "kind" :
return ec . fieldContext___Type_kind ( ctx , field )
case "name" :
return ec . fieldContext___Type_name ( ctx , field )
case "description" :
return ec . fieldContext___Type_description ( ctx , field )
case "fields" :
return ec . fieldContext___Type_fields ( ctx , field )
case "interfaces" :
return ec . fieldContext___Type_interfaces ( ctx , field )
case "possibleTypes" :
return ec . fieldContext___Type_possibleTypes ( ctx , field )
case "enumValues" :
return ec . fieldContext___Type_enumValues ( ctx , field )
case "inputFields" :
return ec . fieldContext___Type_inputFields ( ctx , field )
case "ofType" :
return ec . fieldContext___Type_ofType ( ctx , field )
case "specifiedByURL" :
return ec . fieldContext___Type_specifiedByURL ( ctx , field )
}
return nil , fmt . Errorf ( "no field named %q was found under type __Type" , field . Name )
} ,
}
return fc , nil
}
func ( ec * executionContext ) ___Schema_queryType ( ctx context . Context , field graphql . CollectedField , obj * introspection . Schema ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___Schema_queryType ( 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 . QueryType ( ) , nil
2023-08-19 23:47:36 +02:00
} )
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 . ( * introspection . Type )
fc . Result = res
return ec . marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType ( ctx , field . Selections , res )
}
func ( ec * executionContext ) fieldContext___Schema_queryType ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__Schema" ,
Field : field ,
IsMethod : true ,
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
switch field . Name {
case "kind" :
return ec . fieldContext___Type_kind ( ctx , field )
case "name" :
return ec . fieldContext___Type_name ( ctx , field )
case "description" :
return ec . fieldContext___Type_description ( ctx , field )
case "fields" :
return ec . fieldContext___Type_fields ( ctx , field )
case "interfaces" :
return ec . fieldContext___Type_interfaces ( ctx , field )
case "possibleTypes" :
return ec . fieldContext___Type_possibleTypes ( ctx , field )
case "enumValues" :
return ec . fieldContext___Type_enumValues ( ctx , field )
case "inputFields" :
return ec . fieldContext___Type_inputFields ( ctx , field )
case "ofType" :
return ec . fieldContext___Type_ofType ( ctx , field )
case "specifiedByURL" :
return ec . fieldContext___Type_specifiedByURL ( ctx , field )
}
return nil , fmt . Errorf ( "no field named %q was found under type __Type" , field . Name )
} ,
}
return fc , nil
}
func ( ec * executionContext ) ___Schema_mutationType ( ctx context . Context , field graphql . CollectedField , obj * introspection . Schema ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___Schema_mutationType ( 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 . MutationType ( ) , nil
} )
if err != nil {
ec . Error ( ctx , err )
return graphql . Null
}
if resTmp == nil {
return graphql . Null
}
res := resTmp . ( * introspection . Type )
fc . Result = res
return ec . marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType ( ctx , field . Selections , res )
}
func ( ec * executionContext ) fieldContext___Schema_mutationType ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__Schema" ,
Field : field ,
IsMethod : true ,
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
switch field . Name {
case "kind" :
return ec . fieldContext___Type_kind ( ctx , field )
case "name" :
return ec . fieldContext___Type_name ( ctx , field )
case "description" :
return ec . fieldContext___Type_description ( ctx , field )
case "fields" :
return ec . fieldContext___Type_fields ( ctx , field )
case "interfaces" :
return ec . fieldContext___Type_interfaces ( ctx , field )
case "possibleTypes" :
return ec . fieldContext___Type_possibleTypes ( ctx , field )
case "enumValues" :
return ec . fieldContext___Type_enumValues ( ctx , field )
case "inputFields" :
return ec . fieldContext___Type_inputFields ( ctx , field )
case "ofType" :
return ec . fieldContext___Type_ofType ( ctx , field )
case "specifiedByURL" :
return ec . fieldContext___Type_specifiedByURL ( ctx , field )
}
return nil , fmt . Errorf ( "no field named %q was found under type __Type" , field . Name )
} ,
}
return fc , nil
}
func ( ec * executionContext ) ___Schema_subscriptionType ( ctx context . Context , field graphql . CollectedField , obj * introspection . Schema ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___Schema_subscriptionType ( 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 . SubscriptionType ( ) , nil
} )
if err != nil {
ec . Error ( ctx , err )
return graphql . Null
}
if resTmp == nil {
return graphql . Null
}
res := resTmp . ( * introspection . Type )
fc . Result = res
return ec . marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType ( ctx , field . Selections , res )
}
func ( ec * executionContext ) fieldContext___Schema_subscriptionType ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__Schema" ,
Field : field ,
IsMethod : true ,
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
switch field . Name {
case "kind" :
return ec . fieldContext___Type_kind ( ctx , field )
case "name" :
return ec . fieldContext___Type_name ( ctx , field )
case "description" :
return ec . fieldContext___Type_description ( ctx , field )
case "fields" :
return ec . fieldContext___Type_fields ( ctx , field )
case "interfaces" :
return ec . fieldContext___Type_interfaces ( ctx , field )
case "possibleTypes" :
return ec . fieldContext___Type_possibleTypes ( ctx , field )
case "enumValues" :
return ec . fieldContext___Type_enumValues ( ctx , field )
case "inputFields" :
return ec . fieldContext___Type_inputFields ( ctx , field )
case "ofType" :
return ec . fieldContext___Type_ofType ( ctx , field )
case "specifiedByURL" :
return ec . fieldContext___Type_specifiedByURL ( ctx , field )
}
return nil , fmt . Errorf ( "no field named %q was found under type __Type" , field . Name )
} ,
}
return fc , nil
}
func ( ec * executionContext ) ___Schema_directives ( ctx context . Context , field graphql . CollectedField , obj * introspection . Schema ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___Schema_directives ( 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 . Directives ( ) , 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 . ( [ ] introspection . Directive )
fc . Result = res
return ec . marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ ( ctx , field . Selections , res )
}
func ( ec * executionContext ) fieldContext___Schema_directives ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__Schema" ,
Field : field ,
IsMethod : true ,
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
switch field . Name {
case "name" :
return ec . fieldContext___Directive_name ( ctx , field )
case "description" :
return ec . fieldContext___Directive_description ( ctx , field )
case "locations" :
return ec . fieldContext___Directive_locations ( ctx , field )
case "args" :
return ec . fieldContext___Directive_args ( ctx , field )
case "isRepeatable" :
return ec . fieldContext___Directive_isRepeatable ( ctx , field )
}
return nil , fmt . Errorf ( "no field named %q was found under type __Directive" , field . Name )
} ,
}
return fc , nil
}
func ( ec * executionContext ) ___Type_kind ( ctx context . Context , field graphql . CollectedField , obj * introspection . Type ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___Type_kind ( 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 . Kind ( ) , 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 . marshalN__TypeKind2string ( ctx , field . Selections , res )
}
func ( ec * executionContext ) fieldContext___Type_kind ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__Type" ,
Field : field ,
IsMethod : true ,
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
return nil , errors . New ( "field of type __TypeKind does not have child fields" )
} ,
}
return fc , nil
}
func ( ec * executionContext ) ___Type_name ( ctx context . Context , field graphql . CollectedField , obj * introspection . Type ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___Type_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 {
return graphql . Null
}
res := resTmp . ( * string )
fc . Result = res
return ec . marshalOString2ᚖstring ( ctx , field . Selections , res )
}
func ( ec * executionContext ) fieldContext___Type_name ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__Type" ,
Field : field ,
IsMethod : 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 fc , nil
}
func ( ec * executionContext ) ___Type_description ( ctx context . Context , field graphql . CollectedField , obj * introspection . Type ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___Type_description ( 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 . Description ( ) , 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 ) fieldContext___Type_description ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__Type" ,
Field : field ,
IsMethod : 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 fc , nil
}
func ( ec * executionContext ) ___Type_fields ( ctx context . Context , field graphql . CollectedField , obj * introspection . Type ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___Type_fields ( 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 . Fields ( fc . Args [ "includeDeprecated" ] . ( bool ) ) , nil
} )
if err != nil {
ec . Error ( ctx , err )
return graphql . Null
}
if resTmp == nil {
return graphql . Null
}
res := resTmp . ( [ ] introspection . Field )
fc . Result = res
return ec . marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ ( ctx , field . Selections , res )
}
func ( ec * executionContext ) fieldContext___Type_fields ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__Type" ,
Field : field ,
IsMethod : true ,
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
switch field . Name {
case "name" :
return ec . fieldContext___Field_name ( ctx , field )
case "description" :
return ec . fieldContext___Field_description ( ctx , field )
case "args" :
return ec . fieldContext___Field_args ( ctx , field )
case "type" :
return ec . fieldContext___Field_type ( ctx , field )
case "isDeprecated" :
return ec . fieldContext___Field_isDeprecated ( ctx , field )
case "deprecationReason" :
return ec . fieldContext___Field_deprecationReason ( ctx , field )
}
return nil , fmt . Errorf ( "no field named %q was found under type __Field" , 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___Type_fields_args ( ctx , field . ArgumentMap ( ec . Variables ) ) ; err != nil {
ec . Error ( ctx , err )
return fc , err
}
return fc , nil
}
func ( ec * executionContext ) ___Type_interfaces ( ctx context . Context , field graphql . CollectedField , obj * introspection . Type ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___Type_interfaces ( 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 . Interfaces ( ) , nil
} )
if err != nil {
ec . Error ( ctx , err )
return graphql . Null
}
if resTmp == nil {
return graphql . Null
}
res := resTmp . ( [ ] introspection . Type )
fc . Result = res
return ec . marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ ( ctx , field . Selections , res )
}
func ( ec * executionContext ) fieldContext___Type_interfaces ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__Type" ,
Field : field ,
IsMethod : true ,
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
switch field . Name {
case "kind" :
return ec . fieldContext___Type_kind ( ctx , field )
case "name" :
return ec . fieldContext___Type_name ( ctx , field )
case "description" :
return ec . fieldContext___Type_description ( ctx , field )
case "fields" :
return ec . fieldContext___Type_fields ( ctx , field )
case "interfaces" :
return ec . fieldContext___Type_interfaces ( ctx , field )
case "possibleTypes" :
return ec . fieldContext___Type_possibleTypes ( ctx , field )
case "enumValues" :
return ec . fieldContext___Type_enumValues ( ctx , field )
case "inputFields" :
return ec . fieldContext___Type_inputFields ( ctx , field )
case "ofType" :
return ec . fieldContext___Type_ofType ( ctx , field )
case "specifiedByURL" :
return ec . fieldContext___Type_specifiedByURL ( ctx , field )
}
return nil , fmt . Errorf ( "no field named %q was found under type __Type" , field . Name )
} ,
}
return fc , nil
}
func ( ec * executionContext ) ___Type_possibleTypes ( ctx context . Context , field graphql . CollectedField , obj * introspection . Type ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___Type_possibleTypes ( 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 . PossibleTypes ( ) , nil
} )
if err != nil {
ec . Error ( ctx , err )
return graphql . Null
}
if resTmp == nil {
return graphql . Null
}
res := resTmp . ( [ ] introspection . Type )
fc . Result = res
return ec . marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ ( ctx , field . Selections , res )
}
func ( ec * executionContext ) fieldContext___Type_possibleTypes ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__Type" ,
Field : field ,
IsMethod : true ,
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
switch field . Name {
case "kind" :
return ec . fieldContext___Type_kind ( ctx , field )
case "name" :
return ec . fieldContext___Type_name ( ctx , field )
case "description" :
return ec . fieldContext___Type_description ( ctx , field )
case "fields" :
return ec . fieldContext___Type_fields ( ctx , field )
case "interfaces" :
return ec . fieldContext___Type_interfaces ( ctx , field )
case "possibleTypes" :
return ec . fieldContext___Type_possibleTypes ( ctx , field )
case "enumValues" :
return ec . fieldContext___Type_enumValues ( ctx , field )
case "inputFields" :
return ec . fieldContext___Type_inputFields ( ctx , field )
case "ofType" :
return ec . fieldContext___Type_ofType ( ctx , field )
case "specifiedByURL" :
return ec . fieldContext___Type_specifiedByURL ( ctx , field )
}
return nil , fmt . Errorf ( "no field named %q was found under type __Type" , field . Name )
} ,
}
return fc , nil
}
func ( ec * executionContext ) ___Type_enumValues ( ctx context . Context , field graphql . CollectedField , obj * introspection . Type ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___Type_enumValues ( 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 . EnumValues ( fc . Args [ "includeDeprecated" ] . ( bool ) ) , nil
} )
if err != nil {
ec . Error ( ctx , err )
return graphql . Null
}
if resTmp == nil {
return graphql . Null
}
res := resTmp . ( [ ] introspection . EnumValue )
fc . Result = res
return ec . marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ ( ctx , field . Selections , res )
}
func ( ec * executionContext ) fieldContext___Type_enumValues ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__Type" ,
Field : field ,
IsMethod : true ,
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
switch field . Name {
case "name" :
return ec . fieldContext___EnumValue_name ( ctx , field )
case "description" :
return ec . fieldContext___EnumValue_description ( ctx , field )
case "isDeprecated" :
return ec . fieldContext___EnumValue_isDeprecated ( ctx , field )
case "deprecationReason" :
return ec . fieldContext___EnumValue_deprecationReason ( ctx , field )
}
return nil , fmt . Errorf ( "no field named %q was found under type __EnumValue" , 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___Type_enumValues_args ( ctx , field . ArgumentMap ( ec . Variables ) ) ; err != nil {
ec . Error ( ctx , err )
return fc , err
}
return fc , nil
}
func ( ec * executionContext ) ___Type_inputFields ( ctx context . Context , field graphql . CollectedField , obj * introspection . Type ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___Type_inputFields ( 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 . InputFields ( ) , nil
} )
if err != nil {
ec . Error ( ctx , err )
return graphql . Null
}
if resTmp == nil {
return graphql . Null
}
res := resTmp . ( [ ] introspection . InputValue )
fc . Result = res
return ec . marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ ( ctx , field . Selections , res )
}
func ( ec * executionContext ) fieldContext___Type_inputFields ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__Type" ,
Field : field ,
IsMethod : true ,
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
switch field . Name {
case "name" :
return ec . fieldContext___InputValue_name ( ctx , field )
case "description" :
return ec . fieldContext___InputValue_description ( ctx , field )
case "type" :
return ec . fieldContext___InputValue_type ( ctx , field )
case "defaultValue" :
return ec . fieldContext___InputValue_defaultValue ( ctx , field )
}
return nil , fmt . Errorf ( "no field named %q was found under type __InputValue" , field . Name )
} ,
}
return fc , nil
}
func ( ec * executionContext ) ___Type_ofType ( ctx context . Context , field graphql . CollectedField , obj * introspection . Type ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___Type_ofType ( 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 . OfType ( ) , nil
} )
if err != nil {
ec . Error ( ctx , err )
return graphql . Null
}
if resTmp == nil {
return graphql . Null
}
res := resTmp . ( * introspection . Type )
fc . Result = res
return ec . marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType ( ctx , field . Selections , res )
}
func ( ec * executionContext ) fieldContext___Type_ofType ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__Type" ,
Field : field ,
IsMethod : true ,
IsResolver : false ,
Child : func ( ctx context . Context , field graphql . CollectedField ) ( * graphql . FieldContext , error ) {
switch field . Name {
case "kind" :
return ec . fieldContext___Type_kind ( ctx , field )
case "name" :
return ec . fieldContext___Type_name ( ctx , field )
case "description" :
return ec . fieldContext___Type_description ( ctx , field )
case "fields" :
return ec . fieldContext___Type_fields ( ctx , field )
case "interfaces" :
return ec . fieldContext___Type_interfaces ( ctx , field )
case "possibleTypes" :
return ec . fieldContext___Type_possibleTypes ( ctx , field )
case "enumValues" :
return ec . fieldContext___Type_enumValues ( ctx , field )
case "inputFields" :
return ec . fieldContext___Type_inputFields ( ctx , field )
case "ofType" :
return ec . fieldContext___Type_ofType ( ctx , field )
case "specifiedByURL" :
return ec . fieldContext___Type_specifiedByURL ( ctx , field )
}
return nil , fmt . Errorf ( "no field named %q was found under type __Type" , field . Name )
} ,
}
return fc , nil
}
func ( ec * executionContext ) ___Type_specifiedByURL ( ctx context . Context , field graphql . CollectedField , obj * introspection . Type ) ( ret graphql . Marshaler ) {
fc , err := ec . fieldContext___Type_specifiedByURL ( 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 . SpecifiedByURL ( ) , 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 ) fieldContext___Type_specifiedByURL ( ctx context . Context , field graphql . CollectedField ) ( fc * graphql . FieldContext , err error ) {
fc = & graphql . FieldContext {
Object : "__Type" ,
Field : field ,
IsMethod : 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" )
} ,
}
2023-10-10 22:26:07 +02:00
return fc , nil
}
// endregion **************************** field.gotpl *****************************
// region **************************** input.gotpl *****************************
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) unmarshalInputNewRefreshToken ( ctx context . Context , obj interface { } ) ( model . NewRefreshToken , error ) {
var it model . NewRefreshToken
asMap := map [ string ] interface { } { }
for k , v := range obj . ( map [ string ] interface { } ) {
asMap [ k ] = v
}
fieldsInOrder := [ ... ] string { "tokenName" }
for _ , k := range fieldsInOrder {
v , ok := asMap [ k ]
if ! ok {
continue
}
switch k {
case "tokenName" :
var err error
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "tokenName" ) )
data , err := ec . unmarshalOString2ᚖstring ( ctx , v )
if err != nil {
return it , err
}
it . TokenName = data
}
}
return it , nil
}
func ( ec * executionContext ) unmarshalInputNewRole ( ctx context . Context , obj interface { } ) ( model . NewRole , error ) {
var it model . NewRole
asMap := map [ string ] interface { } { }
for k , v := range obj . ( map [ string ] interface { } ) {
asMap [ k ] = v
}
fieldsInOrder := [ ... ] string { "roleName" , "isAdmin" , "isUserCreator" }
for _ , k := range fieldsInOrder {
v , ok := asMap [ k ]
if ! ok {
continue
}
switch k {
case "roleName" :
var err error
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "roleName" ) )
data , err := ec . unmarshalNString2string ( ctx , v )
if err != nil {
return it , err
}
it . RoleName = data
case "isAdmin" :
var err error
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "isAdmin" ) )
data , err := ec . unmarshalNBoolean2bool ( ctx , v )
if err != nil {
return it , err
}
it . IsAdmin = data
case "isUserCreator" :
var err error
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "isUserCreator" ) )
data , err := ec . unmarshalNBoolean2bool ( ctx , v )
if err != nil {
return it , err
}
it . IsUserCreator = data
}
}
return it , nil
}
2023-10-10 22:26:07 +02:00
func ( ec * executionContext ) unmarshalInputNewTodo ( ctx context . Context , obj interface { } ) ( model . NewTodo , error ) {
var it model . NewTodo
asMap := map [ string ] interface { } { }
for k , v := range obj . ( map [ string ] interface { } ) {
asMap [ k ] = v
}
fieldsInOrder := [ ... ] string { "text" , "userId" }
for _ , k := range fieldsInOrder {
v , ok := asMap [ k ]
if ! ok {
continue
}
switch k {
case "text" :
var err error
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "text" ) )
data , err := ec . unmarshalNString2string ( ctx , v )
if err != nil {
return it , err
}
it . Text = data
case "userId" :
var err error
2023-11-05 17:42:14 +01:00
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "userId" ) )
data , err := ec . unmarshalNID2string ( ctx , v )
if err != nil {
return it , err
}
it . UserID = data
}
}
return it , nil
}
func ( ec * executionContext ) unmarshalInputNewUser ( ctx context . Context , obj interface { } ) ( model . NewUser , error ) {
var it model . NewUser
asMap := map [ string ] interface { } { }
for k , v := range obj . ( map [ string ] interface { } ) {
asMap [ k ] = v
}
fieldsInOrder := [ ... ] string { "userName" , "fullName" , "password" }
for _ , k := range fieldsInOrder {
v , ok := asMap [ k ]
if ! ok {
continue
}
switch k {
case "userName" :
var err error
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "userName" ) )
data , err := ec . unmarshalNString2string ( ctx , v )
if err != nil {
return it , err
}
it . UserName = data
case "fullName" :
var err error
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "fullName" ) )
data , err := ec . unmarshalOString2ᚖstring ( ctx , v )
if err != nil {
return it , err
}
it . FullName = data
case "password" :
var err error
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "password" ) )
data , err := ec . unmarshalNString2string ( ctx , v )
if err != nil {
return it , err
}
it . Password = data
}
}
return it , nil
}
func ( ec * executionContext ) unmarshalInputUpdateRefreshToken ( ctx context . Context , obj interface { } ) ( model . UpdateRefreshToken , error ) {
var it model . UpdateRefreshToken
asMap := map [ string ] interface { } { }
for k , v := range obj . ( map [ string ] interface { } ) {
asMap [ k ] = v
}
fieldsInOrder := [ ... ] string { "tokenName" }
for _ , k := range fieldsInOrder {
v , ok := asMap [ k ]
if ! ok {
continue
}
switch k {
case "tokenName" :
var err error
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "tokenName" ) )
data , err := ec . unmarshalOString2ᚖstring ( ctx , v )
2023-10-10 22:26:07 +02:00
if err != nil {
return it , err
}
2023-11-05 17:42:14 +01:00
it . TokenName = data
2023-10-10 22:26:07 +02:00
}
}
return it , nil
2023-08-19 23:47:36 +02:00
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) unmarshalInputUpdateRole ( ctx context . Context , obj interface { } ) ( model . UpdateRole , error ) {
var it model . UpdateRole
2023-10-10 22:26:07 +02:00
asMap := map [ string ] interface { } { }
for k , v := range obj . ( map [ string ] interface { } ) {
asMap [ k ] = v
}
2023-08-19 23:47:36 +02:00
2023-11-05 17:42:14 +01:00
fieldsInOrder := [ ... ] string { "roleName" , "isAdmin" , "isUserCreator" }
2023-10-10 22:26:07 +02:00
for _ , k := range fieldsInOrder {
v , ok := asMap [ k ]
if ! ok {
continue
}
switch k {
2023-11-05 17:42:14 +01:00
case "roleName" :
2023-10-10 22:26:07 +02:00
var err error
2023-08-19 23:47:36 +02:00
2023-11-05 17:42:14 +01:00
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "roleName" ) )
data , err := ec . unmarshalOString2ᚖstring ( ctx , v )
2023-10-10 22:26:07 +02:00
if err != nil {
return it , err
}
2023-11-05 17:42:14 +01:00
it . RoleName = data
case "isAdmin" :
2023-10-10 22:26:07 +02:00
var err error
2023-11-05 17:42:14 +01:00
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "isAdmin" ) )
data , err := ec . unmarshalOBoolean2ᚖbool ( ctx , v )
2023-10-10 22:26:07 +02:00
if err != nil {
return it , err
}
2023-11-05 17:42:14 +01:00
it . IsAdmin = data
case "isUserCreator" :
var err error
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "isUserCreator" ) )
data , err := ec . unmarshalOBoolean2ᚖbool ( ctx , v )
if err != nil {
return it , err
}
it . IsUserCreator = data
2023-10-10 22:26:07 +02:00
}
}
return it , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) unmarshalInputUpdateTodo ( ctx context . Context , obj interface { } ) ( model . UpdateTodo , error ) {
2023-10-10 22:26:07 +02:00
var it model . UpdateTodo
2023-08-19 23:47:36 +02:00
asMap := map [ string ] interface { } { }
for k , v := range obj . ( map [ string ] interface { } ) {
asMap [ k ] = v
}
2023-10-10 22:26:07 +02:00
fieldsInOrder := [ ... ] string { "text" , "done" }
2023-08-19 23:47:36 +02:00
for _ , k := range fieldsInOrder {
v , ok := asMap [ k ]
if ! ok {
continue
}
switch k {
case "text" :
var err error
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "text" ) )
2023-10-10 22:26:07 +02:00
data , err := ec . unmarshalOString2ᚖstring ( ctx , v )
2023-08-19 23:47:36 +02:00
if err != nil {
return it , err
}
it . Text = data
2023-10-10 22:26:07 +02:00
case "done" :
2023-08-19 23:47:36 +02:00
var err error
2023-10-10 22:26:07 +02:00
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "done" ) )
data , err := ec . unmarshalOBoolean2ᚖbool ( ctx , v )
2023-08-19 23:47:36 +02:00
if err != nil {
return it , err
}
2023-10-10 22:26:07 +02:00
it . Done = data
}
}
return it , nil
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) unmarshalInputUpdateUser ( ctx context . Context , obj interface { } ) ( model . UpdateUser , error ) {
2023-10-10 22:26:07 +02:00
var it model . UpdateUser
asMap := map [ string ] interface { } { }
for k , v := range obj . ( map [ string ] interface { } ) {
asMap [ k ] = v
}
2023-11-05 17:42:14 +01:00
fieldsInOrder := [ ... ] string { "userName" , "fullName" , "password" }
2023-10-10 22:26:07 +02:00
for _ , k := range fieldsInOrder {
v , ok := asMap [ k ]
if ! ok {
continue
}
switch k {
case "userName" :
var err error
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "userName" ) )
data , err := ec . unmarshalOString2ᚖstring ( ctx , v )
if err != nil {
return it , err
}
it . UserName = data
case "fullName" :
var err error
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "fullName" ) )
data , err := ec . unmarshalOString2ᚖstring ( ctx , v )
if err != nil {
return it , err
}
it . FullName = data
2023-11-05 17:42:14 +01:00
case "password" :
var err error
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithField ( "password" ) )
data , err := ec . unmarshalOString2ᚖstring ( ctx , v )
if err != nil {
return it , err
}
it . Password = data
2023-08-19 23:47:36 +02:00
}
}
return it , nil
}
// endregion **************************** input.gotpl *****************************
// region ************************** interface.gotpl ***************************
// endregion ************************** interface.gotpl ***************************
// region **************************** object.gotpl ****************************
var mutationImplementors = [ ] string { "Mutation" }
func ( ec * executionContext ) _Mutation ( ctx context . Context , sel ast . SelectionSet ) graphql . Marshaler {
fields := graphql . CollectFields ( ec . OperationContext , sel , mutationImplementors )
ctx = graphql . WithFieldContext ( ctx , & graphql . FieldContext {
Object : "Mutation" ,
} )
out := graphql . NewFieldSet ( fields )
deferred := make ( map [ string ] * graphql . FieldSet )
for i , field := range fields {
innerCtx := graphql . WithRootFieldContext ( ctx , & graphql . RootFieldContext {
Object : field . Name ,
Field : field ,
} )
switch field . Name {
case "__typename" :
out . Values [ i ] = graphql . MarshalString ( "Mutation" )
2023-10-10 22:26:07 +02:00
case "createUser" :
out . Values [ i ] = ec . OperationContext . RootResolverMiddleware ( innerCtx , func ( ctx context . Context ) ( res graphql . Marshaler ) {
return ec . _Mutation_createUser ( ctx , field )
} )
if out . Values [ i ] == graphql . Null {
out . Invalids ++
}
2023-08-19 23:47:36 +02:00
case "createTodo" :
out . Values [ i ] = ec . OperationContext . RootResolverMiddleware ( innerCtx , func ( ctx context . Context ) ( res graphql . Marshaler ) {
return ec . _Mutation_createTodo ( ctx , field )
} )
if out . Values [ i ] == graphql . Null {
out . Invalids ++
}
2023-11-05 17:42:14 +01:00
case "createRole" :
out . Values [ i ] = ec . OperationContext . RootResolverMiddleware ( innerCtx , func ( ctx context . Context ) ( res graphql . Marshaler ) {
return ec . _Mutation_createRole ( ctx , field )
} )
if out . Values [ i ] == graphql . Null {
out . Invalids ++
}
case "createRefreshToken" :
out . Values [ i ] = ec . OperationContext . RootResolverMiddleware ( innerCtx , func ( ctx context . Context ) ( res graphql . Marshaler ) {
return ec . _Mutation_createRefreshToken ( ctx , field )
} )
if out . Values [ i ] == graphql . Null {
out . Invalids ++
}
2023-10-10 22:26:07 +02:00
case "updateTodo" :
out . Values [ i ] = ec . OperationContext . RootResolverMiddleware ( innerCtx , func ( ctx context . Context ) ( res graphql . Marshaler ) {
return ec . _Mutation_updateTodo ( ctx , field )
} )
if out . Values [ i ] == graphql . Null {
out . Invalids ++
}
case "updateUser" :
out . Values [ i ] = ec . OperationContext . RootResolverMiddleware ( innerCtx , func ( ctx context . Context ) ( res graphql . Marshaler ) {
return ec . _Mutation_updateUser ( ctx , field )
} )
if out . Values [ i ] == graphql . Null {
out . Invalids ++
}
2023-11-05 17:42:14 +01:00
case "updateRole" :
out . Values [ i ] = ec . OperationContext . RootResolverMiddleware ( innerCtx , func ( ctx context . Context ) ( res graphql . Marshaler ) {
return ec . _Mutation_updateRole ( ctx , field )
} )
if out . Values [ i ] == graphql . Null {
out . Invalids ++
}
case "updateRefreshToken" :
out . Values [ i ] = ec . OperationContext . RootResolverMiddleware ( innerCtx , func ( ctx context . Context ) ( res graphql . Marshaler ) {
return ec . _Mutation_updateRefreshToken ( ctx , field )
} )
if out . Values [ i ] == graphql . Null {
out . Invalids ++
}
2023-10-10 22:26:07 +02:00
case "deleteUser" :
out . Values [ i ] = ec . OperationContext . RootResolverMiddleware ( innerCtx , func ( ctx context . Context ) ( res graphql . Marshaler ) {
return ec . _Mutation_deleteUser ( ctx , field )
} )
case "deleteTodo" :
out . Values [ i ] = ec . OperationContext . RootResolverMiddleware ( innerCtx , func ( ctx context . Context ) ( res graphql . Marshaler ) {
return ec . _Mutation_deleteTodo ( ctx , field )
} )
2023-11-05 17:42:14 +01:00
case "deleteRole" :
out . Values [ i ] = ec . OperationContext . RootResolverMiddleware ( innerCtx , func ( ctx context . Context ) ( res graphql . Marshaler ) {
return ec . _Mutation_deleteRole ( ctx , field )
} )
case "deleteRefreshToken" :
out . Values [ i ] = ec . OperationContext . RootResolverMiddleware ( innerCtx , func ( ctx context . Context ) ( res graphql . Marshaler ) {
return ec . _Mutation_deleteRefreshToken ( ctx , field )
} )
2023-11-18 15:51:10 +01:00
case "addUserRole" :
out . Values [ i ] = ec . OperationContext . RootResolverMiddleware ( innerCtx , func ( ctx context . Context ) ( res graphql . Marshaler ) {
return ec . _Mutation_addUserRole ( ctx , field )
} )
if out . Values [ i ] == graphql . Null {
out . Invalids ++
}
2024-02-02 21:23:32 +01:00
case "updateUserRole" :
2023-11-05 17:42:14 +01:00
out . Values [ i ] = ec . OperationContext . RootResolverMiddleware ( innerCtx , func ( ctx context . Context ) ( res graphql . Marshaler ) {
2024-02-02 21:23:32 +01:00
return ec . _Mutation_updateUserRole ( ctx , field )
2023-11-05 17:42:14 +01:00
} )
if out . Values [ i ] == graphql . Null {
out . Invalids ++
}
2023-11-18 15:51:10 +01:00
case "removeUserRole" :
2023-11-05 17:42:14 +01:00
out . Values [ i ] = ec . OperationContext . RootResolverMiddleware ( innerCtx , func ( ctx context . Context ) ( res graphql . Marshaler ) {
2023-11-18 15:51:10 +01:00
return ec . _Mutation_removeUserRole ( ctx , field )
2023-11-05 17:42:14 +01:00
} )
if out . Values [ i ] == graphql . Null {
out . Invalids ++
}
2023-08-19 23:47:36 +02:00
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 queryImplementors = [ ] string { "Query" }
func ( ec * executionContext ) _Query ( ctx context . Context , sel ast . SelectionSet ) graphql . Marshaler {
fields := graphql . CollectFields ( ec . OperationContext , sel , queryImplementors )
ctx = graphql . WithFieldContext ( ctx , & graphql . FieldContext {
Object : "Query" ,
} )
out := graphql . NewFieldSet ( fields )
deferred := make ( map [ string ] * graphql . FieldSet )
for i , field := range fields {
innerCtx := graphql . WithRootFieldContext ( ctx , & graphql . RootFieldContext {
Object : field . Name ,
Field : field ,
} )
switch field . Name {
case "__typename" :
out . Values [ i ] = graphql . MarshalString ( "Query" )
case "todos" :
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_todos ( 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 ) } )
}
2023-10-10 22:26:07 +02:00
out . Concurrently ( i , func ( ctx context . Context ) graphql . Marshaler { return rrm ( innerCtx ) } )
case "users" :
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_users ( ctx , field )
if res == graphql . Null {
atomic . AddUint32 ( & fs . Invalids , 1 )
}
return res
}
2023-11-05 17:42:14 +01:00
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 "roles" :
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_roles ( 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 "refreshTokens" :
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_refreshTokens ( 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 "user" :
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_user ( 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 "todo" :
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_todo ( 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 "role" :
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_role ( 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 "refreshToken" :
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_refreshToken ( 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 ) {
return ec . _Query___type ( ctx , field )
} )
case "__schema" :
out . Values [ i ] = ec . OperationContext . RootResolverMiddleware ( innerCtx , func ( ctx context . Context ) ( res graphql . Marshaler ) {
return ec . _Query___schema ( ctx , field )
} )
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 refreshTokenImplementors = [ ] string { "RefreshToken" }
func ( ec * executionContext ) _RefreshToken ( ctx context . Context , sel ast . SelectionSet , obj * model . RefreshToken ) graphql . Marshaler {
fields := graphql . CollectFields ( ec . OperationContext , sel , refreshTokenImplementors )
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 ( "RefreshToken" )
case "id" :
out . Values [ i ] = ec . _RefreshToken_id ( ctx , field , obj )
if out . Values [ i ] == graphql . Null {
out . Invalids ++
}
case "expiryDate" :
out . Values [ i ] = ec . _RefreshToken_expiryDate ( ctx , field , obj )
if out . Values [ i ] == graphql . Null {
out . Invalids ++
}
case "tokenName" :
out . Values [ i ] = ec . _RefreshToken_tokenName ( ctx , field , obj )
case "selector" :
out . Values [ i ] = ec . _RefreshToken_selector ( ctx , field , obj )
case "token" :
out . Values [ i ] = ec . _RefreshToken_token ( ctx , field , obj )
case "userId" :
out . Values [ i ] = ec . _RefreshToken_userId ( 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 ) ) )
2023-10-10 22:26:07 +02:00
2023-11-05 17:42:14 +01:00
for label , dfs := range deferred {
ec . processDeferredGroup ( graphql . DeferredGroup {
Label : label ,
Path : graphql . GetPath ( ctx ) ,
FieldSet : dfs ,
Context : ctx ,
} )
}
2023-10-10 22:26:07 +02:00
2023-11-05 17:42:14 +01:00
return out
}
2023-10-10 22:26:07 +02:00
2023-11-18 15:51:10 +01:00
var relationRoleUserImplementors = [ ] string { "RelationRoleUser" }
func ( ec * executionContext ) _RelationRoleUser ( ctx context . Context , sel ast . SelectionSet , obj * model . RelationRoleUser ) graphql . Marshaler {
fields := graphql . CollectFields ( ec . OperationContext , sel , relationRoleUserImplementors )
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 ( "RelationRoleUser" )
case "user" :
out . Values [ i ] = ec . _RelationRoleUser_user ( ctx , field , obj )
if out . Values [ i ] == graphql . Null {
out . Invalids ++
}
case "userIsRoleManager" :
out . Values [ i ] = ec . _RelationRoleUser_userIsRoleManager ( 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 relationUserRoleImplementors = [ ] string { "RelationUserRole" }
func ( ec * executionContext ) _RelationUserRole ( ctx context . Context , sel ast . SelectionSet , obj * model . RelationUserRole ) graphql . Marshaler {
fields := graphql . CollectFields ( ec . OperationContext , sel , relationUserRoleImplementors )
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 ( "RelationUserRole" )
case "role" :
out . Values [ i ] = ec . _RelationUserRole_role ( ctx , field , obj )
if out . Values [ i ] == graphql . Null {
out . Invalids ++
}
case "userIsRoleManager" :
out . Values [ i ] = ec . _RelationUserRole_userIsRoleManager ( 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
}
2023-11-05 17:42:14 +01:00
var roleImplementors = [ ] string { "Role" }
2023-10-10 22:26:07 +02:00
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) _Role ( ctx context . Context , sel ast . SelectionSet , obj * model . Role ) graphql . Marshaler {
fields := graphql . CollectFields ( ec . OperationContext , sel , roleImplementors )
2023-10-10 22:26:07 +02:00
2023-11-05 17:42:14 +01:00
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 ( "Role" )
case "id" :
out . Values [ i ] = ec . _Role_id ( ctx , field , obj )
if out . Values [ i ] == graphql . Null {
2023-11-18 15:51:10 +01:00
atomic . AddUint32 ( & out . Invalids , 1 )
2023-10-10 22:26:07 +02:00
}
2023-11-05 17:42:14 +01:00
case "roleName" :
out . Values [ i ] = ec . _Role_roleName ( ctx , field , obj )
if out . Values [ i ] == graphql . Null {
2023-11-18 15:51:10 +01:00
atomic . AddUint32 ( & out . Invalids , 1 )
2023-11-05 17:42:14 +01:00
}
case "isAdmin" :
out . Values [ i ] = ec . _Role_isAdmin ( ctx , field , obj )
if out . Values [ i ] == graphql . Null {
2023-11-18 15:51:10 +01:00
atomic . AddUint32 ( & out . Invalids , 1 )
2023-11-05 17:42:14 +01:00
}
case "isUserCreator" :
out . Values [ i ] = ec . _Role_isUserCreator ( ctx , field , obj )
if out . Values [ i ] == graphql . Null {
2023-11-18 15:51:10 +01:00
atomic . AddUint32 ( & out . Invalids , 1 )
}
case "roleMembers" :
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 . _Role_roleMembers ( 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
2023-10-10 22:26:07 +02:00
}
2023-11-18 15:51:10 +01:00
out . Concurrently ( i , func ( ctx context . Context ) graphql . Marshaler { return innerFunc ( ctx , out ) } )
2023-08-19 23:47:36 +02:00
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 todoImplementors = [ ] string { "Todo" }
func ( ec * executionContext ) _Todo ( ctx context . Context , sel ast . SelectionSet , obj * model . Todo ) graphql . Marshaler {
fields := graphql . CollectFields ( ec . OperationContext , sel , todoImplementors )
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 ( "Todo" )
case "id" :
out . Values [ i ] = ec . _Todo_id ( ctx , field , obj )
if out . Values [ i ] == graphql . Null {
2023-09-01 21:33:26 +02:00
atomic . AddUint32 ( & out . Invalids , 1 )
2023-08-19 23:47:36 +02:00
}
case "text" :
out . Values [ i ] = ec . _Todo_text ( ctx , field , obj )
if out . Values [ i ] == graphql . Null {
2023-09-01 21:33:26 +02:00
atomic . AddUint32 ( & out . Invalids , 1 )
2023-08-19 23:47:36 +02:00
}
case "done" :
out . Values [ i ] = ec . _Todo_done ( ctx , field , obj )
if out . Values [ i ] == graphql . Null {
2023-09-01 21:33:26 +02:00
atomic . AddUint32 ( & out . Invalids , 1 )
2023-08-19 23:47:36 +02:00
}
case "user" :
2023-09-01 21:33:26 +02:00
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 . _Todo_user ( ctx , field , obj )
if res == graphql . Null {
atomic . AddUint32 ( & fs . Invalids , 1 )
}
return res
2023-08-19 23:47:36 +02:00
}
2023-09-01 21:33:26 +02:00
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 ) } )
2023-08-19 23:47:36 +02:00
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 userImplementors = [ ] string { "User" }
func ( ec * executionContext ) _User ( ctx context . Context , sel ast . SelectionSet , obj * model . User ) graphql . Marshaler {
fields := graphql . CollectFields ( ec . OperationContext , sel , userImplementors )
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 ( "User" )
case "id" :
out . Values [ i ] = ec . _User_id ( ctx , field , obj )
if out . Values [ i ] == graphql . Null {
2023-10-10 22:26:07 +02:00
atomic . AddUint32 ( & out . Invalids , 1 )
2023-08-19 23:47:36 +02:00
}
2023-10-10 22:26:07 +02:00
case "userName" :
out . Values [ i ] = ec . _User_userName ( ctx , field , obj )
2023-08-19 23:47:36 +02:00
if out . Values [ i ] == graphql . Null {
2023-10-10 22:26:07 +02:00
atomic . AddUint32 ( & out . Invalids , 1 )
}
case "fullName" :
out . Values [ i ] = ec . _User_fullName ( ctx , field , obj )
case "todos" :
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 . _User_todos ( 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
2023-08-19 23:47:36 +02:00
}
2023-10-10 22:26:07 +02:00
2023-11-05 17:42:14 +01:00
out . Concurrently ( i , func ( ctx context . Context ) graphql . Marshaler { return innerFunc ( ctx , out ) } )
case "roles" :
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 . _User_roles ( 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
}
2023-10-10 22:26:07 +02:00
out . Concurrently ( i , func ( ctx context . Context ) graphql . Marshaler { return innerFunc ( ctx , out ) } )
2023-08-19 23:47:36 +02:00
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 __DirectiveImplementors = [ ] string { "__Directive" }
func ( ec * executionContext ) ___Directive ( ctx context . Context , sel ast . SelectionSet , obj * introspection . Directive ) graphql . Marshaler {
fields := graphql . CollectFields ( ec . OperationContext , sel , __DirectiveImplementors )
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 ( "__Directive" )
case "name" :
out . Values [ i ] = ec . ___Directive_name ( ctx , field , obj )
if out . Values [ i ] == graphql . Null {
out . Invalids ++
}
case "description" :
out . Values [ i ] = ec . ___Directive_description ( ctx , field , obj )
case "locations" :
out . Values [ i ] = ec . ___Directive_locations ( ctx , field , obj )
if out . Values [ i ] == graphql . Null {
out . Invalids ++
}
case "args" :
out . Values [ i ] = ec . ___Directive_args ( ctx , field , obj )
if out . Values [ i ] == graphql . Null {
out . Invalids ++
}
case "isRepeatable" :
out . Values [ i ] = ec . ___Directive_isRepeatable ( 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 __EnumValueImplementors = [ ] string { "__EnumValue" }
func ( ec * executionContext ) ___EnumValue ( ctx context . Context , sel ast . SelectionSet , obj * introspection . EnumValue ) graphql . Marshaler {
fields := graphql . CollectFields ( ec . OperationContext , sel , __EnumValueImplementors )
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 ( "__EnumValue" )
case "name" :
out . Values [ i ] = ec . ___EnumValue_name ( ctx , field , obj )
if out . Values [ i ] == graphql . Null {
out . Invalids ++
}
case "description" :
out . Values [ i ] = ec . ___EnumValue_description ( ctx , field , obj )
case "isDeprecated" :
out . Values [ i ] = ec . ___EnumValue_isDeprecated ( ctx , field , obj )
if out . Values [ i ] == graphql . Null {
out . Invalids ++
}
case "deprecationReason" :
out . Values [ i ] = ec . ___EnumValue_deprecationReason ( ctx , field , obj )
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 __FieldImplementors = [ ] string { "__Field" }
func ( ec * executionContext ) ___Field ( ctx context . Context , sel ast . SelectionSet , obj * introspection . Field ) graphql . Marshaler {
fields := graphql . CollectFields ( ec . OperationContext , sel , __FieldImplementors )
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 ( "__Field" )
case "name" :
out . Values [ i ] = ec . ___Field_name ( ctx , field , obj )
if out . Values [ i ] == graphql . Null {
out . Invalids ++
}
case "description" :
out . Values [ i ] = ec . ___Field_description ( ctx , field , obj )
case "args" :
out . Values [ i ] = ec . ___Field_args ( ctx , field , obj )
if out . Values [ i ] == graphql . Null {
out . Invalids ++
}
case "type" :
out . Values [ i ] = ec . ___Field_type ( ctx , field , obj )
if out . Values [ i ] == graphql . Null {
out . Invalids ++
}
case "isDeprecated" :
out . Values [ i ] = ec . ___Field_isDeprecated ( ctx , field , obj )
if out . Values [ i ] == graphql . Null {
out . Invalids ++
}
case "deprecationReason" :
out . Values [ i ] = ec . ___Field_deprecationReason ( ctx , field , obj )
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 __InputValueImplementors = [ ] string { "__InputValue" }
func ( ec * executionContext ) ___InputValue ( ctx context . Context , sel ast . SelectionSet , obj * introspection . InputValue ) graphql . Marshaler {
fields := graphql . CollectFields ( ec . OperationContext , sel , __InputValueImplementors )
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 ( "__InputValue" )
case "name" :
out . Values [ i ] = ec . ___InputValue_name ( ctx , field , obj )
if out . Values [ i ] == graphql . Null {
out . Invalids ++
}
case "description" :
out . Values [ i ] = ec . ___InputValue_description ( ctx , field , obj )
case "type" :
out . Values [ i ] = ec . ___InputValue_type ( ctx , field , obj )
if out . Values [ i ] == graphql . Null {
out . Invalids ++
}
case "defaultValue" :
out . Values [ i ] = ec . ___InputValue_defaultValue ( ctx , field , obj )
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 __SchemaImplementors = [ ] string { "__Schema" }
func ( ec * executionContext ) ___Schema ( ctx context . Context , sel ast . SelectionSet , obj * introspection . Schema ) graphql . Marshaler {
fields := graphql . CollectFields ( ec . OperationContext , sel , __SchemaImplementors )
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 ( "__Schema" )
case "description" :
out . Values [ i ] = ec . ___Schema_description ( ctx , field , obj )
case "types" :
out . Values [ i ] = ec . ___Schema_types ( ctx , field , obj )
if out . Values [ i ] == graphql . Null {
out . Invalids ++
}
case "queryType" :
out . Values [ i ] = ec . ___Schema_queryType ( ctx , field , obj )
if out . Values [ i ] == graphql . Null {
out . Invalids ++
}
case "mutationType" :
out . Values [ i ] = ec . ___Schema_mutationType ( ctx , field , obj )
case "subscriptionType" :
out . Values [ i ] = ec . ___Schema_subscriptionType ( ctx , field , obj )
case "directives" :
out . Values [ i ] = ec . ___Schema_directives ( 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 __TypeImplementors = [ ] string { "__Type" }
func ( ec * executionContext ) ___Type ( ctx context . Context , sel ast . SelectionSet , obj * introspection . Type ) graphql . Marshaler {
fields := graphql . CollectFields ( ec . OperationContext , sel , __TypeImplementors )
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 ( "__Type" )
case "kind" :
out . Values [ i ] = ec . ___Type_kind ( ctx , field , obj )
if out . Values [ i ] == graphql . Null {
out . Invalids ++
}
case "name" :
out . Values [ i ] = ec . ___Type_name ( ctx , field , obj )
case "description" :
out . Values [ i ] = ec . ___Type_description ( ctx , field , obj )
case "fields" :
out . Values [ i ] = ec . ___Type_fields ( ctx , field , obj )
case "interfaces" :
out . Values [ i ] = ec . ___Type_interfaces ( ctx , field , obj )
case "possibleTypes" :
out . Values [ i ] = ec . ___Type_possibleTypes ( ctx , field , obj )
case "enumValues" :
out . Values [ i ] = ec . ___Type_enumValues ( ctx , field , obj )
case "inputFields" :
out . Values [ i ] = ec . ___Type_inputFields ( ctx , field , obj )
case "ofType" :
out . Values [ i ] = ec . ___Type_ofType ( ctx , field , obj )
case "specifiedByURL" :
out . Values [ i ] = ec . ___Type_specifiedByURL ( ctx , field , obj )
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
}
// endregion **************************** object.gotpl ****************************
// region ***************************** type.gotpl *****************************
func ( ec * executionContext ) unmarshalNBoolean2bool ( ctx context . Context , v interface { } ) ( bool , error ) {
res , err := graphql . UnmarshalBoolean ( v )
return res , graphql . ErrorOnPath ( ctx , err )
}
func ( ec * executionContext ) marshalNBoolean2bool ( ctx context . Context , sel ast . SelectionSet , v bool ) graphql . Marshaler {
res := graphql . MarshalBoolean ( 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" )
}
}
return res
}
func ( ec * executionContext ) unmarshalNID2string ( ctx context . Context , v interface { } ) ( string , error ) {
res , err := graphql . UnmarshalID ( v )
return res , graphql . ErrorOnPath ( ctx , err )
}
func ( ec * executionContext ) marshalNID2string ( ctx context . Context , sel ast . SelectionSet , v string ) graphql . Marshaler {
res := graphql . MarshalID ( 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" )
}
}
return res
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) unmarshalNInt2int ( ctx context . Context , v interface { } ) ( int , error ) {
res , err := graphql . UnmarshalInt ( v )
return res , graphql . ErrorOnPath ( ctx , err )
}
func ( ec * executionContext ) marshalNInt2int ( ctx context . Context , sel ast . SelectionSet , v int ) graphql . Marshaler {
res := graphql . MarshalInt ( 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" )
}
}
return res
}
func ( ec * executionContext ) unmarshalNNewRefreshToken2somepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐNewRefreshToken ( ctx context . Context , v interface { } ) ( model . NewRefreshToken , error ) {
res , err := ec . unmarshalInputNewRefreshToken ( ctx , v )
return res , graphql . ErrorOnPath ( ctx , err )
}
func ( ec * executionContext ) unmarshalNNewRole2somepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐNewRole ( ctx context . Context , v interface { } ) ( model . NewRole , error ) {
res , err := ec . unmarshalInputNewRole ( ctx , v )
return res , graphql . ErrorOnPath ( ctx , err )
}
2023-08-19 23:47:36 +02:00
func ( ec * executionContext ) unmarshalNNewTodo2somepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐNewTodo ( ctx context . Context , v interface { } ) ( model . NewTodo , error ) {
res , err := ec . unmarshalInputNewTodo ( ctx , v )
return res , graphql . ErrorOnPath ( ctx , err )
}
2023-10-10 22:26:07 +02:00
func ( ec * executionContext ) unmarshalNNewUser2somepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐNewUser ( ctx context . Context , v interface { } ) ( model . NewUser , error ) {
res , err := ec . unmarshalInputNewUser ( ctx , v )
return res , graphql . ErrorOnPath ( ctx , err )
}
2024-02-02 21:23:32 +01:00
func ( ec * executionContext ) unmarshalNPrivilege2somepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐPrivilege ( ctx context . Context , v interface { } ) ( model . Privilege , error ) {
var res model . Privilege
err := res . UnmarshalGQL ( v )
return res , graphql . ErrorOnPath ( ctx , err )
}
func ( ec * executionContext ) marshalNPrivilege2somepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐPrivilege ( ctx context . Context , sel ast . SelectionSet , v model . Privilege ) graphql . Marshaler {
return v
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) marshalNRefreshToken2somepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐRefreshToken ( ctx context . Context , sel ast . SelectionSet , v model . RefreshToken ) graphql . Marshaler {
return ec . _RefreshToken ( ctx , sel , & v )
}
func ( ec * executionContext ) marshalNRefreshToken2ᚕᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐRefreshTokenᚄ ( ctx context . Context , sel ast . SelectionSet , v [ ] * model . RefreshToken ) 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 . marshalNRefreshToken2ᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐRefreshToken ( 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 ) marshalNRefreshToken2ᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐRefreshToken ( ctx context . Context , sel ast . SelectionSet , v * model . RefreshToken ) 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 . _RefreshToken ( ctx , sel , v )
}
2023-11-18 15:51:10 +01:00
func ( ec * executionContext ) marshalNRelationRoleUser2ᚕᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐRelationRoleUserᚄ ( ctx context . Context , sel ast . SelectionSet , v [ ] * model . RelationRoleUser ) 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 . marshalNRelationRoleUser2ᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐRelationRoleUser ( 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 ) marshalNRelationRoleUser2ᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐRelationRoleUser ( ctx context . Context , sel ast . SelectionSet , v * model . RelationRoleUser ) 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 . _RelationRoleUser ( ctx , sel , v )
}
func ( ec * executionContext ) marshalNRelationUserRole2ᚕᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐRelationUserRoleᚄ ( ctx context . Context , sel ast . SelectionSet , v [ ] * model . RelationUserRole ) 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 . marshalNRelationUserRole2ᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐRelationUserRole ( 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 ) marshalNRelationUserRole2ᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐRelationUserRole ( ctx context . Context , sel ast . SelectionSet , v * model . RelationUserRole ) 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 . _RelationUserRole ( ctx , sel , v )
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) marshalNRole2somepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐRole ( ctx context . Context , sel ast . SelectionSet , v model . Role ) graphql . Marshaler {
return ec . _Role ( ctx , sel , & v )
}
func ( ec * executionContext ) marshalNRole2ᚕᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐRoleᚄ ( ctx context . Context , sel ast . SelectionSet , v [ ] * model . Role ) 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 . marshalNRole2ᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐRole ( 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 ) marshalNRole2ᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐRole ( ctx context . Context , sel ast . SelectionSet , v * model . Role ) 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 . _Role ( ctx , sel , v )
}
2023-08-19 23:47:36 +02:00
func ( ec * executionContext ) unmarshalNString2string ( ctx context . Context , v interface { } ) ( string , error ) {
res , err := graphql . UnmarshalString ( v )
return res , graphql . ErrorOnPath ( ctx , err )
}
func ( ec * executionContext ) marshalNString2string ( ctx context . Context , sel ast . SelectionSet , v string ) graphql . Marshaler {
res := graphql . MarshalString ( 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" )
}
}
return res
}
func ( ec * executionContext ) marshalNTodo2somepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐTodo ( ctx context . Context , sel ast . SelectionSet , v model . Todo ) graphql . Marshaler {
return ec . _Todo ( ctx , sel , & v )
}
func ( ec * executionContext ) marshalNTodo2ᚕᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐTodoᚄ ( ctx context . Context , sel ast . SelectionSet , v [ ] * model . Todo ) 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 . marshalNTodo2ᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐTodo ( 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 ) marshalNTodo2ᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐTodo ( ctx context . Context , sel ast . SelectionSet , v * model . Todo ) 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 . _Todo ( ctx , sel , v )
}
2023-11-05 17:42:14 +01:00
func ( ec * executionContext ) unmarshalNUpdateRefreshToken2somepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐUpdateRefreshToken ( ctx context . Context , v interface { } ) ( model . UpdateRefreshToken , error ) {
res , err := ec . unmarshalInputUpdateRefreshToken ( ctx , v )
return res , graphql . ErrorOnPath ( ctx , err )
}
func ( ec * executionContext ) unmarshalNUpdateRole2somepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐUpdateRole ( ctx context . Context , v interface { } ) ( model . UpdateRole , error ) {
res , err := ec . unmarshalInputUpdateRole ( ctx , v )
return res , graphql . ErrorOnPath ( ctx , err )
}
func ( ec * executionContext ) unmarshalNUpdateTodo2somepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐUpdateTodo ( ctx context . Context , v interface { } ) ( model . UpdateTodo , error ) {
res , err := ec . unmarshalInputUpdateTodo ( ctx , v )
return res , graphql . ErrorOnPath ( ctx , err )
}
func ( ec * executionContext ) unmarshalNUpdateUser2somepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐUpdateUser ( ctx context . Context , v interface { } ) ( model . UpdateUser , error ) {
res , err := ec . unmarshalInputUpdateUser ( ctx , v )
return res , graphql . ErrorOnPath ( ctx , err )
}
2023-09-01 21:33:26 +02:00
func ( ec * executionContext ) marshalNUser2somepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐUser ( ctx context . Context , sel ast . SelectionSet , v model . User ) graphql . Marshaler {
return ec . _User ( ctx , sel , & v )
}
2023-10-10 22:26:07 +02:00
func ( ec * executionContext ) marshalNUser2ᚕᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐUserᚄ ( ctx context . Context , sel ast . SelectionSet , v [ ] * model . User ) 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 . marshalNUser2ᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐUser ( 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
}
2023-08-19 23:47:36 +02:00
func ( ec * executionContext ) marshalNUser2ᚖsomepiᚗddnsᚗnetᚋgiteaᚋgilexᚑdevᚋYetAnotherToDoListᚋgraphᚋmodelᚐUser ( ctx context . Context , sel ast . SelectionSet , v * model . User ) 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 . _User ( ctx , sel , v )
}
func ( ec * executionContext ) marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective ( ctx context . Context , sel ast . SelectionSet , v introspection . Directive ) graphql . Marshaler {
return ec . ___Directive ( ctx , sel , & v )
}
func ( ec * executionContext ) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ ( ctx context . Context , sel ast . SelectionSet , v [ ] introspection . Directive ) 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 . marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective ( 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 ) unmarshalN__DirectiveLocation2string ( ctx context . Context , v interface { } ) ( string , error ) {
res , err := graphql . UnmarshalString ( v )
return res , graphql . ErrorOnPath ( ctx , err )
}
func ( ec * executionContext ) marshalN__DirectiveLocation2string ( ctx context . Context , sel ast . SelectionSet , v string ) graphql . Marshaler {
res := graphql . MarshalString ( 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" )
}
}
return res
}
func ( ec * executionContext ) unmarshalN__DirectiveLocation2ᚕstringᚄ ( ctx context . Context , v interface { } ) ( [ ] string , error ) {
var vSlice [ ] interface { }
if v != nil {
vSlice = graphql . CoerceList ( v )
}
var err error
res := make ( [ ] string , len ( vSlice ) )
for i := range vSlice {
ctx := graphql . WithPathContext ( ctx , graphql . NewPathWithIndex ( i ) )
res [ i ] , err = ec . unmarshalN__DirectiveLocation2string ( ctx , vSlice [ i ] )
if err != nil {
return nil , err
}
}
return res , nil
}
func ( ec * executionContext ) marshalN__DirectiveLocation2ᚕstringᚄ ( ctx context . Context , sel ast . SelectionSet , v [ ] string ) 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 . marshalN__DirectiveLocation2string ( 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 ) marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue ( ctx context . Context , sel ast . SelectionSet , v introspection . EnumValue ) graphql . Marshaler {
return ec . ___EnumValue ( ctx , sel , & v )
}
func ( ec * executionContext ) marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField ( ctx context . Context , sel ast . SelectionSet , v introspection . Field ) graphql . Marshaler {
return ec . ___Field ( ctx , sel , & v )
}
func ( ec * executionContext ) marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue ( ctx context . Context , sel ast . SelectionSet , v introspection . InputValue ) graphql . Marshaler {
return ec . ___InputValue ( ctx , sel , & v )
}
func ( ec * executionContext ) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ ( ctx context . Context , sel ast . SelectionSet , v [ ] introspection . InputValue ) 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 . marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue ( 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 ) marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType ( ctx context . Context , sel ast . SelectionSet , v introspection . Type ) graphql . Marshaler {
return ec . ___Type ( ctx , sel , & v )
}
func ( ec * executionContext ) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ ( ctx context . Context , sel ast . SelectionSet , v [ ] introspection . Type ) 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 . marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType ( 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 ) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType ( ctx context . Context , sel ast . SelectionSet , v * introspection . Type ) 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 . ___Type ( ctx , sel , v )
}
func ( ec * executionContext ) unmarshalN__TypeKind2string ( ctx context . Context , v interface { } ) ( string , error ) {
res , err := graphql . UnmarshalString ( v )
return res , graphql . ErrorOnPath ( ctx , err )
}
func ( ec * executionContext ) marshalN__TypeKind2string ( ctx context . Context , sel ast . SelectionSet , v string ) graphql . Marshaler {
res := graphql . MarshalString ( 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" )
}
}
return res
}
func ( ec * executionContext ) unmarshalOBoolean2bool ( ctx context . Context , v interface { } ) ( bool , error ) {
res , err := graphql . UnmarshalBoolean ( v )
return res , graphql . ErrorOnPath ( ctx , err )
}
func ( ec * executionContext ) marshalOBoolean2bool ( ctx context . Context , sel ast . SelectionSet , v bool ) graphql . Marshaler {
res := graphql . MarshalBoolean ( v )
return res
}
func ( ec * executionContext ) unmarshalOBoolean2ᚖbool ( ctx context . Context , v interface { } ) ( * bool , error ) {
if v == nil {
return nil , nil
}
res , err := graphql . UnmarshalBoolean ( v )
return & res , graphql . ErrorOnPath ( ctx , err )
}
func ( ec * executionContext ) marshalOBoolean2ᚖbool ( ctx context . Context , sel ast . SelectionSet , v * bool ) graphql . Marshaler {
if v == nil {
return graphql . Null
}
res := graphql . MarshalBoolean ( * v )
return res
}
2023-10-10 22:26:07 +02:00
func ( ec * executionContext ) unmarshalOID2ᚖstring ( ctx context . Context , v interface { } ) ( * string , error ) {
if v == nil {
return nil , nil
}
res , err := graphql . UnmarshalID ( v )
return & res , graphql . ErrorOnPath ( ctx , err )
}
func ( ec * executionContext ) marshalOID2ᚖstring ( ctx context . Context , sel ast . SelectionSet , v * string ) graphql . Marshaler {
if v == nil {
return graphql . Null
}
res := graphql . MarshalID ( * v )
return res
}
2023-08-19 23:47:36 +02:00
func ( ec * executionContext ) unmarshalOString2ᚖstring ( ctx context . Context , v interface { } ) ( * string , error ) {
if v == nil {
return nil , nil
}
res , err := graphql . UnmarshalString ( v )
return & res , graphql . ErrorOnPath ( ctx , err )
}
func ( ec * executionContext ) marshalOString2ᚖstring ( ctx context . Context , sel ast . SelectionSet , v * string ) graphql . Marshaler {
if v == nil {
return graphql . Null
}
res := graphql . MarshalString ( * v )
return res
}
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
}
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 . marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue ( 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 ) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ ( ctx context . Context , sel ast . SelectionSet , v [ ] introspection . Field ) 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 . marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField ( 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 ) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ ( ctx context . Context , sel ast . SelectionSet , v [ ] introspection . InputValue ) 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 . marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue ( 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 ) marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema ( ctx context . Context , sel ast . SelectionSet , v * introspection . Schema ) graphql . Marshaler {
if v == nil {
return graphql . Null
}
return ec . ___Schema ( ctx , sel , v )
}
func ( ec * executionContext ) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ ( ctx context . Context , sel ast . SelectionSet , v [ ] introspection . Type ) 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 . marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType ( 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 ) marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType ( ctx context . Context , sel ast . SelectionSet , v * introspection . Type ) graphql . Marshaler {
if v == nil {
return graphql . Null
}
return ec . ___Type ( ctx , sel , v )
}
// endregion ***************************** type.gotpl *****************************