diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..af95804
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/.idea
+/graph/graphcore/*
\ No newline at end of file
diff --git a/.idea/.gitignore b/.idea/.gitignore
deleted file mode 100644
index 73f69e0..0000000
--- a/.idea/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
-# Datasource local storage ignored files
-/dataSources/
-/dataSources.local.xml
-# Editor-based HTTP Client requests
-/httpRequests/
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml
deleted file mode 100644
index 98ad33e..0000000
--- a/.idea/dataSources.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
- mariadb
- true
- org.mariadb.jdbc.Driver
- jdbc:mariadb://localhost:3306/xiaoli
-
-
-
\ No newline at end of file
diff --git a/.idea/dictionaries/gisle.xml b/.idea/dictionaries/gisle.xml
deleted file mode 100644
index fc8ac1a..0000000
--- a/.idea/dictionaries/gisle.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
- blargh
- blendings
- graphcore
- qpos
- sourcream
- stufflog
- xiaoli
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
deleted file mode 100644
index 28a804d..0000000
--- a/.idea/misc.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100644
index 3c106bb..0000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/sqldialects.xml b/.idea/sqldialects.xml
deleted file mode 100644
index dcf43c9..0000000
--- a/.idea/sqldialects.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/watcherTasks.xml b/.idea/watcherTasks.xml
deleted file mode 100644
index 97ad6d2..0000000
--- a/.idea/watcherTasks.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/xiaoli.iml b/.idea/xiaoli.iml
deleted file mode 100644
index c956989..0000000
--- a/.idea/xiaoli.iml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/database/drivers/mysqldriver/db_test.go b/database/drivers/mysqldriver/db_test.go
index 971ffbc..66be122 100644
--- a/database/drivers/mysqldriver/db_test.go
+++ b/database/drivers/mysqldriver/db_test.go
@@ -13,17 +13,26 @@ var testDB *DB
func TestMain(m *testing.M) {
testDbConnect := os.Getenv("DB_TEST_CONNECT")
if testDbConnect == "" {
- testDbConnect = "xiaoli_test:test1234@(localhost:3306)/xiaoli_test"
+ testDbConnect = "stufflog_test:test1234@(localhost:3306)/stufflog_test"
}
- db, err := Open(testDbConnect)
- if err != nil {
- log.Println("DB ERROR", err)
+ for i := 0; i < 10; i++ {
+ db, err := Open(testDbConnect)
+ if err != nil {
+ log.Println("DB ERROR", err)
+ time.Sleep(time.Second)
+ continue
+ }
+
+ testDB = db
+ }
+ if testDB == nil {
+ log.Println("DB FAILED")
os.Exit(1)
return
}
- err = goose.SetDialect("mysql")
+ err := goose.SetDialect("mysql")
if err != nil {
log.Println("GOOSE ERROR", err)
os.Exit(1)
@@ -31,20 +40,19 @@ func TestMain(m *testing.M) {
}
for {
- err = goose.Down(db.db.DB, "../../../migrations/mysql")
+ err = goose.Down(testDB.db.DB, "../../../migrations/mysql")
if err != nil {
break
}
}
- err = goose.Up(db.db.DB, "../../../migrations/mysql")
+ err = goose.Up(testDB.db.DB, "../../../migrations/mysql")
if err != nil && err != goose.ErrNoNextVersion && err != goose.ErrNoCurrentVersion {
log.Println("UP ERROR", err)
os.Exit(3)
return
}
- testDB = db
code := m.Run()
os.Exit(code)
diff --git a/graph/graphcore/exec_gen.go b/graph/graphcore/exec_gen.go
deleted file mode 100644
index 06a94bd..0000000
--- a/graph/graphcore/exec_gen.go
+++ /dev/null
@@ -1,4983 +0,0 @@
-// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
-
-package graphcore
-
-import (
- "bytes"
- "context"
- "errors"
- "strconv"
- "sync"
- "sync/atomic"
- "time"
-
- "git.aiterp.net/stufflog/server/models"
- "github.com/99designs/gqlgen/graphql"
- "github.com/99designs/gqlgen/graphql/introspection"
- gqlparser "github.com/vektah/gqlparser/v2"
- "github.com/vektah/gqlparser/v2/ast"
-)
-
-// region ************************** generated!.gotpl **************************
-
-// NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
-func NewExecutableSchema(cfg Config) graphql.ExecutableSchema {
- return &executableSchema{
- resolvers: cfg.Resolvers,
- directives: cfg.Directives,
- complexity: cfg.Complexity,
- }
-}
-
-type Config struct {
- Resolvers ResolverRoot
- Directives DirectiveRoot
- Complexity ComplexityRoot
-}
-
-type ResolverRoot interface {
- Issue() IssueResolver
- Mutation() MutationResolver
- Project() ProjectResolver
- Query() QueryResolver
-}
-
-type DirectiveRoot struct {
-}
-
-type ComplexityRoot struct {
- Issue struct {
- Assignee func(childComplexity int) int
- AssigneeID func(childComplexity int) int
- CreatedTime func(childComplexity int) int
- Description func(childComplexity int) int
- DueTime func(childComplexity int) int
- ID func(childComplexity int) int
- Name func(childComplexity int) int
- Owner func(childComplexity int) int
- OwnerID func(childComplexity int) int
- Project func(childComplexity int) int
- ProjectID func(childComplexity int) int
- StatusName func(childComplexity int) int
- StatusStage func(childComplexity int) int
- Title func(childComplexity int) int
- UpdatedTime func(childComplexity int) int
- }
-
- Mutation struct {
- LoginUser func(childComplexity int, input *UserLoginInput) int
- LogoutUser func(childComplexity int) int
- }
-
- Project struct {
- DailyPoints func(childComplexity int) int
- Description func(childComplexity int) int
- ID func(childComplexity int) int
- Issues func(childComplexity int, filter *ProjectIssueFilter) int
- Name func(childComplexity int) int
- Permissions func(childComplexity int) int
- UserPermissions func(childComplexity int) int
- }
-
- ProjectPermissions struct {
- AccessLevel func(childComplexity int) int
- User func(childComplexity int) int
- UserID func(childComplexity int) int
- }
-
- ProjectStatus struct {
- Description func(childComplexity int) int
- Name func(childComplexity int) int
- Stage func(childComplexity int) int
- }
-
- Query struct {
- Issue func(childComplexity int, id string) int
- Issues func(childComplexity int, filter *models.IssueFilter) int
- Project func(childComplexity int, id string) int
- Projects func(childComplexity int, filter *models.ProjectFilter) int
- Session func(childComplexity int) int
- }
-
- User struct {
- Active func(childComplexity int) int
- Admin func(childComplexity int) int
- ID func(childComplexity int) int
- Name func(childComplexity int) int
- }
-}
-
-type IssueResolver interface {
- Project(ctx context.Context, obj *models.Issue) (*models.Project, error)
- Owner(ctx context.Context, obj *models.Issue) (*models.User, error)
- Assignee(ctx context.Context, obj *models.Issue) (*models.User, error)
-}
-type MutationResolver interface {
- LoginUser(ctx context.Context, input *UserLoginInput) (*models.User, error)
- LogoutUser(ctx context.Context) (*models.User, error)
-}
-type ProjectResolver interface {
- Issues(ctx context.Context, obj *models.Project, filter *ProjectIssueFilter) ([]*models.Issue, error)
- Permissions(ctx context.Context, obj *models.Project) ([]*ProjectPermissions, error)
- UserPermissions(ctx context.Context, obj *models.Project) (*ProjectPermissions, error)
-}
-type QueryResolver interface {
- Issue(ctx context.Context, id string) (*models.Issue, error)
- Issues(ctx context.Context, filter *models.IssueFilter) ([]*models.Issue, error)
- Project(ctx context.Context, id string) (*models.Project, error)
- Projects(ctx context.Context, filter *models.ProjectFilter) ([]*models.Project, error)
- Session(ctx context.Context) (*models.User, error)
-}
-
-type executableSchema struct {
- resolvers ResolverRoot
- directives DirectiveRoot
- complexity ComplexityRoot
-}
-
-func (e *executableSchema) Schema() *ast.Schema {
- return parsedSchema
-}
-
-func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) {
- ec := executionContext{nil, e}
- _ = ec
- switch typeName + "." + field {
-
- case "Issue.assignee":
- if e.complexity.Issue.Assignee == nil {
- break
- }
-
- return e.complexity.Issue.Assignee(childComplexity), true
-
- case "Issue.assigneeId":
- if e.complexity.Issue.AssigneeID == nil {
- break
- }
-
- return e.complexity.Issue.AssigneeID(childComplexity), true
-
- case "Issue.createdTime":
- if e.complexity.Issue.CreatedTime == nil {
- break
- }
-
- return e.complexity.Issue.CreatedTime(childComplexity), true
-
- case "Issue.description":
- if e.complexity.Issue.Description == nil {
- break
- }
-
- return e.complexity.Issue.Description(childComplexity), true
-
- case "Issue.dueTime":
- if e.complexity.Issue.DueTime == nil {
- break
- }
-
- return e.complexity.Issue.DueTime(childComplexity), true
-
- case "Issue.id":
- if e.complexity.Issue.ID == nil {
- break
- }
-
- return e.complexity.Issue.ID(childComplexity), true
-
- case "Issue.name":
- if e.complexity.Issue.Name == nil {
- break
- }
-
- return e.complexity.Issue.Name(childComplexity), true
-
- case "Issue.owner":
- if e.complexity.Issue.Owner == nil {
- break
- }
-
- return e.complexity.Issue.Owner(childComplexity), true
-
- case "Issue.ownerId":
- if e.complexity.Issue.OwnerID == nil {
- break
- }
-
- return e.complexity.Issue.OwnerID(childComplexity), true
-
- case "Issue.project":
- if e.complexity.Issue.Project == nil {
- break
- }
-
- return e.complexity.Issue.Project(childComplexity), true
-
- case "Issue.projectId":
- if e.complexity.Issue.ProjectID == nil {
- break
- }
-
- return e.complexity.Issue.ProjectID(childComplexity), true
-
- case "Issue.statusName":
- if e.complexity.Issue.StatusName == nil {
- break
- }
-
- return e.complexity.Issue.StatusName(childComplexity), true
-
- case "Issue.statusStage":
- if e.complexity.Issue.StatusStage == nil {
- break
- }
-
- return e.complexity.Issue.StatusStage(childComplexity), true
-
- case "Issue.title":
- if e.complexity.Issue.Title == nil {
- break
- }
-
- return e.complexity.Issue.Title(childComplexity), true
-
- case "Issue.updatedTime":
- if e.complexity.Issue.UpdatedTime == nil {
- break
- }
-
- return e.complexity.Issue.UpdatedTime(childComplexity), true
-
- case "Mutation.loginUser":
- if e.complexity.Mutation.LoginUser == nil {
- break
- }
-
- args, err := ec.field_Mutation_loginUser_args(context.TODO(), rawArgs)
- if err != nil {
- return 0, false
- }
-
- return e.complexity.Mutation.LoginUser(childComplexity, args["input"].(*UserLoginInput)), true
-
- case "Mutation.logoutUser":
- if e.complexity.Mutation.LogoutUser == nil {
- break
- }
-
- return e.complexity.Mutation.LogoutUser(childComplexity), true
-
- case "Project.dailyPoints":
- if e.complexity.Project.DailyPoints == nil {
- break
- }
-
- return e.complexity.Project.DailyPoints(childComplexity), true
-
- case "Project.description":
- if e.complexity.Project.Description == nil {
- break
- }
-
- return e.complexity.Project.Description(childComplexity), true
-
- case "Project.id":
- if e.complexity.Project.ID == nil {
- break
- }
-
- return e.complexity.Project.ID(childComplexity), true
-
- case "Project.issues":
- if e.complexity.Project.Issues == nil {
- break
- }
-
- args, err := ec.field_Project_issues_args(context.TODO(), rawArgs)
- if err != nil {
- return 0, false
- }
-
- return e.complexity.Project.Issues(childComplexity, args["filter"].(*ProjectIssueFilter)), true
-
- case "Project.name":
- if e.complexity.Project.Name == nil {
- break
- }
-
- return e.complexity.Project.Name(childComplexity), true
-
- case "Project.permissions":
- if e.complexity.Project.Permissions == nil {
- break
- }
-
- return e.complexity.Project.Permissions(childComplexity), true
-
- case "Project.userPermissions":
- if e.complexity.Project.UserPermissions == nil {
- break
- }
-
- return e.complexity.Project.UserPermissions(childComplexity), true
-
- case "ProjectPermissions.accessLevel":
- if e.complexity.ProjectPermissions.AccessLevel == nil {
- break
- }
-
- return e.complexity.ProjectPermissions.AccessLevel(childComplexity), true
-
- case "ProjectPermissions.user":
- if e.complexity.ProjectPermissions.User == nil {
- break
- }
-
- return e.complexity.ProjectPermissions.User(childComplexity), true
-
- case "ProjectPermissions.userId":
- if e.complexity.ProjectPermissions.UserID == nil {
- break
- }
-
- return e.complexity.ProjectPermissions.UserID(childComplexity), true
-
- case "ProjectStatus.description":
- if e.complexity.ProjectStatus.Description == nil {
- break
- }
-
- return e.complexity.ProjectStatus.Description(childComplexity), true
-
- case "ProjectStatus.name":
- if e.complexity.ProjectStatus.Name == nil {
- break
- }
-
- return e.complexity.ProjectStatus.Name(childComplexity), true
-
- case "ProjectStatus.stage":
- if e.complexity.ProjectStatus.Stage == nil {
- break
- }
-
- return e.complexity.ProjectStatus.Stage(childComplexity), true
-
- case "Query.issue":
- if e.complexity.Query.Issue == nil {
- break
- }
-
- args, err := ec.field_Query_issue_args(context.TODO(), rawArgs)
- if err != nil {
- return 0, false
- }
-
- return e.complexity.Query.Issue(childComplexity, args["id"].(string)), true
-
- case "Query.issues":
- if e.complexity.Query.Issues == nil {
- break
- }
-
- args, err := ec.field_Query_issues_args(context.TODO(), rawArgs)
- if err != nil {
- return 0, false
- }
-
- return e.complexity.Query.Issues(childComplexity, args["filter"].(*models.IssueFilter)), true
-
- case "Query.project":
- if e.complexity.Query.Project == nil {
- break
- }
-
- args, err := ec.field_Query_project_args(context.TODO(), rawArgs)
- if err != nil {
- return 0, false
- }
-
- return e.complexity.Query.Project(childComplexity, args["id"].(string)), true
-
- case "Query.projects":
- if e.complexity.Query.Projects == nil {
- break
- }
-
- args, err := ec.field_Query_projects_args(context.TODO(), rawArgs)
- if err != nil {
- return 0, false
- }
-
- return e.complexity.Query.Projects(childComplexity, args["filter"].(*models.ProjectFilter)), true
-
- case "Query.session":
- if e.complexity.Query.Session == nil {
- break
- }
-
- return e.complexity.Query.Session(childComplexity), true
-
- case "User.active":
- if e.complexity.User.Active == nil {
- break
- }
-
- return e.complexity.User.Active(childComplexity), true
-
- case "User.admin":
- if e.complexity.User.Admin == nil {
- break
- }
-
- return e.complexity.User.Admin(childComplexity), true
-
- case "User.id":
- if e.complexity.User.ID == nil {
- break
- }
-
- return e.complexity.User.ID(childComplexity), true
-
- case "User.name":
- if e.complexity.User.Name == nil {
- break
- }
-
- return e.complexity.User.Name(childComplexity), true
-
- }
- return 0, false
-}
-
-func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler {
- rc := graphql.GetOperationContext(ctx)
- ec := executionContext{rc, e}
- first := true
-
- switch rc.Operation.Operation {
- case ast.Query:
- return func(ctx context.Context) *graphql.Response {
- if !first {
- return nil
- }
- first = false
- data := ec._Query(ctx, rc.Operation.SelectionSet)
- var buf bytes.Buffer
- data.MarshalGQL(&buf)
-
- return &graphql.Response{
- Data: buf.Bytes(),
- }
- }
- case ast.Mutation:
- return func(ctx context.Context) *graphql.Response {
- if !first {
- return nil
- }
- first = false
- data := ec._Mutation(ctx, rc.Operation.SelectionSet)
- 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
-}
-
-func (ec *executionContext) introspectSchema() (*introspection.Schema, error) {
- if ec.DisableIntrospection {
- return nil, errors.New("introspection disabled")
- }
- return introspection.WrapSchema(parsedSchema), nil
-}
-
-func (ec *executionContext) introspectType(name string) (*introspection.Type, error) {
- if ec.DisableIntrospection {
- return nil, errors.New("introspection disabled")
- }
- return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil
-}
-
-var sources = []*ast.Source{
- &ast.Source{Name: "schema/issue.gql", Input: `type Issue {
- id: String!
- projectId: String!
- ownerId: String!
- assigneeId: String!
- statusStage: Int!
- statusName: String!
- createdTime: Time!
- updatedTime: Time!
- dueTime: Time
- name: String!
- title: String!
- description: String!
-
- project: Project
- owner: User
- assignee: User
-}
-
-input IssueFilter {
- "Filter by issue IDs (mostly used internally by data loaders)"
- issueIds: [String!]
- "Filter by project IDs"
- projectIds: [String!]
- "Filter by owner IDs"
- ownerIds: [String!]
- "Filter by assignee IDs"
- assigneeIds: [String!]
- "Text search"
- search: String
- "Earliest stage (inclusive)"
- minStage: Int
- "Latest stage (inclusive)"
- maxStage: Int
- "Limit the result set"
- limit: Int
-}`, BuiltIn: false},
- &ast.Source{Name: "schema/mutation.gql", Input: `type Mutation {
- loginUser(input: UserLoginInput): User!
- logoutUser: User!
-}`, BuiltIn: false},
- &ast.Source{Name: "schema/project.gql", Input: `type Project {
- "The ID of the project, which is also the prefix for all its issues."
- id: String!
- "The name of the project, used in place of the ID in the UI."
- name: String!
- "Description of the project."
- description: String!
- "The amount of points given as a bonus towards goals for any activity on a given day."
- dailyPoints: Int!
-
- "Get issues within the project."
- issues(filter: ProjectIssueFilter): [Issue!]!
- "All users' permissions. Only available to administrators and up."
- permissions: [ProjectPermissions!]!
- "Own permissions to the project. Available to any logged in user."
- userPermissions: ProjectPermissions!
-}
-
-"The permissions of a user within the project."
-type ProjectPermissions {
- "User ID."
- userId: String!
- "Access level."
- accessLevel: Int!
-
- "The user whose permissions it is. Can be null if the user no longer exists."
- user: User
-}
-
-type ProjectStatus {
- "The stage of the status. 0=inactive, 1=pending, 2=active, 3=review, 4=completed, 5=failed, 6=postponed"
- stage: Int!
- "The name of the status."
- name: String!
- "A description of the status and where it's used."
- description: String!
-}
-
-"Filter for projects query"
-input ProjectFilter {
- "Project IDs"
- projectIds: [String!]
- "Text search"
- search: String
- "User permission"
- permission: ProjectFilterPermission
-}
-
-input ProjectFilterPermission {
- "User ID"
- userId: String!
- "Lowest access level to filter by (inclusive)"
- minLevel: Int!
- "Highest access level to filter by (inclusive)"
- maxLevel: Int!
-}
-
-"A limited filter for constraining the list of issues within a project."
-input ProjectIssueFilter {
- "Filter by assignee IDs"
- assigneeIds: [String!]
- "Text search"
- search: String
- "Earliest stage (inclusive)"
- minStage: Int
- "Latest stage (inclusive)"
- maxStage: Int
- "Limit the result set"
- limit: Int
-}`, BuiltIn: false},
- &ast.Source{Name: "schema/query.gql", Input: `type Query {
- "Find issue"
- issue(id: String!): Issue!
- "List issues"
- issues(filter: IssueFilter): [Issue!]!
-
- "Find project"
- project(id: String!): Project!
- "List projects"
- projects(filter: ProjectFilter): [Project!]!
-
- "Session checks the user session."
- session: User
-}`, BuiltIn: false},
- &ast.Source{Name: "schema/scalars.gql", Input: `scalar Time`, BuiltIn: false},
- &ast.Source{Name: "schema/user.gql", Input: `"User information."
-type User {
- "User ID, used when logging in."
- id: String!
- "User's display name, which can differ from the user ID."
- name: String!
- "Whether the user is active."
- active: Boolean!
- "Whether the user has general administrator privileges. This does not grant admin rights on any project."
- admin: Boolean!
-}
-
-"Input for loginUser."
-input UserLoginInput {
- userId: String!
- password: String!
- rememberMe: Boolean!
-}
-`, BuiltIn: false},
-}
-var parsedSchema = gqlparser.MustLoadSchema(sources...)
-
-// endregion ************************** generated!.gotpl **************************
-
-// region ***************************** args.gotpl *****************************
-
-func (ec *executionContext) field_Mutation_loginUser_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
- var err error
- args := map[string]interface{}{}
- var arg0 *UserLoginInput
- if tmp, ok := rawArgs["input"]; ok {
- arg0, err = ec.unmarshalOUserLoginInput2ᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋgraphᚋgraphcoreᚐUserLoginInput(ctx, tmp)
- if err != nil {
- return nil, err
- }
- }
- args["input"] = arg0
- return args, nil
-}
-
-func (ec *executionContext) field_Project_issues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
- var err error
- args := map[string]interface{}{}
- var arg0 *ProjectIssueFilter
- if tmp, ok := rawArgs["filter"]; ok {
- arg0, err = ec.unmarshalOProjectIssueFilter2ᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋgraphᚋgraphcoreᚐProjectIssueFilter(ctx, tmp)
- if err != nil {
- return nil, err
- }
- }
- args["filter"] = arg0
- return args, nil
-}
-
-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 {
- arg0, err = ec.unmarshalNString2string(ctx, tmp)
- if err != nil {
- return nil, err
- }
- }
- args["name"] = arg0
- return args, nil
-}
-
-func (ec *executionContext) field_Query_issue_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 {
- arg0, err = ec.unmarshalNString2string(ctx, tmp)
- if err != nil {
- return nil, err
- }
- }
- args["id"] = arg0
- return args, nil
-}
-
-func (ec *executionContext) field_Query_issues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
- var err error
- args := map[string]interface{}{}
- var arg0 *models.IssueFilter
- if tmp, ok := rawArgs["filter"]; ok {
- arg0, err = ec.unmarshalOIssueFilter2ᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐIssueFilter(ctx, tmp)
- if err != nil {
- return nil, err
- }
- }
- args["filter"] = arg0
- return args, nil
-}
-
-func (ec *executionContext) field_Query_project_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 {
- arg0, err = ec.unmarshalNString2string(ctx, tmp)
- if err != nil {
- return nil, err
- }
- }
- args["id"] = arg0
- return args, nil
-}
-
-func (ec *executionContext) field_Query_projects_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
- var err error
- args := map[string]interface{}{}
- var arg0 *models.ProjectFilter
- if tmp, ok := rawArgs["filter"]; ok {
- arg0, err = ec.unmarshalOProjectFilter2ᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐProjectFilter(ctx, tmp)
- if err != nil {
- return nil, err
- }
- }
- args["filter"] = 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 {
- arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)
- if err != nil {
- return nil, err
- }
- }
- args["includeDeprecated"] = arg0
- return args, nil
-}
-
-func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
- var err error
- args := map[string]interface{}{}
- var arg0 bool
- if tmp, ok := rawArgs["includeDeprecated"]; ok {
- arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)
- if err != nil {
- return nil, err
- }
- }
- args["includeDeprecated"] = arg0
- return args, nil
-}
-
-// endregion ***************************** args.gotpl *****************************
-
-// region ************************** directives.gotpl **************************
-
-// endregion ************************** directives.gotpl **************************
-
-// region **************************** field.gotpl *****************************
-
-func (ec *executionContext) _Issue_id(ctx context.Context, field graphql.CollectedField, obj *models.Issue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Issue",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.ID, nil
- })
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
- 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) _Issue_projectId(ctx context.Context, field graphql.CollectedField, obj *models.Issue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Issue",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.ProjectID, 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) _Issue_ownerId(ctx context.Context, field graphql.CollectedField, obj *models.Issue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Issue",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.OwnerID, 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) _Issue_assigneeId(ctx context.Context, field graphql.CollectedField, obj *models.Issue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Issue",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.AssigneeID, 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) _Issue_statusStage(ctx context.Context, field graphql.CollectedField, obj *models.Issue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Issue",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.StatusStage, 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.(int)
- fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Issue_statusName(ctx context.Context, field graphql.CollectedField, obj *models.Issue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Issue",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.StatusName, 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) _Issue_createdTime(ctx context.Context, field graphql.CollectedField, obj *models.Issue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Issue",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.CreatedTime, 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.(time.Time)
- fc.Result = res
- return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Issue_updatedTime(ctx context.Context, field graphql.CollectedField, obj *models.Issue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Issue",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.UpdatedTime, 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.(time.Time)
- fc.Result = res
- return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Issue_dueTime(ctx context.Context, field graphql.CollectedField, obj *models.Issue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Issue",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.DueTime, nil
- })
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
- return graphql.Null
- }
- res := resTmp.(time.Time)
- fc.Result = res
- return ec.marshalOTime2timeᚐTime(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Issue_name(ctx context.Context, field graphql.CollectedField, obj *models.Issue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Issue",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.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) _Issue_title(ctx context.Context, field graphql.CollectedField, obj *models.Issue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Issue",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Title, nil
- })
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
- 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) _Issue_description(ctx context.Context, field graphql.CollectedField, obj *models.Issue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Issue",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Description, 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) _Issue_project(ctx context.Context, field graphql.CollectedField, obj *models.Issue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Issue",
- Field: field,
- Args: nil,
- IsMethod: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Issue().Project(rctx, obj)
- })
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
- return graphql.Null
- }
- res := resTmp.(*models.Project)
- fc.Result = res
- return ec.marshalOProject2ᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐProject(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Issue_owner(ctx context.Context, field graphql.CollectedField, obj *models.Issue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Issue",
- Field: field,
- Args: nil,
- IsMethod: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Issue().Owner(rctx, obj)
- })
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
- return graphql.Null
- }
- res := resTmp.(*models.User)
- fc.Result = res
- return ec.marshalOUser2ᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐUser(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Issue_assignee(ctx context.Context, field graphql.CollectedField, obj *models.Issue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Issue",
- Field: field,
- Args: nil,
- IsMethod: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Issue().Assignee(rctx, obj)
- })
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
- return graphql.Null
- }
- res := resTmp.(*models.User)
- fc.Result = res
- return ec.marshalOUser2ᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐUser(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Mutation_loginUser(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
- Field: field,
- Args: nil,
- IsMethod: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_loginUser_args(ctx, rawArgs)
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- fc.Args = args
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().LoginUser(rctx, args["input"].(*UserLoginInput))
- })
- 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.(*models.User)
- fc.Result = res
- return ec.marshalNUser2ᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐUser(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Mutation_logoutUser(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
- Field: field,
- Args: nil,
- IsMethod: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().LogoutUser(rctx)
- })
- 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.(*models.User)
- fc.Result = res
- return ec.marshalNUser2ᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐUser(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Project_id(ctx context.Context, field graphql.CollectedField, obj *models.Project) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Project",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.ID, nil
- })
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
- 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) _Project_name(ctx context.Context, field graphql.CollectedField, obj *models.Project) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Project",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.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) _Project_description(ctx context.Context, field graphql.CollectedField, obj *models.Project) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Project",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Description, 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) _Project_dailyPoints(ctx context.Context, field graphql.CollectedField, obj *models.Project) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Project",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.DailyPoints, 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.(int)
- fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Project_issues(ctx context.Context, field graphql.CollectedField, obj *models.Project) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Project",
- Field: field,
- Args: nil,
- IsMethod: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Project_issues_args(ctx, rawArgs)
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- fc.Args = args
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Project().Issues(rctx, obj, args["filter"].(*ProjectIssueFilter))
- })
- 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.([]*models.Issue)
- fc.Result = res
- return ec.marshalNIssue2ᚕᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐIssueᚄ(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Project_permissions(ctx context.Context, field graphql.CollectedField, obj *models.Project) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Project",
- Field: field,
- Args: nil,
- IsMethod: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Project().Permissions(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.([]*ProjectPermissions)
- fc.Result = res
- return ec.marshalNProjectPermissions2ᚕᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋgraphᚋgraphcoreᚐProjectPermissionsᚄ(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Project_userPermissions(ctx context.Context, field graphql.CollectedField, obj *models.Project) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Project",
- Field: field,
- Args: nil,
- IsMethod: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Project().UserPermissions(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.(*ProjectPermissions)
- fc.Result = res
- return ec.marshalNProjectPermissions2ᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋgraphᚋgraphcoreᚐProjectPermissions(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _ProjectPermissions_userId(ctx context.Context, field graphql.CollectedField, obj *ProjectPermissions) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ProjectPermissions",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.UserID, 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) _ProjectPermissions_accessLevel(ctx context.Context, field graphql.CollectedField, obj *ProjectPermissions) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ProjectPermissions",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.AccessLevel, 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.(int)
- fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _ProjectPermissions_user(ctx context.Context, field graphql.CollectedField, obj *ProjectPermissions) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ProjectPermissions",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.User, nil
- })
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
- return graphql.Null
- }
- res := resTmp.(*models.User)
- fc.Result = res
- return ec.marshalOUser2ᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐUser(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _ProjectStatus_stage(ctx context.Context, field graphql.CollectedField, obj *models.ProjectStatus) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ProjectStatus",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Stage, 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.(int)
- fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _ProjectStatus_name(ctx context.Context, field graphql.CollectedField, obj *models.ProjectStatus) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ProjectStatus",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.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) _ProjectStatus_description(ctx context.Context, field graphql.CollectedField, obj *models.ProjectStatus) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ProjectStatus",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Description, 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) _Query_issue(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query_issue_args(ctx, rawArgs)
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- fc.Args = args
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().Issue(rctx, args["id"].(string))
- })
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
- return graphql.Null
- }
- res := resTmp.(*models.Issue)
- fc.Result = res
- return ec.marshalNIssue2ᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐIssue(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Query_issues(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query_issues_args(ctx, rawArgs)
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- fc.Args = args
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().Issues(rctx, args["filter"].(*models.IssueFilter))
- })
- 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.([]*models.Issue)
- fc.Result = res
- return ec.marshalNIssue2ᚕᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐIssueᚄ(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Query_project(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query_project_args(ctx, rawArgs)
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- fc.Args = args
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().Project(rctx, args["id"].(string))
- })
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
- return graphql.Null
- }
- res := resTmp.(*models.Project)
- fc.Result = res
- return ec.marshalNProject2ᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐProject(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Query_projects(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query_projects_args(ctx, rawArgs)
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- fc.Args = args
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().Projects(rctx, args["filter"].(*models.ProjectFilter))
- })
- 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.([]*models.Project)
- fc.Result = res
- return ec.marshalNProject2ᚕᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐProjectᚄ(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Query_session(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().Session(rctx)
- })
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
- return graphql.Null
- }
- res := resTmp.(*models.User)
- fc.Result = res
- return ec.marshalOUser2ᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐUser(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query___type_args(ctx, rawArgs)
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- fc.Args = args
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.introspectType(args["name"].(string))
- })
- 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) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.introspectSchema()
- })
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
- return graphql.Null
- }
- res := resTmp.(*introspection.Schema)
- fc.Result = res
- return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _User_id(ctx context.Context, field graphql.CollectedField, obj *models.User) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "User",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.ID, nil
- })
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
- 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) _User_name(ctx context.Context, field graphql.CollectedField, obj *models.User) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "User",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.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) _User_active(ctx context.Context, field graphql.CollectedField, obj *models.User) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "User",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Active, 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) _User_admin(ctx context.Context, field graphql.CollectedField, obj *models.User) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "User",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Admin, 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) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Directive",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.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) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Directive",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.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.marshalOString2string(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Directive",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.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) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Directive",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.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) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__EnumValue",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.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) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__EnumValue",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.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.marshalOString2string(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__EnumValue",
- Field: field,
- Args: nil,
- IsMethod: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return 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) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__EnumValue",
- Field: field,
- Args: nil,
- IsMethod: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return 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) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Field",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.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) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Field",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.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.marshalOString2string(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Field",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.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) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Field",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.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) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Field",
- Field: field,
- Args: nil,
- IsMethod: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return 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) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Field",
- Field: field,
- Args: nil,
- IsMethod: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return 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) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__InputValue",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.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) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__InputValue",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.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.marshalOString2string(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__InputValue",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.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) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__InputValue",
- Field: field,
- Args: nil,
- IsMethod: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.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) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Schema",
- Field: field,
- Args: nil,
- IsMethod: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return 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) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Schema",
- Field: field,
- Args: nil,
- IsMethod: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.QueryType(), 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) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Schema",
- Field: field,
- Args: nil,
- IsMethod: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return 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) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Schema",
- Field: field,
- Args: nil,
- IsMethod: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return 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) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Schema",
- Field: field,
- Args: nil,
- IsMethod: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return 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) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Type",
- Field: field,
- Args: nil,
- IsMethod: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return 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) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Type",
- Field: field,
- Args: nil,
- IsMethod: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return 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) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Type",
- Field: field,
- Args: nil,
- IsMethod: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return 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.marshalOString2string(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Type",
- Field: field,
- Args: nil,
- IsMethod: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field___Type_fields_args(ctx, rawArgs)
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- fc.Args = args
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Fields(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) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Type",
- Field: field,
- Args: nil,
- IsMethod: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return 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) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Type",
- Field: field,
- Args: nil,
- IsMethod: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return 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) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Type",
- Field: field,
- Args: nil,
- IsMethod: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field___Type_enumValues_args(ctx, rawArgs)
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- fc.Args = args
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.EnumValues(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) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Type",
- Field: field,
- Args: nil,
- IsMethod: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return 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) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Type",
- Field: field,
- Args: nil,
- IsMethod: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return 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)
-}
-
-// endregion **************************** field.gotpl *****************************
-
-// region **************************** input.gotpl *****************************
-
-func (ec *executionContext) unmarshalInputIssueFilter(ctx context.Context, obj interface{}) (models.IssueFilter, error) {
- var it models.IssueFilter
- var asMap = obj.(map[string]interface{})
-
- for k, v := range asMap {
- switch k {
- case "issueIds":
- var err error
- it.IssueIDs, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v)
- if err != nil {
- return it, err
- }
- case "projectIds":
- var err error
- it.ProjectIDs, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v)
- if err != nil {
- return it, err
- }
- case "ownerIds":
- var err error
- it.OwnerIDs, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v)
- if err != nil {
- return it, err
- }
- case "assigneeIds":
- var err error
- it.AssigneeIDs, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v)
- if err != nil {
- return it, err
- }
- case "search":
- var err error
- it.Search, err = ec.unmarshalOString2ᚖstring(ctx, v)
- if err != nil {
- return it, err
- }
- case "minStage":
- var err error
- it.MinStage, err = ec.unmarshalOInt2ᚖint(ctx, v)
- if err != nil {
- return it, err
- }
- case "maxStage":
- var err error
- it.MaxStage, err = ec.unmarshalOInt2ᚖint(ctx, v)
- if err != nil {
- return it, err
- }
- case "limit":
- var err error
- it.Limit, err = ec.unmarshalOInt2ᚖint(ctx, v)
- if err != nil {
- return it, err
- }
- }
- }
-
- return it, nil
-}
-
-func (ec *executionContext) unmarshalInputProjectFilter(ctx context.Context, obj interface{}) (models.ProjectFilter, error) {
- var it models.ProjectFilter
- var asMap = obj.(map[string]interface{})
-
- for k, v := range asMap {
- switch k {
- case "projectIds":
- var err error
- it.ProjectIDs, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v)
- if err != nil {
- return it, err
- }
- case "search":
- var err error
- it.Search, err = ec.unmarshalOString2ᚖstring(ctx, v)
- if err != nil {
- return it, err
- }
- case "permission":
- var err error
- it.Permission, err = ec.unmarshalOProjectFilterPermission2ᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐProjectFilterPermission(ctx, v)
- if err != nil {
- return it, err
- }
- }
- }
-
- return it, nil
-}
-
-func (ec *executionContext) unmarshalInputProjectFilterPermission(ctx context.Context, obj interface{}) (models.ProjectFilterPermission, error) {
- var it models.ProjectFilterPermission
- var asMap = obj.(map[string]interface{})
-
- for k, v := range asMap {
- switch k {
- case "userId":
- var err error
- it.UserID, err = ec.unmarshalNString2string(ctx, v)
- if err != nil {
- return it, err
- }
- case "minLevel":
- var err error
- it.MinLevel, err = ec.unmarshalNInt2int(ctx, v)
- if err != nil {
- return it, err
- }
- case "maxLevel":
- var err error
- it.MaxLevel, err = ec.unmarshalNInt2int(ctx, v)
- if err != nil {
- return it, err
- }
- }
- }
-
- return it, nil
-}
-
-func (ec *executionContext) unmarshalInputProjectIssueFilter(ctx context.Context, obj interface{}) (ProjectIssueFilter, error) {
- var it ProjectIssueFilter
- var asMap = obj.(map[string]interface{})
-
- for k, v := range asMap {
- switch k {
- case "assigneeIds":
- var err error
- it.AssigneeIds, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v)
- if err != nil {
- return it, err
- }
- case "search":
- var err error
- it.Search, err = ec.unmarshalOString2ᚖstring(ctx, v)
- if err != nil {
- return it, err
- }
- case "minStage":
- var err error
- it.MinStage, err = ec.unmarshalOInt2ᚖint(ctx, v)
- if err != nil {
- return it, err
- }
- case "maxStage":
- var err error
- it.MaxStage, err = ec.unmarshalOInt2ᚖint(ctx, v)
- if err != nil {
- return it, err
- }
- case "limit":
- var err error
- it.Limit, err = ec.unmarshalOInt2ᚖint(ctx, v)
- if err != nil {
- return it, err
- }
- }
- }
-
- return it, nil
-}
-
-func (ec *executionContext) unmarshalInputUserLoginInput(ctx context.Context, obj interface{}) (UserLoginInput, error) {
- var it UserLoginInput
- var asMap = obj.(map[string]interface{})
-
- for k, v := range asMap {
- switch k {
- case "userId":
- var err error
- it.UserID, err = ec.unmarshalNString2string(ctx, v)
- if err != nil {
- return it, err
- }
- case "password":
- var err error
- it.Password, err = ec.unmarshalNString2string(ctx, v)
- if err != nil {
- return it, err
- }
- case "rememberMe":
- var err error
- it.RememberMe, err = ec.unmarshalNBoolean2bool(ctx, v)
- if err != nil {
- return it, err
- }
- }
- }
-
- return it, nil
-}
-
-// endregion **************************** input.gotpl *****************************
-
-// region ************************** interface.gotpl ***************************
-
-// endregion ************************** interface.gotpl ***************************
-
-// region **************************** object.gotpl ****************************
-
-var issueImplementors = []string{"Issue"}
-
-func (ec *executionContext) _Issue(ctx context.Context, sel ast.SelectionSet, obj *models.Issue) graphql.Marshaler {
- fields := graphql.CollectFields(ec.OperationContext, sel, issueImplementors)
-
- out := graphql.NewFieldSet(fields)
- var invalids uint32
- for i, field := range fields {
- switch field.Name {
- case "__typename":
- out.Values[i] = graphql.MarshalString("Issue")
- case "id":
- out.Values[i] = ec._Issue_id(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "projectId":
- out.Values[i] = ec._Issue_projectId(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "ownerId":
- out.Values[i] = ec._Issue_ownerId(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "assigneeId":
- out.Values[i] = ec._Issue_assigneeId(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "statusStage":
- out.Values[i] = ec._Issue_statusStage(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "statusName":
- out.Values[i] = ec._Issue_statusName(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "createdTime":
- out.Values[i] = ec._Issue_createdTime(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "updatedTime":
- out.Values[i] = ec._Issue_updatedTime(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "dueTime":
- out.Values[i] = ec._Issue_dueTime(ctx, field, obj)
- case "name":
- out.Values[i] = ec._Issue_name(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "title":
- out.Values[i] = ec._Issue_title(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "description":
- out.Values[i] = ec._Issue_description(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "project":
- field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- }
- }()
- res = ec._Issue_project(ctx, field, obj)
- return res
- })
- case "owner":
- field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- }
- }()
- res = ec._Issue_owner(ctx, field, obj)
- return res
- })
- case "assignee":
- field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- }
- }()
- res = ec._Issue_assignee(ctx, field, obj)
- return res
- })
- default:
- panic("unknown field " + strconv.Quote(field.Name))
- }
- }
- out.Dispatch()
- if invalids > 0 {
- return graphql.Null
- }
- return out
-}
-
-var mutationImplementors = []string{"Mutation"}
-
-func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
- fields := graphql.CollectFields(ec.OperationContext, sel, mutationImplementors)
-
- ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
- Object: "Mutation",
- })
-
- out := graphql.NewFieldSet(fields)
- var invalids uint32
- for i, field := range fields {
- switch field.Name {
- case "__typename":
- out.Values[i] = graphql.MarshalString("Mutation")
- case "loginUser":
- out.Values[i] = ec._Mutation_loginUser(ctx, field)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "logoutUser":
- out.Values[i] = ec._Mutation_logoutUser(ctx, field)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- default:
- panic("unknown field " + strconv.Quote(field.Name))
- }
- }
- out.Dispatch()
- if invalids > 0 {
- return graphql.Null
- }
- return out
-}
-
-var projectImplementors = []string{"Project"}
-
-func (ec *executionContext) _Project(ctx context.Context, sel ast.SelectionSet, obj *models.Project) graphql.Marshaler {
- fields := graphql.CollectFields(ec.OperationContext, sel, projectImplementors)
-
- out := graphql.NewFieldSet(fields)
- var invalids uint32
- for i, field := range fields {
- switch field.Name {
- case "__typename":
- out.Values[i] = graphql.MarshalString("Project")
- case "id":
- out.Values[i] = ec._Project_id(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "name":
- out.Values[i] = ec._Project_name(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "description":
- out.Values[i] = ec._Project_description(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "dailyPoints":
- out.Values[i] = ec._Project_dailyPoints(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "issues":
- field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- }
- }()
- res = ec._Project_issues(ctx, field, obj)
- if res == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- return res
- })
- case "permissions":
- field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- }
- }()
- res = ec._Project_permissions(ctx, field, obj)
- if res == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- return res
- })
- case "userPermissions":
- field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- }
- }()
- res = ec._Project_userPermissions(ctx, field, obj)
- if res == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- return res
- })
- default:
- panic("unknown field " + strconv.Quote(field.Name))
- }
- }
- out.Dispatch()
- if invalids > 0 {
- return graphql.Null
- }
- return out
-}
-
-var projectPermissionsImplementors = []string{"ProjectPermissions"}
-
-func (ec *executionContext) _ProjectPermissions(ctx context.Context, sel ast.SelectionSet, obj *ProjectPermissions) graphql.Marshaler {
- fields := graphql.CollectFields(ec.OperationContext, sel, projectPermissionsImplementors)
-
- out := graphql.NewFieldSet(fields)
- var invalids uint32
- for i, field := range fields {
- switch field.Name {
- case "__typename":
- out.Values[i] = graphql.MarshalString("ProjectPermissions")
- case "userId":
- out.Values[i] = ec._ProjectPermissions_userId(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "accessLevel":
- out.Values[i] = ec._ProjectPermissions_accessLevel(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "user":
- out.Values[i] = ec._ProjectPermissions_user(ctx, field, obj)
- default:
- panic("unknown field " + strconv.Quote(field.Name))
- }
- }
- out.Dispatch()
- if invalids > 0 {
- return graphql.Null
- }
- return out
-}
-
-var projectStatusImplementors = []string{"ProjectStatus"}
-
-func (ec *executionContext) _ProjectStatus(ctx context.Context, sel ast.SelectionSet, obj *models.ProjectStatus) graphql.Marshaler {
- fields := graphql.CollectFields(ec.OperationContext, sel, projectStatusImplementors)
-
- out := graphql.NewFieldSet(fields)
- var invalids uint32
- for i, field := range fields {
- switch field.Name {
- case "__typename":
- out.Values[i] = graphql.MarshalString("ProjectStatus")
- case "stage":
- out.Values[i] = ec._ProjectStatus_stage(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "name":
- out.Values[i] = ec._ProjectStatus_name(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "description":
- out.Values[i] = ec._ProjectStatus_description(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- default:
- panic("unknown field " + strconv.Quote(field.Name))
- }
- }
- out.Dispatch()
- if invalids > 0 {
- return graphql.Null
- }
- 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)
- var invalids uint32
- for i, field := range fields {
- switch field.Name {
- case "__typename":
- out.Values[i] = graphql.MarshalString("Query")
- case "issue":
- field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- }
- }()
- res = ec._Query_issue(ctx, field)
- if res == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- return res
- })
- case "issues":
- field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- }
- }()
- res = ec._Query_issues(ctx, field)
- if res == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- return res
- })
- case "project":
- field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- }
- }()
- res = ec._Query_project(ctx, field)
- if res == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- return res
- })
- case "projects":
- field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- }
- }()
- res = ec._Query_projects(ctx, field)
- if res == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- return res
- })
- case "session":
- field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- }
- }()
- res = ec._Query_session(ctx, field)
- return res
- })
- case "__type":
- out.Values[i] = ec._Query___type(ctx, field)
- case "__schema":
- out.Values[i] = ec._Query___schema(ctx, field)
- default:
- panic("unknown field " + strconv.Quote(field.Name))
- }
- }
- out.Dispatch()
- if invalids > 0 {
- return graphql.Null
- }
- return out
-}
-
-var userImplementors = []string{"User"}
-
-func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj *models.User) graphql.Marshaler {
- fields := graphql.CollectFields(ec.OperationContext, sel, userImplementors)
-
- out := graphql.NewFieldSet(fields)
- var invalids uint32
- 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 {
- invalids++
- }
- case "name":
- out.Values[i] = ec._User_name(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "active":
- out.Values[i] = ec._User_active(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "admin":
- out.Values[i] = ec._User_admin(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- default:
- panic("unknown field " + strconv.Quote(field.Name))
- }
- }
- out.Dispatch()
- if invalids > 0 {
- return graphql.Null
- }
- 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)
- var invalids uint32
- 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 {
- 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 {
- invalids++
- }
- case "args":
- out.Values[i] = ec.___Directive_args(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- default:
- panic("unknown field " + strconv.Quote(field.Name))
- }
- }
- out.Dispatch()
- if invalids > 0 {
- return graphql.Null
- }
- 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)
- var invalids uint32
- 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 {
- 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 {
- invalids++
- }
- case "deprecationReason":
- out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj)
- default:
- panic("unknown field " + strconv.Quote(field.Name))
- }
- }
- out.Dispatch()
- if invalids > 0 {
- return graphql.Null
- }
- 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)
- var invalids uint32
- 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 {
- 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 {
- invalids++
- }
- case "type":
- out.Values[i] = ec.___Field_type(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "isDeprecated":
- out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "deprecationReason":
- out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj)
- default:
- panic("unknown field " + strconv.Quote(field.Name))
- }
- }
- out.Dispatch()
- if invalids > 0 {
- return graphql.Null
- }
- 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)
- var invalids uint32
- 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 {
- 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 {
- invalids++
- }
- case "defaultValue":
- out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj)
- default:
- panic("unknown field " + strconv.Quote(field.Name))
- }
- }
- out.Dispatch()
- if invalids > 0 {
- return graphql.Null
- }
- 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)
- var invalids uint32
- for i, field := range fields {
- switch field.Name {
- case "__typename":
- out.Values[i] = graphql.MarshalString("__Schema")
- case "types":
- out.Values[i] = ec.___Schema_types(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "queryType":
- out.Values[i] = ec.___Schema_queryType(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- 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 {
- invalids++
- }
- default:
- panic("unknown field " + strconv.Quote(field.Name))
- }
- }
- out.Dispatch()
- if invalids > 0 {
- return graphql.Null
- }
- 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)
- var invalids uint32
- 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 {
- 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)
- default:
- panic("unknown field " + strconv.Quote(field.Name))
- }
- }
- out.Dispatch()
- if invalids > 0 {
- return graphql.Null
- }
- return out
-}
-
-// endregion **************************** object.gotpl ****************************
-
-// region ***************************** type.gotpl *****************************
-
-func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) {
- return graphql.UnmarshalBoolean(v)
-}
-
-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, "must not be null")
- }
- }
- return res
-}
-
-func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{}) (int, error) {
- return graphql.UnmarshalInt(v)
-}
-
-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, "must not be null")
- }
- }
- return res
-}
-
-func (ec *executionContext) marshalNIssue2gitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐIssue(ctx context.Context, sel ast.SelectionSet, v models.Issue) graphql.Marshaler {
- return ec._Issue(ctx, sel, &v)
-}
-
-func (ec *executionContext) marshalNIssue2ᚕᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐIssueᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.Issue) 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.marshalNIssue2ᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐIssue(ctx, sel, v[i])
- }
- if isLen1 {
- f(i)
- } else {
- go f(i)
- }
-
- }
- wg.Wait()
- return ret
-}
-
-func (ec *executionContext) marshalNIssue2ᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐIssue(ctx context.Context, sel ast.SelectionSet, v *models.Issue) graphql.Marshaler {
- if v == nil {
- if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
- }
- return graphql.Null
- }
- return ec._Issue(ctx, sel, v)
-}
-
-func (ec *executionContext) marshalNProject2gitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐProject(ctx context.Context, sel ast.SelectionSet, v models.Project) graphql.Marshaler {
- return ec._Project(ctx, sel, &v)
-}
-
-func (ec *executionContext) marshalNProject2ᚕᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐProjectᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.Project) 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.marshalNProject2ᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐProject(ctx, sel, v[i])
- }
- if isLen1 {
- f(i)
- } else {
- go f(i)
- }
-
- }
- wg.Wait()
- return ret
-}
-
-func (ec *executionContext) marshalNProject2ᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐProject(ctx context.Context, sel ast.SelectionSet, v *models.Project) graphql.Marshaler {
- if v == nil {
- if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
- }
- return graphql.Null
- }
- return ec._Project(ctx, sel, v)
-}
-
-func (ec *executionContext) marshalNProjectPermissions2gitᚗaiterpᚗnetᚋxiaoliᚋserverᚋgraphᚋgraphcoreᚐProjectPermissions(ctx context.Context, sel ast.SelectionSet, v ProjectPermissions) graphql.Marshaler {
- return ec._ProjectPermissions(ctx, sel, &v)
-}
-
-func (ec *executionContext) marshalNProjectPermissions2ᚕᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋgraphᚋgraphcoreᚐProjectPermissionsᚄ(ctx context.Context, sel ast.SelectionSet, v []*ProjectPermissions) 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.marshalNProjectPermissions2ᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋgraphᚋgraphcoreᚐProjectPermissions(ctx, sel, v[i])
- }
- if isLen1 {
- f(i)
- } else {
- go f(i)
- }
-
- }
- wg.Wait()
- return ret
-}
-
-func (ec *executionContext) marshalNProjectPermissions2ᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋgraphᚋgraphcoreᚐProjectPermissions(ctx context.Context, sel ast.SelectionSet, v *ProjectPermissions) graphql.Marshaler {
- if v == nil {
- if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
- }
- return graphql.Null
- }
- return ec._ProjectPermissions(ctx, sel, v)
-}
-
-func (ec *executionContext) unmarshalNString2string(ctx context.Context, v interface{}) (string, error) {
- return graphql.UnmarshalString(v)
-}
-
-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, "must not be null")
- }
- }
- return res
-}
-
-func (ec *executionContext) unmarshalNTime2timeᚐTime(ctx context.Context, v interface{}) (time.Time, error) {
- return graphql.UnmarshalTime(v)
-}
-
-func (ec *executionContext) marshalNTime2timeᚐTime(ctx context.Context, sel ast.SelectionSet, v time.Time) graphql.Marshaler {
- res := graphql.MarshalTime(v)
- if res == graphql.Null {
- if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
- }
- }
- return res
-}
-
-func (ec *executionContext) marshalNUser2gitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐUser(ctx context.Context, sel ast.SelectionSet, v models.User) graphql.Marshaler {
- return ec._User(ctx, sel, &v)
-}
-
-func (ec *executionContext) marshalNUser2ᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐUser(ctx context.Context, sel ast.SelectionSet, v *models.User) graphql.Marshaler {
- if v == nil {
- if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
- }
- 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()
- return ret
-}
-
-func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Context, v interface{}) (string, error) {
- return graphql.UnmarshalString(v)
-}
-
-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, "must not be null")
- }
- }
- return res
-}
-
-func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) {
- var vSlice []interface{}
- if v != nil {
- if tmp1, ok := v.([]interface{}); ok {
- vSlice = tmp1
- } else {
- vSlice = []interface{}{v}
- }
- }
- var err error
- res := make([]string, len(vSlice))
- for i := range vSlice {
- 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()
- 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()
- 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()
- 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, "must not be null")
- }
- return graphql.Null
- }
- return ec.___Type(ctx, sel, v)
-}
-
-func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v interface{}) (string, error) {
- return graphql.UnmarshalString(v)
-}
-
-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, "must not be null")
- }
- }
- return res
-}
-
-func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) {
- return graphql.UnmarshalBoolean(v)
-}
-
-func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler {
- return graphql.MarshalBoolean(v)
-}
-
-func (ec *executionContext) unmarshalOBoolean2ᚖbool(ctx context.Context, v interface{}) (*bool, error) {
- if v == nil {
- return nil, nil
- }
- res, err := ec.unmarshalOBoolean2bool(ctx, v)
- return &res, err
-}
-
-func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler {
- if v == nil {
- return graphql.Null
- }
- return ec.marshalOBoolean2bool(ctx, sel, *v)
-}
-
-func (ec *executionContext) unmarshalOInt2int(ctx context.Context, v interface{}) (int, error) {
- return graphql.UnmarshalInt(v)
-}
-
-func (ec *executionContext) marshalOInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler {
- return graphql.MarshalInt(v)
-}
-
-func (ec *executionContext) unmarshalOInt2ᚖint(ctx context.Context, v interface{}) (*int, error) {
- if v == nil {
- return nil, nil
- }
- res, err := ec.unmarshalOInt2int(ctx, v)
- return &res, err
-}
-
-func (ec *executionContext) marshalOInt2ᚖint(ctx context.Context, sel ast.SelectionSet, v *int) graphql.Marshaler {
- if v == nil {
- return graphql.Null
- }
- return ec.marshalOInt2int(ctx, sel, *v)
-}
-
-func (ec *executionContext) unmarshalOIssueFilter2gitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐIssueFilter(ctx context.Context, v interface{}) (models.IssueFilter, error) {
- return ec.unmarshalInputIssueFilter(ctx, v)
-}
-
-func (ec *executionContext) unmarshalOIssueFilter2ᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐIssueFilter(ctx context.Context, v interface{}) (*models.IssueFilter, error) {
- if v == nil {
- return nil, nil
- }
- res, err := ec.unmarshalOIssueFilter2gitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐIssueFilter(ctx, v)
- return &res, err
-}
-
-func (ec *executionContext) marshalOProject2gitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐProject(ctx context.Context, sel ast.SelectionSet, v models.Project) graphql.Marshaler {
- return ec._Project(ctx, sel, &v)
-}
-
-func (ec *executionContext) marshalOProject2ᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐProject(ctx context.Context, sel ast.SelectionSet, v *models.Project) graphql.Marshaler {
- if v == nil {
- return graphql.Null
- }
- return ec._Project(ctx, sel, v)
-}
-
-func (ec *executionContext) unmarshalOProjectFilter2gitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐProjectFilter(ctx context.Context, v interface{}) (models.ProjectFilter, error) {
- return ec.unmarshalInputProjectFilter(ctx, v)
-}
-
-func (ec *executionContext) unmarshalOProjectFilter2ᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐProjectFilter(ctx context.Context, v interface{}) (*models.ProjectFilter, error) {
- if v == nil {
- return nil, nil
- }
- res, err := ec.unmarshalOProjectFilter2gitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐProjectFilter(ctx, v)
- return &res, err
-}
-
-func (ec *executionContext) unmarshalOProjectFilterPermission2gitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐProjectFilterPermission(ctx context.Context, v interface{}) (models.ProjectFilterPermission, error) {
- return ec.unmarshalInputProjectFilterPermission(ctx, v)
-}
-
-func (ec *executionContext) unmarshalOProjectFilterPermission2ᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐProjectFilterPermission(ctx context.Context, v interface{}) (*models.ProjectFilterPermission, error) {
- if v == nil {
- return nil, nil
- }
- res, err := ec.unmarshalOProjectFilterPermission2gitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐProjectFilterPermission(ctx, v)
- return &res, err
-}
-
-func (ec *executionContext) unmarshalOProjectIssueFilter2gitᚗaiterpᚗnetᚋxiaoliᚋserverᚋgraphᚋgraphcoreᚐProjectIssueFilter(ctx context.Context, v interface{}) (ProjectIssueFilter, error) {
- return ec.unmarshalInputProjectIssueFilter(ctx, v)
-}
-
-func (ec *executionContext) unmarshalOProjectIssueFilter2ᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋgraphᚋgraphcoreᚐProjectIssueFilter(ctx context.Context, v interface{}) (*ProjectIssueFilter, error) {
- if v == nil {
- return nil, nil
- }
- res, err := ec.unmarshalOProjectIssueFilter2gitᚗaiterpᚗnetᚋxiaoliᚋserverᚋgraphᚋgraphcoreᚐProjectIssueFilter(ctx, v)
- return &res, err
-}
-
-func (ec *executionContext) unmarshalOString2string(ctx context.Context, v interface{}) (string, error) {
- return graphql.UnmarshalString(v)
-}
-
-func (ec *executionContext) marshalOString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
- return graphql.MarshalString(v)
-}
-
-func (ec *executionContext) unmarshalOString2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) {
- var vSlice []interface{}
- if v != nil {
- if tmp1, ok := v.([]interface{}); ok {
- vSlice = tmp1
- } else {
- vSlice = []interface{}{v}
- }
- }
- var err error
- res := make([]string, len(vSlice))
- for i := range vSlice {
- res[i], err = ec.unmarshalNString2string(ctx, vSlice[i])
- if err != nil {
- return nil, err
- }
- }
- return res, nil
-}
-
-func (ec *executionContext) marshalOString2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler {
- if v == nil {
- return graphql.Null
- }
- ret := make(graphql.Array, len(v))
- for i := range v {
- ret[i] = ec.marshalNString2string(ctx, sel, v[i])
- }
-
- return ret
-}
-
-func (ec *executionContext) unmarshalOString2ᚖstring(ctx context.Context, v interface{}) (*string, error) {
- if v == nil {
- return nil, nil
- }
- res, err := ec.unmarshalOString2string(ctx, v)
- return &res, err
-}
-
-func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler {
- if v == nil {
- return graphql.Null
- }
- return ec.marshalOString2string(ctx, sel, *v)
-}
-
-func (ec *executionContext) unmarshalOTime2timeᚐTime(ctx context.Context, v interface{}) (time.Time, error) {
- return graphql.UnmarshalTime(v)
-}
-
-func (ec *executionContext) marshalOTime2timeᚐTime(ctx context.Context, sel ast.SelectionSet, v time.Time) graphql.Marshaler {
- return graphql.MarshalTime(v)
-}
-
-func (ec *executionContext) marshalOUser2gitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐUser(ctx context.Context, sel ast.SelectionSet, v models.User) graphql.Marshaler {
- return ec._User(ctx, sel, &v)
-}
-
-func (ec *executionContext) marshalOUser2ᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋmodelsᚐUser(ctx context.Context, sel ast.SelectionSet, v *models.User) graphql.Marshaler {
- if v == nil {
- return graphql.Null
- }
- return ec._User(ctx, sel, v)
-}
-
-func (ec *executionContext) unmarshalOUserLoginInput2gitᚗaiterpᚗnetᚋxiaoliᚋserverᚋgraphᚋgraphcoreᚐUserLoginInput(ctx context.Context, v interface{}) (UserLoginInput, error) {
- return ec.unmarshalInputUserLoginInput(ctx, v)
-}
-
-func (ec *executionContext) unmarshalOUserLoginInput2ᚖgitᚗaiterpᚗnetᚋxiaoliᚋserverᚋgraphᚋgraphcoreᚐUserLoginInput(ctx context.Context, v interface{}) (*UserLoginInput, error) {
- if v == nil {
- return nil, nil
- }
- res, err := ec.unmarshalOUserLoginInput2gitᚗaiterpᚗnetᚋxiaoliᚋserverᚋgraphᚋgraphcoreᚐUserLoginInput(ctx, v)
- return &res, err
-}
-
-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()
- 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()
- 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()
- return ret
-}
-
-func (ec *executionContext) marshalO__Schema2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v introspection.Schema) graphql.Marshaler {
- return ec.___Schema(ctx, sel, &v)
-}
-
-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__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) 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()
- 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 *****************************
diff --git a/graph/graphcore/input_gen.go b/graph/graphcore/input_gen.go
deleted file mode 100644
index 616ad50..0000000
--- a/graph/graphcore/input_gen.go
+++ /dev/null
@@ -1,38 +0,0 @@
-// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
-
-package graphcore
-
-import (
- "git.aiterp.net/stufflog/server/models"
-)
-
-// A limited filter for constraining the list of issues within a project.
-type ProjectIssueFilter struct {
- // Filter by assignee IDs
- AssigneeIds []string `json:"assigneeIds"`
- // Text search
- Search *string `json:"search"`
- // Earliest stage (inclusive)
- MinStage *int `json:"minStage"`
- // Latest stage (inclusive)
- MaxStage *int `json:"maxStage"`
- // Limit the result set
- Limit *int `json:"limit"`
-}
-
-// The permissions of a user within the project.
-type ProjectPermissions struct {
- // User ID.
- UserID string `json:"userId"`
- // Access level.
- AccessLevel int `json:"accessLevel"`
- // The user whose permissions it is. Can be null if the user no longer exists.
- User *models.User `json:"user"`
-}
-
-// Input for loginUser.
-type UserLoginInput struct {
- UserID string `json:"userId"`
- Password string `json:"password"`
- RememberMe bool `json:"rememberMe"`
-}
diff --git a/main.go b/main.go
index af7a85e..630c8fa 100644
--- a/main.go
+++ b/main.go
@@ -12,7 +12,7 @@ import (
func main() {
app := &cli.App{
- Name: "xiaoli",
+ Name: "stufflog",
Usage: "Issue tracker for your home and hobbies",
Flags: []cli.Flag{
&cli.StringFlag{
@@ -23,7 +23,7 @@ func main() {
},
&cli.StringFlag{
Name: "db-connect",
- Value: "xiaoli_user:stuff1234@(localhost:3306)/xiaoli",
+ Value: "stufflog_user:stuff1234@(localhost:3306)/stufflog",
Usage: "Database connection string or path",
EnvVars: []string{"DATABASE_CONNECT"},
},