@@ 12,8 12,8 @@ import (
"sync/atomic"
"time"
+ model1 "git.sr.ht/~sircmpwn/core-go/model"
"git.sr.ht/~sircmpwn/git.sr.ht/api/graph/model"
- model1 "git.sr.ht/~sircmpwn/gql.sr.ht/model"
"github.com/99designs/gqlgen/graphql"
"github.com/99designs/gqlgen/graphql/introspection"
gqlparser "github.com/vektah/gqlparser/v2"
@@ 50,6 50,8 @@ type ResolverRoot interface {
}
type DirectiveRoot struct {
+ Access func(ctx context.Context, obj interface{}, next graphql.Resolver, scope model.AccessScope, kind model.AccessKind) (res interface{}, err error)
+ Scopehelp func(ctx context.Context, obj interface{}, next graphql.Resolver, details string) (res interface{}, err error)
}
type ComplexityRoot struct {
@@ 1247,6 1249,27 @@ var sources = []*ast.Source{
scalar Time
scalar Upload
+# Used to provide a human-friendly description of an access scope
+directive @scopehelp(details: String!) on ENUM_VALUE
+
+enum AccessScope {
+ PROFILE @scopehelp(details: "profile information")
+ REPOSITORIES @scopehelp(details: "repository metadata")
+ OBJECTS @scopehelp(details: "git objects & references")
+ ACLS @scopehelp(details: "access control lists")
+}
+
+enum AccessKind {
+ RO @scopehelp(details: "read")
+ RW @scopehelp(details: "read and write")
+}
+
+# Decorates fields for which access requires a particular OAuth 2.0 scope with
+# read or write access. For the meta.sr.ht API, you have access to all public
+# information without any special permissions - user profile information,
+# public keys, and so on.
+directive @access(scope: AccessScope!, kind: AccessKind!) on FIELD_DEFINITION
+
# https://semver.org
type Version {
major: Int!
@@ 1282,7 1305,7 @@ interface Entity {
# prefixed with '~'. Additional entity types will be supported in the future.
canonicalName: String!
- repositories(cursor: Cursor, filter: Filter): RepositoryCursor!
+ repositories(cursor: Cursor, filter: Filter): RepositoryCursor! @access(scope: REPOSITORIES, kind: RO)
}
type User implements Entity {
@@ 1296,14 1319,14 @@ type User implements Entity {
location: String
bio: String
- repositories(cursor: Cursor, filter: Filter): RepositoryCursor!
+ repositories(cursor: Cursor, filter: Filter): RepositoryCursor! @access(scope: REPOSITORIES, kind: RO)
}
type Repository {
id: Int!
created: Time!
updated: Time!
- owner: Entity!
+ owner: Entity! @access(scope: PROFILE, kind: RO)
name: String!
description: String
visibility: Visibility!
@@ 1312,19 1335,19 @@ type Repository {
# clone URL.
upstreamUrl: String
- accessControlList(cursor: Cursor): ACLCursor!
+ accessControlList(cursor: Cursor): ACLCursor! @access(scope: ACLS, kind: RO)
## Plumbing API:
- objects(ids: [String!]): [Object]!
- references(cursor: Cursor): ReferenceCursor!
+ objects(ids: [String!]): [Object]! @access(scope: OBJECTS, kind: RO)
+ references(cursor: Cursor): ReferenceCursor! @access(scope: OBJECTS, kind: RO)
## Porcelain API:
# NOTE: revspecs are git-compatible, e.g. "HEAD~4", "master", "9790b10")
# The HEAD reference for this repository (equivalent to the default branch)
- HEAD: Reference
+ HEAD: Reference @access(scope: OBJECTS, kind: RO)
# Returns a list of comments sorted by committer time (similar to ` + "`" + `git log` + "`" + `'s
# default ordering).
@@ 1332,13 1355,13 @@ type Repository {
# If ` + "`" + `from` + "`" + ` is specified, it is interpreted as a revspec to start logging
# from. A clever reader may notice that using commits[-1].from + "^" as the
# from parameter is equivalent to passing the cursor to the next call.
- log(cursor: Cursor, from: String): CommitCursor!
+ log(cursor: Cursor, from: String): CommitCursor! @access(scope: OBJECTS, kind: RO)
# Returns a tree entry for a given path, at the given revspec.
- path(revspec: String = "HEAD", path: String!): TreeEntry
+ path(revspec: String = "HEAD", path: String!): TreeEntry @access(scope: OBJECTS, kind: RO)
# Returns the commit for a given revspec.
- revparse_single(revspec: String!): Commit
+ revparse_single(revspec: String!): Commit @access(scope: OBJECTS, kind: RO)
}
# A cursor for enumerating a list of repositories
@@ 1405,7 1428,7 @@ type ACL {
id: Int!
created: Time!
repository: Repository!
- entity: Entity!
+ entity: Entity! @access(scope: PROFILE, kind: RO)
mode: AccessMode
}
@@ 1529,10 1552,10 @@ type Query {
version: Version!
# Returns the authenticated user.
- me: User!
+ me: User! @access(scope: PROFILE, kind: RO)
# Returns a specific user.
- user(username: String!): User
+ user(username: String!): User @access(scope: PROFILE, kind: RO)
# Returns repositories that the authenticated user has access to.
#
@@ 1541,17 1564,17 @@ type Query {
# will be to return all repositories that the user either (1) has been given
# explicit access to via ACLs or (2) has implicit access to either by
# ownership or group membership.
- repositories(cursor: Cursor, filter: Filter): RepositoryCursor
+ repositories(cursor: Cursor, filter: Filter): RepositoryCursor @access(scope: REPOSITORIES, kind: RO)
# Returns a specific repository by ID.
- repository(id: Int!): Repository
+ repository(id: Int!): Repository @access(scope: REPOSITORIES, kind: RO)
# Returns a specific repository, owned by the authenticated user.
- repositoryByName(name: String!): Repository
+ repositoryByName(name: String!): Repository @access(scope: REPOSITORIES, kind: RO)
# Returns a specific repository, owned by the given canonical name (e.g.
# "~sircmpwn").
- repositoryByOwner(owner: String!, repo: String!): Repository
+ repositoryByOwner(owner: String!, repo: String!): Repository @access(scope: REPOSITORIES, kind: RO)
}
input RepoInput {
@@ 1561,15 1584,15 @@ input RepoInput {
}
type Mutation {
- createRepository(params: RepoInput): Repository!
- updateRepository(id: ID!, params: RepoInput): Repository!
- deleteRepository(id: ID!): Repository!
+ createRepository(params: RepoInput): Repository! @access(scope: REPOSITORIES, kind: RW)
+ updateRepository(id: ID!, params: RepoInput): Repository! @access(scope: REPOSITORIES, kind: RW)
+ deleteRepository(id: ID!): Repository! @access(scope: REPOSITORIES, kind: RW)
- updateACL(repoId: ID!, mode: AccessMode!, entity: ID!): ACL!
- deleteACL(repoId: Int!, entity: ID!): ACL!
+ updateACL(repoId: ID!, mode: AccessMode!, entity: ID!): ACL! @access(scope: ACLS, kind: RW)
+ deleteACL(repoId: Int!, entity: ID!): ACL! @access(scope: ACLS, kind: RW)
- uploadArtifact(repoId: Int!, revspec: String!, file: Upload!): Artifact!
- deleteArtifact(id: Int!): Artifact!
+ uploadArtifact(repoId: Int!, revspec: String!, file: Upload!): Artifact! @access(scope: OBJECTS, kind: RW)
+ deleteArtifact(id: Int!): Artifact! @access(scope: OBJECTS, kind: RW)
}
`, BuiltIn: false},
}
@@ 1579,11 1602,51 @@ var parsedSchema = gqlparser.MustLoadSchema(sources...)
// region ***************************** args.gotpl *****************************
+func (ec *executionContext) dir_access_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+ var err error
+ args := map[string]interface{}{}
+ var arg0 model.AccessScope
+ if tmp, ok := rawArgs["scope"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("scope"))
+ arg0, err = ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["scope"] = arg0
+ var arg1 model.AccessKind
+ if tmp, ok := rawArgs["kind"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("kind"))
+ arg1, err = ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["kind"] = arg1
+ return args, nil
+}
+
+func (ec *executionContext) dir_scopehelp_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["details"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("details"))
+ arg0, err = ec.unmarshalNString2string(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["details"] = arg0
+ return args, nil
+}
+
func (ec *executionContext) field_Mutation_createRepository_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 *model.RepoInput
if tmp, ok := rawArgs["params"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("params"))
arg0, err = ec.unmarshalORepoInput2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐRepoInput(ctx, tmp)
if err != nil {
return nil, err
@@ 1598,6 1661,7 @@ func (ec *executionContext) field_Mutation_deleteACL_args(ctx context.Context, r
args := map[string]interface{}{}
var arg0 int
if tmp, ok := rawArgs["repoId"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("repoId"))
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
if err != nil {
return nil, err
@@ 1606,6 1670,7 @@ func (ec *executionContext) field_Mutation_deleteACL_args(ctx context.Context, r
args["repoId"] = arg0
var arg1 string
if tmp, ok := rawArgs["entity"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("entity"))
arg1, err = ec.unmarshalNID2string(ctx, tmp)
if err != nil {
return nil, err
@@ 1620,6 1685,7 @@ func (ec *executionContext) field_Mutation_deleteArtifact_args(ctx context.Conte
args := map[string]interface{}{}
var arg0 int
if tmp, ok := rawArgs["id"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
if err != nil {
return nil, err
@@ 1634,6 1700,7 @@ func (ec *executionContext) field_Mutation_deleteRepository_args(ctx context.Con
args := map[string]interface{}{}
var arg0 string
if tmp, ok := rawArgs["id"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
arg0, err = ec.unmarshalNID2string(ctx, tmp)
if err != nil {
return nil, err
@@ 1648,6 1715,7 @@ func (ec *executionContext) field_Mutation_updateACL_args(ctx context.Context, r
args := map[string]interface{}{}
var arg0 string
if tmp, ok := rawArgs["repoId"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("repoId"))
arg0, err = ec.unmarshalNID2string(ctx, tmp)
if err != nil {
return nil, err
@@ 1656,6 1724,7 @@ func (ec *executionContext) field_Mutation_updateACL_args(ctx context.Context, r
args["repoId"] = arg0
var arg1 model.AccessMode
if tmp, ok := rawArgs["mode"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("mode"))
arg1, err = ec.unmarshalNAccessMode2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessMode(ctx, tmp)
if err != nil {
return nil, err
@@ 1664,6 1733,7 @@ func (ec *executionContext) field_Mutation_updateACL_args(ctx context.Context, r
args["mode"] = arg1
var arg2 string
if tmp, ok := rawArgs["entity"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("entity"))
arg2, err = ec.unmarshalNID2string(ctx, tmp)
if err != nil {
return nil, err
@@ 1678,6 1748,7 @@ func (ec *executionContext) field_Mutation_updateRepository_args(ctx context.Con
args := map[string]interface{}{}
var arg0 string
if tmp, ok := rawArgs["id"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
arg0, err = ec.unmarshalNID2string(ctx, tmp)
if err != nil {
return nil, err
@@ 1686,6 1757,7 @@ func (ec *executionContext) field_Mutation_updateRepository_args(ctx context.Con
args["id"] = arg0
var arg1 *model.RepoInput
if tmp, ok := rawArgs["params"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("params"))
arg1, err = ec.unmarshalORepoInput2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐRepoInput(ctx, tmp)
if err != nil {
return nil, err
@@ 1700,6 1772,7 @@ func (ec *executionContext) field_Mutation_uploadArtifact_args(ctx context.Conte
args := map[string]interface{}{}
var arg0 int
if tmp, ok := rawArgs["repoId"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("repoId"))
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
if err != nil {
return nil, err
@@ 1708,6 1781,7 @@ func (ec *executionContext) field_Mutation_uploadArtifact_args(ctx context.Conte
args["repoId"] = arg0
var arg1 string
if tmp, ok := rawArgs["revspec"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("revspec"))
arg1, err = ec.unmarshalNString2string(ctx, tmp)
if err != nil {
return nil, err
@@ 1716,6 1790,7 @@ func (ec *executionContext) field_Mutation_uploadArtifact_args(ctx context.Conte
args["revspec"] = arg1
var arg2 graphql.Upload
if tmp, ok := rawArgs["file"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("file"))
arg2, err = ec.unmarshalNUpload2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚐUpload(ctx, tmp)
if err != nil {
return nil, err
@@ 1730,6 1805,7 @@ func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs
args := map[string]interface{}{}
var arg0 string
if tmp, ok := rawArgs["name"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
arg0, err = ec.unmarshalNString2string(ctx, tmp)
if err != nil {
return nil, err
@@ 1744,7 1820,8 @@ func (ec *executionContext) field_Query_repositories_args(ctx context.Context, r
args := map[string]interface{}{}
var arg0 *model1.Cursor
if tmp, ok := rawArgs["cursor"]; ok {
- arg0, err = ec.unmarshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgqlᚗsrᚗhtᚋmodelᚐCursor(ctx, tmp)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cursor"))
+ arg0, err = ec.unmarshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐCursor(ctx, tmp)
if err != nil {
return nil, err
}
@@ 1752,7 1829,8 @@ func (ec *executionContext) field_Query_repositories_args(ctx context.Context, r
args["cursor"] = arg0
var arg1 *model1.Filter
if tmp, ok := rawArgs["filter"]; ok {
- arg1, err = ec.unmarshalOFilter2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgqlᚗsrᚗhtᚋmodelᚐFilter(ctx, tmp)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("filter"))
+ arg1, err = ec.unmarshalOFilter2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐFilter(ctx, tmp)
if err != nil {
return nil, err
}
@@ 1766,6 1844,7 @@ func (ec *executionContext) field_Query_repositoryByName_args(ctx context.Contex
args := map[string]interface{}{}
var arg0 string
if tmp, ok := rawArgs["name"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
arg0, err = ec.unmarshalNString2string(ctx, tmp)
if err != nil {
return nil, err
@@ 1780,6 1859,7 @@ func (ec *executionContext) field_Query_repositoryByOwner_args(ctx context.Conte
args := map[string]interface{}{}
var arg0 string
if tmp, ok := rawArgs["owner"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("owner"))
arg0, err = ec.unmarshalNString2string(ctx, tmp)
if err != nil {
return nil, err
@@ 1788,6 1868,7 @@ func (ec *executionContext) field_Query_repositoryByOwner_args(ctx context.Conte
args["owner"] = arg0
var arg1 string
if tmp, ok := rawArgs["repo"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("repo"))
arg1, err = ec.unmarshalNString2string(ctx, tmp)
if err != nil {
return nil, err
@@ 1802,6 1883,7 @@ func (ec *executionContext) field_Query_repository_args(ctx context.Context, raw
args := map[string]interface{}{}
var arg0 int
if tmp, ok := rawArgs["id"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
if err != nil {
return nil, err
@@ 1816,6 1898,7 @@ func (ec *executionContext) field_Query_user_args(ctx context.Context, rawArgs m
args := map[string]interface{}{}
var arg0 string
if tmp, ok := rawArgs["username"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("username"))
arg0, err = ec.unmarshalNString2string(ctx, tmp)
if err != nil {
return nil, err
@@ 1830,7 1913,8 @@ func (ec *executionContext) field_Reference_artifacts_args(ctx context.Context,
args := map[string]interface{}{}
var arg0 *model1.Cursor
if tmp, ok := rawArgs["cursor"]; ok {
- arg0, err = ec.unmarshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgqlᚗsrᚗhtᚋmodelᚐCursor(ctx, tmp)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cursor"))
+ arg0, err = ec.unmarshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐCursor(ctx, tmp)
if err != nil {
return nil, err
}
@@ 1844,7 1928,8 @@ func (ec *executionContext) field_Repository_accessControlList_args(ctx context.
args := map[string]interface{}{}
var arg0 *model1.Cursor
if tmp, ok := rawArgs["cursor"]; ok {
- arg0, err = ec.unmarshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgqlᚗsrᚗhtᚋmodelᚐCursor(ctx, tmp)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cursor"))
+ arg0, err = ec.unmarshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐCursor(ctx, tmp)
if err != nil {
return nil, err
}
@@ 1858,7 1943,8 @@ func (ec *executionContext) field_Repository_log_args(ctx context.Context, rawAr
args := map[string]interface{}{}
var arg0 *model1.Cursor
if tmp, ok := rawArgs["cursor"]; ok {
- arg0, err = ec.unmarshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgqlᚗsrᚗhtᚋmodelᚐCursor(ctx, tmp)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cursor"))
+ arg0, err = ec.unmarshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐCursor(ctx, tmp)
if err != nil {
return nil, err
}
@@ 1866,6 1952,7 @@ func (ec *executionContext) field_Repository_log_args(ctx context.Context, rawAr
args["cursor"] = arg0
var arg1 *string
if tmp, ok := rawArgs["from"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("from"))
arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
if err != nil {
return nil, err
@@ 1880,6 1967,7 @@ func (ec *executionContext) field_Repository_objects_args(ctx context.Context, r
args := map[string]interface{}{}
var arg0 []string
if tmp, ok := rawArgs["ids"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ids"))
arg0, err = ec.unmarshalOString2ᚕstringᚄ(ctx, tmp)
if err != nil {
return nil, err
@@ 1894,6 1982,7 @@ func (ec *executionContext) field_Repository_path_args(ctx context.Context, rawA
args := map[string]interface{}{}
var arg0 *string
if tmp, ok := rawArgs["revspec"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("revspec"))
arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
if err != nil {
return nil, err
@@ 1902,6 1991,7 @@ func (ec *executionContext) field_Repository_path_args(ctx context.Context, rawA
args["revspec"] = arg0
var arg1 string
if tmp, ok := rawArgs["path"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("path"))
arg1, err = ec.unmarshalNString2string(ctx, tmp)
if err != nil {
return nil, err
@@ 1916,7 2006,8 @@ func (ec *executionContext) field_Repository_references_args(ctx context.Context
args := map[string]interface{}{}
var arg0 *model1.Cursor
if tmp, ok := rawArgs["cursor"]; ok {
- arg0, err = ec.unmarshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgqlᚗsrᚗhtᚋmodelᚐCursor(ctx, tmp)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cursor"))
+ arg0, err = ec.unmarshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐCursor(ctx, tmp)
if err != nil {
return nil, err
}
@@ 1930,6 2021,7 @@ func (ec *executionContext) field_Repository_revparse_single_args(ctx context.Co
args := map[string]interface{}{}
var arg0 string
if tmp, ok := rawArgs["revspec"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("revspec"))
arg0, err = ec.unmarshalNString2string(ctx, tmp)
if err != nil {
return nil, err
@@ 1944,7 2036,8 @@ func (ec *executionContext) field_Tree_entries_args(ctx context.Context, rawArgs
args := map[string]interface{}{}
var arg0 *model1.Cursor
if tmp, ok := rawArgs["cursor"]; ok {
- arg0, err = ec.unmarshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgqlᚗsrᚗhtᚋmodelᚐCursor(ctx, tmp)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cursor"))
+ arg0, err = ec.unmarshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐCursor(ctx, tmp)
if err != nil {
return nil, err
}
@@ 1958,6 2051,7 @@ func (ec *executionContext) field_Tree_entry_args(ctx context.Context, rawArgs m
args := map[string]interface{}{}
var arg0 string
if tmp, ok := rawArgs["path"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("path"))
arg0, err = ec.unmarshalOString2string(ctx, tmp)
if err != nil {
return nil, err
@@ 1972,7 2066,8 @@ func (ec *executionContext) field_User_repositories_args(ctx context.Context, ra
args := map[string]interface{}{}
var arg0 *model1.Cursor
if tmp, ok := rawArgs["cursor"]; ok {
- arg0, err = ec.unmarshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgqlᚗsrᚗhtᚋmodelᚐCursor(ctx, tmp)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cursor"))
+ arg0, err = ec.unmarshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐCursor(ctx, tmp)
if err != nil {
return nil, err
}
@@ 1980,7 2075,8 @@ func (ec *executionContext) field_User_repositories_args(ctx context.Context, ra
args["cursor"] = arg0
var arg1 *model1.Filter
if tmp, ok := rawArgs["filter"]; ok {
- arg1, err = ec.unmarshalOFilter2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgqlᚗsrᚗhtᚋmodelᚐFilter(ctx, tmp)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("filter"))
+ arg1, err = ec.unmarshalOFilter2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐFilter(ctx, tmp)
if err != nil {
return nil, err
}
@@ 1994,6 2090,7 @@ func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, ra
args := map[string]interface{}{}
var arg0 bool
if tmp, ok := rawArgs["includeDeprecated"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated"))
arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)
if err != nil {
return nil, err
@@ 2008,6 2105,7 @@ func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArg
args := map[string]interface{}{}
var arg0 bool
if tmp, ok := rawArgs["includeDeprecated"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated"))
arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)
if err != nil {
return nil, err
@@ 2033,10 2131,11 @@ func (ec *executionContext) _ACL_id(ctx context.Context, field graphql.Collected
}
}()
fc := &graphql.FieldContext{
- Object: "ACL",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "ACL",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 2067,10 2166,11 @@ func (ec *executionContext) _ACL_created(ctx context.Context, field graphql.Coll
}
}()
fc := &graphql.FieldContext{
- Object: "ACL",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "ACL",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 2101,10 2201,11 @@ func (ec *executionContext) _ACL_repository(ctx context.Context, field graphql.C
}
}()
fc := &graphql.FieldContext{
- Object: "ACL",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "ACL",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 2135,16 2236,45 @@ func (ec *executionContext) _ACL_entity(ctx context.Context, field graphql.Colle
}
}()
fc := &graphql.FieldContext{
- Object: "ACL",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "ACL",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
}
ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.ACL().Entity(rctx, obj)
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.ACL().Entity(rctx, obj)
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "PROFILE")
+ if err != nil {
+ return nil, err
+ }
+ kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
+ if err != nil {
+ return nil, err
+ }
+ if ec.directives.Access == nil {
+ return nil, errors.New("directive access is not implemented")
+ }
+ return ec.directives.Access(ctx, obj, directive0, scope, kind)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(model.Entity); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be git.sr.ht/~sircmpwn/git.sr.ht/api/graph/model.Entity`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ 2169,10 2299,11 @@ func (ec *executionContext) _ACL_mode(ctx context.Context, field graphql.Collect
}
}()
fc := &graphql.FieldContext{
- Object: "ACL",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "ACL",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 2200,10 2331,11 @@ func (ec *executionContext) _ACLCursor_results(ctx context.Context, field graphq
}
}()
fc := &graphql.FieldContext{
- Object: "ACLCursor",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "ACLCursor",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 2234,10 2366,11 @@ func (ec *executionContext) _ACLCursor_cursor(ctx context.Context, field graphql
}
}()
fc := &graphql.FieldContext{
- Object: "ACLCursor",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "ACLCursor",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 2254,7 2387,7 @@ func (ec *executionContext) _ACLCursor_cursor(ctx context.Context, field graphql
}
res := resTmp.(*model1.Cursor)
fc.Result = res
- return ec.marshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgqlᚗsrᚗhtᚋmodelᚐCursor(ctx, field.Selections, res)
+ return ec.marshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐCursor(ctx, field.Selections, res)
}
func (ec *executionContext) _Artifact_id(ctx context.Context, field graphql.CollectedField, obj *model.Artifact) (ret graphql.Marshaler) {
@@ 2265,10 2398,11 @@ func (ec *executionContext) _Artifact_id(ctx context.Context, field graphql.Coll
}
}()
fc := &graphql.FieldContext{
- Object: "Artifact",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Artifact",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 2299,10 2433,11 @@ func (ec *executionContext) _Artifact_created(ctx context.Context, field graphql
}
}()
fc := &graphql.FieldContext{
- Object: "Artifact",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Artifact",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 2333,10 2468,11 @@ func (ec *executionContext) _Artifact_filename(ctx context.Context, field graphq
}
}()
fc := &graphql.FieldContext{
- Object: "Artifact",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Artifact",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 2367,10 2503,11 @@ func (ec *executionContext) _Artifact_checksum(ctx context.Context, field graphq
}
}()
fc := &graphql.FieldContext{
- Object: "Artifact",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Artifact",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 2401,10 2538,11 @@ func (ec *executionContext) _Artifact_size(ctx context.Context, field graphql.Co
}
}()
fc := &graphql.FieldContext{
- Object: "Artifact",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Artifact",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 2435,10 2573,11 @@ func (ec *executionContext) _Artifact_url(ctx context.Context, field graphql.Col
}
}()
fc := &graphql.FieldContext{
- Object: "Artifact",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Artifact",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 2469,10 2608,11 @@ func (ec *executionContext) _ArtifactCursor_results(ctx context.Context, field g
}
}()
fc := &graphql.FieldContext{
- Object: "ArtifactCursor",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "ArtifactCursor",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 2503,10 2643,11 @@ func (ec *executionContext) _ArtifactCursor_cursor(ctx context.Context, field gr
}
}()
fc := &graphql.FieldContext{
- Object: "ArtifactCursor",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "ArtifactCursor",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 2523,7 2664,7 @@ func (ec *executionContext) _ArtifactCursor_cursor(ctx context.Context, field gr
}
res := resTmp.(*model1.Cursor)
fc.Result = res
- return ec.marshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgqlᚗsrᚗhtᚋmodelᚐCursor(ctx, field.Selections, res)
+ return ec.marshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐCursor(ctx, field.Selections, res)
}
func (ec *executionContext) _BinaryBlob_type(ctx context.Context, field graphql.CollectedField, obj *model.BinaryBlob) (ret graphql.Marshaler) {
@@ 2534,10 2675,11 @@ func (ec *executionContext) _BinaryBlob_type(ctx context.Context, field graphql.
}
}()
fc := &graphql.FieldContext{
- Object: "BinaryBlob",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "BinaryBlob",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 2568,10 2710,11 @@ func (ec *executionContext) _BinaryBlob_id(ctx context.Context, field graphql.Co
}
}()
fc := &graphql.FieldContext{
- Object: "BinaryBlob",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "BinaryBlob",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 2602,10 2745,11 @@ func (ec *executionContext) _BinaryBlob_shortId(ctx context.Context, field graph
}
}()
fc := &graphql.FieldContext{
- Object: "BinaryBlob",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "BinaryBlob",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 2636,10 2780,11 @@ func (ec *executionContext) _BinaryBlob_raw(ctx context.Context, field graphql.C
}
}()
fc := &graphql.FieldContext{
- Object: "BinaryBlob",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "BinaryBlob",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 2670,10 2815,11 @@ func (ec *executionContext) _BinaryBlob_base64(ctx context.Context, field graphq
}
}()
fc := &graphql.FieldContext{
- Object: "BinaryBlob",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "BinaryBlob",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 2704,10 2850,11 @@ func (ec *executionContext) _Commit_type(ctx context.Context, field graphql.Coll
}
}()
fc := &graphql.FieldContext{
- Object: "Commit",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Commit",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 2738,10 2885,11 @@ func (ec *executionContext) _Commit_id(ctx context.Context, field graphql.Collec
}
}()
fc := &graphql.FieldContext{
- Object: "Commit",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Commit",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 2772,10 2920,11 @@ func (ec *executionContext) _Commit_shortId(ctx context.Context, field graphql.C
}
}()
fc := &graphql.FieldContext{
- Object: "Commit",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Commit",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 2806,10 2955,11 @@ func (ec *executionContext) _Commit_raw(ctx context.Context, field graphql.Colle
}
}()
fc := &graphql.FieldContext{
- Object: "Commit",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Commit",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 2840,10 2990,11 @@ func (ec *executionContext) _Commit_author(ctx context.Context, field graphql.Co
}
}()
fc := &graphql.FieldContext{
- Object: "Commit",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Commit",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 2874,10 3025,11 @@ func (ec *executionContext) _Commit_committer(ctx context.Context, field graphql
}
}()
fc := &graphql.FieldContext{
- Object: "Commit",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Commit",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 2908,10 3060,11 @@ func (ec *executionContext) _Commit_message(ctx context.Context, field graphql.C
}
}()
fc := &graphql.FieldContext{
- Object: "Commit",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Commit",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 2942,10 3095,11 @@ func (ec *executionContext) _Commit_tree(ctx context.Context, field graphql.Coll
}
}()
fc := &graphql.FieldContext{
- Object: "Commit",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Commit",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 2976,10 3130,11 @@ func (ec *executionContext) _Commit_parents(ctx context.Context, field graphql.C
}
}()
fc := &graphql.FieldContext{
- Object: "Commit",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Commit",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 3010,10 3165,11 @@ func (ec *executionContext) _Commit_diff(ctx context.Context, field graphql.Coll
}
}()
fc := &graphql.FieldContext{
- Object: "Commit",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Commit",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 3044,10 3200,11 @@ func (ec *executionContext) _CommitCursor_results(ctx context.Context, field gra
}
}()
fc := &graphql.FieldContext{
- Object: "CommitCursor",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "CommitCursor",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 3078,10 3235,11 @@ func (ec *executionContext) _CommitCursor_cursor(ctx context.Context, field grap
}
}()
fc := &graphql.FieldContext{
- Object: "CommitCursor",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "CommitCursor",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 3098,7 3256,7 @@ func (ec *executionContext) _CommitCursor_cursor(ctx context.Context, field grap
}
res := resTmp.(*model1.Cursor)
fc.Result = res
- return ec.marshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgqlᚗsrᚗhtᚋmodelᚐCursor(ctx, field.Selections, res)
+ return ec.marshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐCursor(ctx, field.Selections, res)
}
func (ec *executionContext) _Mutation_createRepository(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
@@ 3109,10 3267,11 @@ func (ec *executionContext) _Mutation_createRepository(ctx context.Context, fiel
}
}()
fc := &graphql.FieldContext{
- Object: "Mutation",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Mutation",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 3124,8 3283,36 @@ func (ec *executionContext) _Mutation_createRepository(ctx context.Context, fiel
}
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().CreateRepository(rctx, args["params"].(*model.RepoInput))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Mutation().CreateRepository(rctx, args["params"].(*model.RepoInput))
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "REPOSITORIES")
+ if err != nil {
+ return nil, err
+ }
+ kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RW")
+ if err != nil {
+ return nil, err
+ }
+ if ec.directives.Access == nil {
+ return nil, errors.New("directive access is not implemented")
+ }
+ return ec.directives.Access(ctx, nil, directive0, scope, kind)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*model.Repository); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/git.sr.ht/api/graph/model.Repository`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ 3150,10 3337,11 @@ func (ec *executionContext) _Mutation_updateRepository(ctx context.Context, fiel
}
}()
fc := &graphql.FieldContext{
- Object: "Mutation",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Mutation",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 3165,8 3353,36 @@ func (ec *executionContext) _Mutation_updateRepository(ctx context.Context, fiel
}
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().UpdateRepository(rctx, args["id"].(string), args["params"].(*model.RepoInput))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Mutation().UpdateRepository(rctx, args["id"].(string), args["params"].(*model.RepoInput))
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "REPOSITORIES")
+ if err != nil {
+ return nil, err
+ }
+ kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RW")
+ if err != nil {
+ return nil, err
+ }
+ if ec.directives.Access == nil {
+ return nil, errors.New("directive access is not implemented")
+ }
+ return ec.directives.Access(ctx, nil, directive0, scope, kind)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*model.Repository); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/git.sr.ht/api/graph/model.Repository`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ 3191,10 3407,11 @@ func (ec *executionContext) _Mutation_deleteRepository(ctx context.Context, fiel
}
}()
fc := &graphql.FieldContext{
- Object: "Mutation",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Mutation",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 3206,8 3423,36 @@ func (ec *executionContext) _Mutation_deleteRepository(ctx context.Context, fiel
}
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().DeleteRepository(rctx, args["id"].(string))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Mutation().DeleteRepository(rctx, args["id"].(string))
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "REPOSITORIES")
+ if err != nil {
+ return nil, err
+ }
+ kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RW")
+ if err != nil {
+ return nil, err
+ }
+ if ec.directives.Access == nil {
+ return nil, errors.New("directive access is not implemented")
+ }
+ return ec.directives.Access(ctx, nil, directive0, scope, kind)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*model.Repository); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/git.sr.ht/api/graph/model.Repository`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ 3232,10 3477,11 @@ func (ec *executionContext) _Mutation_updateACL(ctx context.Context, field graph
}
}()
fc := &graphql.FieldContext{
- Object: "Mutation",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Mutation",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 3247,8 3493,36 @@ func (ec *executionContext) _Mutation_updateACL(ctx context.Context, field graph
}
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().UpdateACL(rctx, args["repoId"].(string), args["mode"].(model.AccessMode), args["entity"].(string))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Mutation().UpdateACL(rctx, args["repoId"].(string), args["mode"].(model.AccessMode), args["entity"].(string))
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "ACLS")
+ if err != nil {
+ return nil, err
+ }
+ kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RW")
+ if err != nil {
+ return nil, err
+ }
+ if ec.directives.Access == nil {
+ return nil, errors.New("directive access is not implemented")
+ }
+ return ec.directives.Access(ctx, nil, directive0, scope, kind)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*model.ACL); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/git.sr.ht/api/graph/model.ACL`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ 3273,10 3547,11 @@ func (ec *executionContext) _Mutation_deleteACL(ctx context.Context, field graph
}
}()
fc := &graphql.FieldContext{
- Object: "Mutation",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Mutation",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 3288,8 3563,36 @@ func (ec *executionContext) _Mutation_deleteACL(ctx context.Context, field graph
}
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().DeleteACL(rctx, args["repoId"].(int), args["entity"].(string))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Mutation().DeleteACL(rctx, args["repoId"].(int), args["entity"].(string))
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "ACLS")
+ if err != nil {
+ return nil, err
+ }
+ kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RW")
+ if err != nil {
+ return nil, err
+ }
+ if ec.directives.Access == nil {
+ return nil, errors.New("directive access is not implemented")
+ }
+ return ec.directives.Access(ctx, nil, directive0, scope, kind)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*model.ACL); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/git.sr.ht/api/graph/model.ACL`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ 3314,10 3617,11 @@ func (ec *executionContext) _Mutation_uploadArtifact(ctx context.Context, field
}
}()
fc := &graphql.FieldContext{
- Object: "Mutation",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Mutation",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 3329,8 3633,36 @@ func (ec *executionContext) _Mutation_uploadArtifact(ctx context.Context, field
}
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().UploadArtifact(rctx, args["repoId"].(int), args["revspec"].(string), args["file"].(graphql.Upload))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Mutation().UploadArtifact(rctx, args["repoId"].(int), args["revspec"].(string), args["file"].(graphql.Upload))
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "OBJECTS")
+ if err != nil {
+ return nil, err
+ }
+ kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RW")
+ if err != nil {
+ return nil, err
+ }
+ if ec.directives.Access == nil {
+ return nil, errors.New("directive access is not implemented")
+ }
+ return ec.directives.Access(ctx, nil, directive0, scope, kind)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*model.Artifact); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/git.sr.ht/api/graph/model.Artifact`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ 3355,10 3687,11 @@ func (ec *executionContext) _Mutation_deleteArtifact(ctx context.Context, field
}
}()
fc := &graphql.FieldContext{
- Object: "Mutation",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Mutation",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 3370,8 3703,36 @@ func (ec *executionContext) _Mutation_deleteArtifact(ctx context.Context, field
}
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().DeleteArtifact(rctx, args["id"].(int))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Mutation().DeleteArtifact(rctx, args["id"].(int))
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "OBJECTS")
+ if err != nil {
+ return nil, err
+ }
+ kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RW")
+ if err != nil {
+ return nil, err
+ }
+ if ec.directives.Access == nil {
+ return nil, errors.New("directive access is not implemented")
+ }
+ return ec.directives.Access(ctx, nil, directive0, scope, kind)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*model.Artifact); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/git.sr.ht/api/graph/model.Artifact`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ 3396,10 3757,11 @@ func (ec *executionContext) _Query_version(ctx context.Context, field graphql.Co
}
}()
fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Query",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 3430,16 3792,45 @@ func (ec *executionContext) _Query_me(ctx context.Context, field graphql.Collect
}
}()
fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Query",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
}
ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().Me(rctx)
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Query().Me(rctx)
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "PROFILE")
+ if err != nil {
+ return nil, err
+ }
+ kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
+ if err != nil {
+ return nil, err
+ }
+ if ec.directives.Access == nil {
+ return nil, errors.New("directive access is not implemented")
+ }
+ return ec.directives.Access(ctx, nil, directive0, scope, kind)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*model.User); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/git.sr.ht/api/graph/model.User`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ 3464,10 3855,11 @@ func (ec *executionContext) _Query_user(ctx context.Context, field graphql.Colle
}
}()
fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Query",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 3479,8 3871,36 @@ func (ec *executionContext) _Query_user(ctx context.Context, field graphql.Colle
}
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().User(rctx, args["username"].(string))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Query().User(rctx, args["username"].(string))
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "PROFILE")
+ if err != nil {
+ return nil, err
+ }
+ kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
+ if err != nil {
+ return nil, err
+ }
+ if ec.directives.Access == nil {
+ return nil, errors.New("directive access is not implemented")
+ }
+ return ec.directives.Access(ctx, nil, directive0, scope, kind)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*model.User); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/git.sr.ht/api/graph/model.User`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ 3502,10 3922,11 @@ func (ec *executionContext) _Query_repositories(ctx context.Context, field graph
}
}()
fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Query",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 3517,8 3938,36 @@ func (ec *executionContext) _Query_repositories(ctx context.Context, field graph
}
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().Repositories(rctx, args["cursor"].(*model1.Cursor), args["filter"].(*model1.Filter))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Query().Repositories(rctx, args["cursor"].(*model1.Cursor), args["filter"].(*model1.Filter))
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "REPOSITORIES")
+ if err != nil {
+ return nil, err
+ }
+ kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
+ if err != nil {
+ return nil, err
+ }
+ if ec.directives.Access == nil {
+ return nil, errors.New("directive access is not implemented")
+ }
+ return ec.directives.Access(ctx, nil, directive0, scope, kind)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*model.RepositoryCursor); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/git.sr.ht/api/graph/model.RepositoryCursor`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ 3540,10 3989,11 @@ func (ec *executionContext) _Query_repository(ctx context.Context, field graphql
}
}()
fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Query",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 3555,8 4005,36 @@ func (ec *executionContext) _Query_repository(ctx context.Context, field graphql
}
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().Repository(rctx, args["id"].(int))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Query().Repository(rctx, args["id"].(int))
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "REPOSITORIES")
+ if err != nil {
+ return nil, err
+ }
+ kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
+ if err != nil {
+ return nil, err
+ }
+ if ec.directives.Access == nil {
+ return nil, errors.New("directive access is not implemented")
+ }
+ return ec.directives.Access(ctx, nil, directive0, scope, kind)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*model.Repository); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/git.sr.ht/api/graph/model.Repository`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ 3578,10 4056,11 @@ func (ec *executionContext) _Query_repositoryByName(ctx context.Context, field g
}
}()
fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Query",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 3593,8 4072,36 @@ func (ec *executionContext) _Query_repositoryByName(ctx context.Context, field g
}
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().RepositoryByName(rctx, args["name"].(string))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Query().RepositoryByName(rctx, args["name"].(string))
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "REPOSITORIES")
+ if err != nil {
+ return nil, err
+ }
+ kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
+ if err != nil {
+ return nil, err
+ }
+ if ec.directives.Access == nil {
+ return nil, errors.New("directive access is not implemented")
+ }
+ return ec.directives.Access(ctx, nil, directive0, scope, kind)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*model.Repository); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/git.sr.ht/api/graph/model.Repository`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ 3616,10 4123,11 @@ func (ec *executionContext) _Query_repositoryByOwner(ctx context.Context, field
}
}()
fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Query",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 3631,8 4139,36 @@ func (ec *executionContext) _Query_repositoryByOwner(ctx context.Context, field
}
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().RepositoryByOwner(rctx, args["owner"].(string), args["repo"].(string))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Query().RepositoryByOwner(rctx, args["owner"].(string), args["repo"].(string))
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "REPOSITORIES")
+ if err != nil {
+ return nil, err
+ }
+ kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
+ if err != nil {
+ return nil, err
+ }
+ if ec.directives.Access == nil {
+ return nil, errors.New("directive access is not implemented")
+ }
+ return ec.directives.Access(ctx, nil, directive0, scope, kind)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*model.Repository); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/git.sr.ht/api/graph/model.Repository`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ 3654,10 4190,11 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col
}
}()
fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Query",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 3692,10 4229,11 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C
}
}()
fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Query",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 3723,10 4261,11 @@ func (ec *executionContext) _Reference_name(ctx context.Context, field graphql.C
}
}()
fc := &graphql.FieldContext{
- Object: "Reference",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Reference",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 3757,10 4296,11 @@ func (ec *executionContext) _Reference_target(ctx context.Context, field graphql
}
}()
fc := &graphql.FieldContext{
- Object: "Reference",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Reference",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 3791,10 4331,11 @@ func (ec *executionContext) _Reference_follow(ctx context.Context, field graphql
}
}()
fc := &graphql.FieldContext{
- Object: "Reference",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Reference",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 3822,10 4363,11 @@ func (ec *executionContext) _Reference_artifacts(ctx context.Context, field grap
}
}()
fc := &graphql.FieldContext{
- Object: "Reference",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Reference",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 3863,10 4405,11 @@ func (ec *executionContext) _ReferenceCursor_results(ctx context.Context, field
}
}()
fc := &graphql.FieldContext{
- Object: "ReferenceCursor",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "ReferenceCursor",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 3897,10 4440,11 @@ func (ec *executionContext) _ReferenceCursor_cursor(ctx context.Context, field g
}
}()
fc := &graphql.FieldContext{
- Object: "ReferenceCursor",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "ReferenceCursor",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 3917,7 4461,7 @@ func (ec *executionContext) _ReferenceCursor_cursor(ctx context.Context, field g
}
res := resTmp.(*model1.Cursor)
fc.Result = res
- return ec.marshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgqlᚗsrᚗhtᚋmodelᚐCursor(ctx, field.Selections, res)
+ return ec.marshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐCursor(ctx, field.Selections, res)
}
func (ec *executionContext) _Repository_id(ctx context.Context, field graphql.CollectedField, obj *model.Repository) (ret graphql.Marshaler) {
@@ 3928,10 4472,11 @@ func (ec *executionContext) _Repository_id(ctx context.Context, field graphql.Co
}
}()
fc := &graphql.FieldContext{
- Object: "Repository",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Repository",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 3962,10 4507,11 @@ func (ec *executionContext) _Repository_created(ctx context.Context, field graph
}
}()
fc := &graphql.FieldContext{
- Object: "Repository",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Repository",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 3996,10 4542,11 @@ func (ec *executionContext) _Repository_updated(ctx context.Context, field graph
}
}()
fc := &graphql.FieldContext{
- Object: "Repository",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Repository",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 4030,16 4577,45 @@ func (ec *executionContext) _Repository_owner(ctx context.Context, field graphql
}
}()
fc := &graphql.FieldContext{
- Object: "Repository",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Repository",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
}
ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Repository().Owner(rctx, obj)
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Repository().Owner(rctx, obj)
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "PROFILE")
+ if err != nil {
+ return nil, err
+ }
+ kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
+ if err != nil {
+ return nil, err
+ }
+ if ec.directives.Access == nil {
+ return nil, errors.New("directive access is not implemented")
+ }
+ return ec.directives.Access(ctx, obj, directive0, scope, kind)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(model.Entity); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be git.sr.ht/~sircmpwn/git.sr.ht/api/graph/model.Entity`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ 4064,10 4640,11 @@ func (ec *executionContext) _Repository_name(ctx context.Context, field graphql.
}
}()
fc := &graphql.FieldContext{
- Object: "Repository",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Repository",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 4098,10 4675,11 @@ func (ec *executionContext) _Repository_description(ctx context.Context, field g
}
}()
fc := &graphql.FieldContext{
- Object: "Repository",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Repository",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 4129,10 4707,11 @@ func (ec *executionContext) _Repository_visibility(ctx context.Context, field gr
}
}()
fc := &graphql.FieldContext{
- Object: "Repository",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Repository",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 4163,10 4742,11 @@ func (ec *executionContext) _Repository_upstreamUrl(ctx context.Context, field g
}
}()
fc := &graphql.FieldContext{
- Object: "Repository",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Repository",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 4194,10 4774,11 @@ func (ec *executionContext) _Repository_accessControlList(ctx context.Context, f
}
}()
fc := &graphql.FieldContext{
- Object: "Repository",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Repository",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 4209,8 4790,36 @@ func (ec *executionContext) _Repository_accessControlList(ctx context.Context, f
}
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.Repository().AccessControlList(rctx, obj, args["cursor"].(*model1.Cursor))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Repository().AccessControlList(rctx, obj, args["cursor"].(*model1.Cursor))
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "ACLS")
+ if err != nil {
+ return nil, err
+ }
+ kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
+ if err != nil {
+ return nil, err
+ }
+ if ec.directives.Access == nil {
+ return nil, errors.New("directive access is not implemented")
+ }
+ return ec.directives.Access(ctx, obj, directive0, scope, kind)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*model.ACLCursor); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/git.sr.ht/api/graph/model.ACLCursor`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ 4235,10 4844,11 @@ func (ec *executionContext) _Repository_objects(ctx context.Context, field graph
}
}()
fc := &graphql.FieldContext{
- Object: "Repository",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Repository",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 4250,8 4860,36 @@ func (ec *executionContext) _Repository_objects(ctx context.Context, field graph
}
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.Repository().Objects(rctx, obj, args["ids"].([]string))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Repository().Objects(rctx, obj, args["ids"].([]string))
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "OBJECTS")
+ if err != nil {
+ return nil, err
+ }
+ kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
+ if err != nil {
+ return nil, err
+ }
+ if ec.directives.Access == nil {
+ return nil, errors.New("directive access is not implemented")
+ }
+ return ec.directives.Access(ctx, obj, directive0, scope, kind)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.([]model.Object); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be []git.sr.ht/~sircmpwn/git.sr.ht/api/graph/model.Object`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ 4276,10 4914,11 @@ func (ec *executionContext) _Repository_references(ctx context.Context, field gr
}
}()
fc := &graphql.FieldContext{
- Object: "Repository",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Repository",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 4291,8 4930,36 @@ func (ec *executionContext) _Repository_references(ctx context.Context, field gr
}
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.Repository().References(rctx, obj, args["cursor"].(*model1.Cursor))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Repository().References(rctx, obj, args["cursor"].(*model1.Cursor))
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "OBJECTS")
+ if err != nil {
+ return nil, err
+ }
+ kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
+ if err != nil {
+ return nil, err
+ }
+ if ec.directives.Access == nil {
+ return nil, errors.New("directive access is not implemented")
+ }
+ return ec.directives.Access(ctx, obj, directive0, scope, kind)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*model.ReferenceCursor); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/git.sr.ht/api/graph/model.ReferenceCursor`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ 4317,16 4984,45 @@ func (ec *executionContext) _Repository_HEAD(ctx context.Context, field graphql.
}
}()
fc := &graphql.FieldContext{
- Object: "Repository",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Repository",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Head(), nil
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Head(), nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "OBJECTS")
+ if err != nil {
+ return nil, err
+ }
+ kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
+ if err != nil {
+ return nil, err
+ }
+ if ec.directives.Access == nil {
+ return nil, errors.New("directive access is not implemented")
+ }
+ return ec.directives.Access(ctx, obj, directive0, scope, kind)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*model.Reference); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/git.sr.ht/api/graph/model.Reference`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ 4348,10 5044,11 @@ func (ec *executionContext) _Repository_log(ctx context.Context, field graphql.C
}
}()
fc := &graphql.FieldContext{
- Object: "Repository",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Repository",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 4363,8 5060,36 @@ func (ec *executionContext) _Repository_log(ctx context.Context, field graphql.C
}
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.Repository().Log(rctx, obj, args["cursor"].(*model1.Cursor), args["from"].(*string))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Repository().Log(rctx, obj, args["cursor"].(*model1.Cursor), args["from"].(*string))
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "OBJECTS")
+ if err != nil {
+ return nil, err
+ }
+ kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
+ if err != nil {
+ return nil, err
+ }
+ if ec.directives.Access == nil {
+ return nil, errors.New("directive access is not implemented")
+ }
+ return ec.directives.Access(ctx, obj, directive0, scope, kind)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*model.CommitCursor); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/git.sr.ht/api/graph/model.CommitCursor`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ 4389,10 5114,11 @@ func (ec *executionContext) _Repository_path(ctx context.Context, field graphql.
}
}()
fc := &graphql.FieldContext{
- Object: "Repository",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Repository",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 4404,8 5130,36 @@ func (ec *executionContext) _Repository_path(ctx context.Context, field graphql.
}
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.Repository().Path(rctx, obj, args["revspec"].(*string), args["path"].(string))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Repository().Path(rctx, obj, args["revspec"].(*string), args["path"].(string))
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "OBJECTS")
+ if err != nil {
+ return nil, err
+ }
+ kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
+ if err != nil {
+ return nil, err
+ }
+ if ec.directives.Access == nil {
+ return nil, errors.New("directive access is not implemented")
+ }
+ return ec.directives.Access(ctx, obj, directive0, scope, kind)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*model.TreeEntry); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/git.sr.ht/api/graph/model.TreeEntry`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ 4427,10 5181,11 @@ func (ec *executionContext) _Repository_revparse_single(ctx context.Context, fie
}
}()
fc := &graphql.FieldContext{
- Object: "Repository",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Repository",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 4442,8 5197,36 @@ func (ec *executionContext) _Repository_revparse_single(ctx context.Context, fie
}
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.Repository().RevparseSingle(rctx, obj, args["revspec"].(string))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Repository().RevparseSingle(rctx, obj, args["revspec"].(string))
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "OBJECTS")
+ if err != nil {
+ return nil, err
+ }
+ kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
+ if err != nil {
+ return nil, err
+ }
+ if ec.directives.Access == nil {
+ return nil, errors.New("directive access is not implemented")
+ }
+ return ec.directives.Access(ctx, obj, directive0, scope, kind)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*model.Commit); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/git.sr.ht/api/graph/model.Commit`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ 4465,10 5248,11 @@ func (ec *executionContext) _RepositoryCursor_results(ctx context.Context, field
}
}()
fc := &graphql.FieldContext{
- Object: "RepositoryCursor",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "RepositoryCursor",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 4499,10 5283,11 @@ func (ec *executionContext) _RepositoryCursor_cursor(ctx context.Context, field
}
}()
fc := &graphql.FieldContext{
- Object: "RepositoryCursor",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "RepositoryCursor",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 4519,7 5304,7 @@ func (ec *executionContext) _RepositoryCursor_cursor(ctx context.Context, field
}
res := resTmp.(*model1.Cursor)
fc.Result = res
- return ec.marshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgqlᚗsrᚗhtᚋmodelᚐCursor(ctx, field.Selections, res)
+ return ec.marshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐCursor(ctx, field.Selections, res)
}
func (ec *executionContext) _Signature_name(ctx context.Context, field graphql.CollectedField, obj *model.Signature) (ret graphql.Marshaler) {
@@ 4530,10 5315,11 @@ func (ec *executionContext) _Signature_name(ctx context.Context, field graphql.C
}
}()
fc := &graphql.FieldContext{
- Object: "Signature",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Signature",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 4564,10 5350,11 @@ func (ec *executionContext) _Signature_email(ctx context.Context, field graphql.
}
}()
fc := &graphql.FieldContext{
- Object: "Signature",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Signature",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 4598,10 5385,11 @@ func (ec *executionContext) _Signature_time(ctx context.Context, field graphql.C
}
}()
fc := &graphql.FieldContext{
- Object: "Signature",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Signature",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 4632,10 5420,11 @@ func (ec *executionContext) _Tag_type(ctx context.Context, field graphql.Collect
}
}()
fc := &graphql.FieldContext{
- Object: "Tag",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Tag",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 4666,10 5455,11 @@ func (ec *executionContext) _Tag_id(ctx context.Context, field graphql.Collected
}
}()
fc := &graphql.FieldContext{
- Object: "Tag",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Tag",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 4700,10 5490,11 @@ func (ec *executionContext) _Tag_shortId(ctx context.Context, field graphql.Coll
}
}()
fc := &graphql.FieldContext{
- Object: "Tag",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Tag",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 4734,10 5525,11 @@ func (ec *executionContext) _Tag_raw(ctx context.Context, field graphql.Collecte
}
}()
fc := &graphql.FieldContext{
- Object: "Tag",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Tag",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 4768,10 5560,11 @@ func (ec *executionContext) _Tag_target(ctx context.Context, field graphql.Colle
}
}()
fc := &graphql.FieldContext{
- Object: "Tag",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Tag",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 4802,10 5595,11 @@ func (ec *executionContext) _Tag_name(ctx context.Context, field graphql.Collect
}
}()
fc := &graphql.FieldContext{
- Object: "Tag",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Tag",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 4836,10 5630,11 @@ func (ec *executionContext) _Tag_tagger(ctx context.Context, field graphql.Colle
}
}()
fc := &graphql.FieldContext{
- Object: "Tag",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Tag",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 4870,10 5665,11 @@ func (ec *executionContext) _Tag_message(ctx context.Context, field graphql.Coll
}
}()
fc := &graphql.FieldContext{
- Object: "Tag",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Tag",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 4901,10 5697,11 @@ func (ec *executionContext) _TextBlob_type(ctx context.Context, field graphql.Co
}
}()
fc := &graphql.FieldContext{
- Object: "TextBlob",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "TextBlob",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 4935,10 5732,11 @@ func (ec *executionContext) _TextBlob_id(ctx context.Context, field graphql.Coll
}
}()
fc := &graphql.FieldContext{
- Object: "TextBlob",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "TextBlob",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 4969,10 5767,11 @@ func (ec *executionContext) _TextBlob_shortId(ctx context.Context, field graphql
}
}()
fc := &graphql.FieldContext{
- Object: "TextBlob",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "TextBlob",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 5003,10 5802,11 @@ func (ec *executionContext) _TextBlob_raw(ctx context.Context, field graphql.Col
}
}()
fc := &graphql.FieldContext{
- Object: "TextBlob",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "TextBlob",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 5037,10 5837,11 @@ func (ec *executionContext) _TextBlob_text(ctx context.Context, field graphql.Co
}
}()
fc := &graphql.FieldContext{
- Object: "TextBlob",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "TextBlob",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 5071,10 5872,11 @@ func (ec *executionContext) _Tree_type(ctx context.Context, field graphql.Collec
}
}()
fc := &graphql.FieldContext{
- Object: "Tree",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Tree",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 5105,10 5907,11 @@ func (ec *executionContext) _Tree_id(ctx context.Context, field graphql.Collecte
}
}()
fc := &graphql.FieldContext{
- Object: "Tree",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Tree",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 5139,10 5942,11 @@ func (ec *executionContext) _Tree_shortId(ctx context.Context, field graphql.Col
}
}()
fc := &graphql.FieldContext{
- Object: "Tree",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Tree",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 5173,10 5977,11 @@ func (ec *executionContext) _Tree_raw(ctx context.Context, field graphql.Collect
}
}()
fc := &graphql.FieldContext{
- Object: "Tree",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Tree",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 5207,10 6012,11 @@ func (ec *executionContext) _Tree_entries(ctx context.Context, field graphql.Col
}
}()
fc := &graphql.FieldContext{
- Object: "Tree",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Tree",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 5248,10 6054,11 @@ func (ec *executionContext) _Tree_entry(ctx context.Context, field graphql.Colle
}
}()
fc := &graphql.FieldContext{
- Object: "Tree",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "Tree",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 5286,10 6093,11 @@ func (ec *executionContext) _TreeEntry_id(ctx context.Context, field graphql.Col
}
}()
fc := &graphql.FieldContext{
- Object: "TreeEntry",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "TreeEntry",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 5320,10 6128,11 @@ func (ec *executionContext) _TreeEntry_name(ctx context.Context, field graphql.C
}
}()
fc := &graphql.FieldContext{
- Object: "TreeEntry",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "TreeEntry",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 5354,10 6163,11 @@ func (ec *executionContext) _TreeEntry_object(ctx context.Context, field graphql
}
}()
fc := &graphql.FieldContext{
- Object: "TreeEntry",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "TreeEntry",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 5388,10 6198,11 @@ func (ec *executionContext) _TreeEntry_mode(ctx context.Context, field graphql.C
}
}()
fc := &graphql.FieldContext{
- Object: "TreeEntry",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "TreeEntry",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 5422,10 6233,11 @@ func (ec *executionContext) _TreeEntryCursor_results(ctx context.Context, field
}
}()
fc := &graphql.FieldContext{
- Object: "TreeEntryCursor",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "TreeEntryCursor",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 5456,10 6268,11 @@ func (ec *executionContext) _TreeEntryCursor_cursor(ctx context.Context, field g
}
}()
fc := &graphql.FieldContext{
- Object: "TreeEntryCursor",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "TreeEntryCursor",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 5476,7 6289,7 @@ func (ec *executionContext) _TreeEntryCursor_cursor(ctx context.Context, field g
}
res := resTmp.(*model1.Cursor)
fc.Result = res
- return ec.marshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgqlᚗsrᚗhtᚋmodelᚐCursor(ctx, field.Selections, res)
+ return ec.marshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐCursor(ctx, field.Selections, res)
}
func (ec *executionContext) _User_id(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
@@ 5487,10 6300,11 @@ func (ec *executionContext) _User_id(ctx context.Context, field graphql.Collecte
}
}()
fc := &graphql.FieldContext{
- Object: "User",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "User",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 5521,10 6335,11 @@ func (ec *executionContext) _User_created(ctx context.Context, field graphql.Col
}
}()
fc := &graphql.FieldContext{
- Object: "User",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "User",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 5555,10 6370,11 @@ func (ec *executionContext) _User_updated(ctx context.Context, field graphql.Col
}
}()
fc := &graphql.FieldContext{
- Object: "User",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "User",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 5589,10 6405,11 @@ func (ec *executionContext) _User_canonicalName(ctx context.Context, field graph
}
}()
fc := &graphql.FieldContext{
- Object: "User",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "User",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 5623,10 6440,11 @@ func (ec *executionContext) _User_username(ctx context.Context, field graphql.Co
}
}()
fc := &graphql.FieldContext{
- Object: "User",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "User",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 5657,10 6475,11 @@ func (ec *executionContext) _User_email(ctx context.Context, field graphql.Colle
}
}()
fc := &graphql.FieldContext{
- Object: "User",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "User",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 5691,10 6510,11 @@ func (ec *executionContext) _User_url(ctx context.Context, field graphql.Collect
}
}()
fc := &graphql.FieldContext{
- Object: "User",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "User",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 5722,10 6542,11 @@ func (ec *executionContext) _User_location(ctx context.Context, field graphql.Co
}
}()
fc := &graphql.FieldContext{
- Object: "User",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "User",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 5753,10 6574,11 @@ func (ec *executionContext) _User_bio(ctx context.Context, field graphql.Collect
}
}()
fc := &graphql.FieldContext{
- Object: "User",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "User",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 5784,10 6606,11 @@ func (ec *executionContext) _User_repositories(ctx context.Context, field graphq
}
}()
fc := &graphql.FieldContext{
- Object: "User",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "User",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: true,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 5799,8 6622,36 @@ func (ec *executionContext) _User_repositories(ctx context.Context, field graphq
}
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.User().Repositories(rctx, obj, args["cursor"].(*model1.Cursor), args["filter"].(*model1.Filter))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.User().Repositories(rctx, obj, args["cursor"].(*model1.Cursor), args["filter"].(*model1.Filter))
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "REPOSITORIES")
+ if err != nil {
+ return nil, err
+ }
+ kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
+ if err != nil {
+ return nil, err
+ }
+ if ec.directives.Access == nil {
+ return nil, errors.New("directive access is not implemented")
+ }
+ return ec.directives.Access(ctx, obj, directive0, scope, kind)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*model.RepositoryCursor); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/git.sr.ht/api/graph/model.RepositoryCursor`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ 5825,10 6676,11 @@ func (ec *executionContext) _Version_major(ctx context.Context, field graphql.Co
}
}()
fc := &graphql.FieldContext{
- Object: "Version",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Version",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 5859,10 6711,11 @@ func (ec *executionContext) _Version_minor(ctx context.Context, field graphql.Co
}
}()
fc := &graphql.FieldContext{
- Object: "Version",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Version",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 5893,10 6746,11 @@ func (ec *executionContext) _Version_patch(ctx context.Context, field graphql.Co
}
}()
fc := &graphql.FieldContext{
- Object: "Version",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Version",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 5927,10 6781,11 @@ func (ec *executionContext) _Version_deprecationDate(ctx context.Context, field
}
}()
fc := &graphql.FieldContext{
- Object: "Version",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "Version",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 5958,10 6813,11 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql
}
}()
fc := &graphql.FieldContext{
- Object: "__Directive",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "__Directive",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 5992,10 6848,11 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field
}
}()
fc := &graphql.FieldContext{
- Object: "__Directive",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "__Directive",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 6023,10 6880,11 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr
}
}()
fc := &graphql.FieldContext{
- Object: "__Directive",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "__Directive",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 6057,10 6915,11 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql
}
}()
fc := &graphql.FieldContext{
- Object: "__Directive",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "__Directive",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 6091,10 6950,11 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql
}
}()
fc := &graphql.FieldContext{
- Object: "__EnumValue",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "__EnumValue",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 6125,10 6985,11 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field
}
}()
fc := &graphql.FieldContext{
- Object: "__EnumValue",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "__EnumValue",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 6156,10 7017,11 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field
}
}()
fc := &graphql.FieldContext{
- Object: "__EnumValue",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "__EnumValue",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 6190,10 7052,11 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context,
}
}()
fc := &graphql.FieldContext{
- Object: "__EnumValue",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "__EnumValue",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 6221,10 7084,11 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col
}
}()
fc := &graphql.FieldContext{
- Object: "__Field",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "__Field",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 6255,10 7119,11 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap
}
}()
fc := &graphql.FieldContext{
- Object: "__Field",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "__Field",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 6286,10 7151,11 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col
}
}()
fc := &graphql.FieldContext{
- Object: "__Field",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "__Field",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 6320,10 7186,11 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col
}
}()
fc := &graphql.FieldContext{
- Object: "__Field",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "__Field",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 6354,10 7221,11 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra
}
}()
fc := &graphql.FieldContext{
- Object: "__Field",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "__Field",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 6388,10 7256,11 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel
}
}()
fc := &graphql.FieldContext{
- Object: "__Field",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "__Field",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 6419,10 7288,11 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq
}
}()
fc := &graphql.FieldContext{
- Object: "__InputValue",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "__InputValue",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 6453,10 7323,11 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field
}
}()
fc := &graphql.FieldContext{
- Object: "__InputValue",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "__InputValue",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 6484,10 7355,11 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq
}
}()
fc := &graphql.FieldContext{
- Object: "__InputValue",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "__InputValue",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 6518,10 7390,11 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel
}
}()
fc := &graphql.FieldContext{
- Object: "__InputValue",
- Field: field,
- Args: nil,
- IsMethod: false,
+ Object: "__InputValue",
+ Field: field,
+ Args: nil,
+ IsMethod: false,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 6549,10 7422,11 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C
}
}()
fc := &graphql.FieldContext{
- Object: "__Schema",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "__Schema",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 6583,10 7457,11 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph
}
}()
fc := &graphql.FieldContext{
- Object: "__Schema",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "__Schema",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 6617,10 7492,11 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr
}
}()
fc := &graphql.FieldContext{
- Object: "__Schema",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "__Schema",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 6648,10 7524,11 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel
}
}()
fc := &graphql.FieldContext{
- Object: "__Schema",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "__Schema",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 6679,10 7556,11 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap
}
}()
fc := &graphql.FieldContext{
- Object: "__Schema",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "__Schema",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 6713,10 7591,11 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll
}
}()
fc := &graphql.FieldContext{
- Object: "__Type",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "__Type",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 6747,10 7626,11 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll
}
}()
fc := &graphql.FieldContext{
- Object: "__Type",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "__Type",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 6778,10 7658,11 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph
}
}()
fc := &graphql.FieldContext{
- Object: "__Type",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "__Type",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 6809,10 7690,11 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co
}
}()
fc := &graphql.FieldContext{
- Object: "__Type",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "__Type",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 6847,10 7729,11 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq
}
}()
fc := &graphql.FieldContext{
- Object: "__Type",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "__Type",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 6878,10 7761,11 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra
}
}()
fc := &graphql.FieldContext{
- Object: "__Type",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "__Type",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 6909,10 7793,11 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq
}
}()
fc := &graphql.FieldContext{
- Object: "__Type",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "__Type",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 6947,10 7832,11 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph
}
}()
fc := &graphql.FieldContext{
- Object: "__Type",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "__Type",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 6978,10 7864,11 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co
}
}()
fc := &graphql.FieldContext{
- Object: "__Type",
- Field: field,
- Args: nil,
- IsMethod: true,
+ Object: "__Type",
+ Field: field,
+ Args: nil,
+ IsMethod: true,
+ IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 7017,12 7904,16 @@ func (ec *executionContext) unmarshalInputFilter(ctx context.Context, obj interf
switch k {
case "count":
var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("count"))
it.Count, err = ec.unmarshalOInt2ᚖint(ctx, v)
if err != nil {
return it, err
}
case "search":
var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("search"))
it.Search, err = ec.unmarshalOString2ᚖstring(ctx, v)
if err != nil {
return it, err
@@ 7041,18 7932,24 @@ func (ec *executionContext) unmarshalInputRepoInput(ctx context.Context, obj int
switch k {
case "name":
var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
it.Name, err = ec.unmarshalNString2string(ctx, v)
if err != nil {
return it, err
}
case "description":
var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("description"))
it.Description, err = ec.unmarshalOString2ᚖstring(ctx, v)
if err != nil {
return it, err
}
case "visibility":
var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("visibility"))
it.Visibility, err = ec.unmarshalOVisibility2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐVisibility(ctx, v)
if err != nil {
return it, err
@@ 8610,15 9507,36 @@ func (ec *executionContext) marshalNACLCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgi
return ec._ACLCursor(ctx, sel, v)
}
+func (ec *executionContext) unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx context.Context, v interface{}) (model.AccessKind, error) {
+ var res model.AccessKind
+ err := res.UnmarshalGQL(v)
+ return res, graphql.ErrorOnPath(ctx, err)
+}
+
+func (ec *executionContext) marshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx context.Context, sel ast.SelectionSet, v model.AccessKind) graphql.Marshaler {
+ return v
+}
+
func (ec *executionContext) unmarshalNAccessMode2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessMode(ctx context.Context, v interface{}) (model.AccessMode, error) {
var res model.AccessMode
- return res, res.UnmarshalGQL(v)
+ err := res.UnmarshalGQL(v)
+ return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalNAccessMode2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessMode(ctx context.Context, sel ast.SelectionSet, v model.AccessMode) graphql.Marshaler {
return v
}
+func (ec *executionContext) unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx context.Context, v interface{}) (model.AccessScope, error) {
+ var res model.AccessScope
+ err := res.UnmarshalGQL(v)
+ return res, graphql.ErrorOnPath(ctx, err)
+}
+
+func (ec *executionContext) marshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx context.Context, sel ast.SelectionSet, v model.AccessScope) graphql.Marshaler {
+ return v
+}
+
func (ec *executionContext) marshalNArtifact2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐArtifact(ctx context.Context, sel ast.SelectionSet, v model.Artifact) graphql.Marshaler {
return ec._Artifact(ctx, sel, &v)
}
@@ 8685,7 9603,8 @@ func (ec *executionContext) marshalNArtifactCursor2ᚖgitᚗsrᚗhtᚋאsircmpwn
}
func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) {
- return graphql.UnmarshalBoolean(v)
+ res, err := graphql.UnmarshalBoolean(v)
+ return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler {
@@ 8698,10 9617,6 @@ func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.Se
return res
}
-func (ec *executionContext) marshalNCommit2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐCommit(ctx context.Context, sel ast.SelectionSet, v model.Commit) graphql.Marshaler {
- return ec._Commit(ctx, sel, &v)
-}
-
func (ec *executionContext) marshalNCommit2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐCommit(ctx context.Context, sel ast.SelectionSet, v []*model.Commit) graphql.Marshaler {
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
@@ 8811,7 9726,8 @@ func (ec *executionContext) marshalNEntity2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsr
}
func (ec *executionContext) unmarshalNID2string(ctx context.Context, v interface{}) (string, error) {
- return graphql.UnmarshalID(v)
+ res, err := graphql.UnmarshalID(v)
+ return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalNID2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
@@ 8825,7 9741,8 @@ func (ec *executionContext) marshalNID2string(ctx context.Context, sel ast.Selec
}
func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{}) (int, error) {
- return graphql.UnmarshalInt(v)
+ res, err := graphql.UnmarshalInt(v)
+ return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler {
@@ 8887,7 9804,8 @@ func (ec *executionContext) marshalNObject2ᚕgitᚗsrᚗhtᚋאsircmpwnᚋgit
func (ec *executionContext) unmarshalNObjectType2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐObjectType(ctx context.Context, v interface{}) (model.ObjectType, error) {
var res model.ObjectType
- return res, res.UnmarshalGQL(v)
+ err := res.UnmarshalGQL(v)
+ return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalNObjectType2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐObjectType(ctx context.Context, sel ast.SelectionSet, v model.ObjectType) graphql.Marshaler {
@@ 9010,10 9928,6 @@ func (ec *executionContext) marshalNRepositoryCursor2ᚖgitᚗsrᚗhtᚋאsircmp
return ec._RepositoryCursor(ctx, sel, v)
}
-func (ec *executionContext) marshalNSignature2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐSignature(ctx context.Context, sel ast.SelectionSet, v model.Signature) graphql.Marshaler {
- return ec._Signature(ctx, sel, &v)
-}
-
func (ec *executionContext) marshalNSignature2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐSignature(ctx context.Context, sel ast.SelectionSet, v *model.Signature) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
@@ 9025,7 9939,8 @@ func (ec *executionContext) marshalNSignature2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgi
}
func (ec *executionContext) unmarshalNString2string(ctx context.Context, v interface{}) (string, error) {
- return graphql.UnmarshalString(v)
+ res, err := graphql.UnmarshalString(v)
+ return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
@@ 9039,7 9954,8 @@ func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.S
}
func (ec *executionContext) unmarshalNTime2timeᚐTime(ctx context.Context, v interface{}) (time.Time, error) {
- return graphql.UnmarshalTime(v)
+ res, err := graphql.UnmarshalTime(v)
+ return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalNTime2timeᚐTime(ctx context.Context, sel ast.SelectionSet, v time.Time) graphql.Marshaler {
@@ 9052,10 9968,6 @@ func (ec *executionContext) marshalNTime2timeᚐTime(ctx context.Context, sel as
return res
}
-func (ec *executionContext) marshalNTree2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTree(ctx context.Context, sel ast.SelectionSet, v model.Tree) graphql.Marshaler {
- return ec._Tree(ctx, sel, &v)
-}
-
func (ec *executionContext) marshalNTree2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTree(ctx context.Context, sel ast.SelectionSet, v *model.Tree) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
@@ 9118,7 10030,8 @@ func (ec *executionContext) marshalNTreeEntryCursor2ᚖgitᚗsrᚗhtᚋאsircmpw
}
func (ec *executionContext) unmarshalNUpload2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚐUpload(ctx context.Context, v interface{}) (graphql.Upload, error) {
- return graphql.UnmarshalUpload(v)
+ res, err := graphql.UnmarshalUpload(v)
+ return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalNUpload2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚐUpload(ctx context.Context, sel ast.SelectionSet, v graphql.Upload) graphql.Marshaler {
@@ 9161,7 10074,8 @@ func (ec *executionContext) marshalNVersion2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgit
func (ec *executionContext) unmarshalNVisibility2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐVisibility(ctx context.Context, v interface{}) (model.Visibility, error) {
var res model.Visibility
- return res, res.UnmarshalGQL(v)
+ err := res.UnmarshalGQL(v)
+ return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalNVisibility2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐVisibility(ctx context.Context, sel ast.SelectionSet, v model.Visibility) graphql.Marshaler {
@@ 9210,7 10124,8 @@ func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgq
}
func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Context, v interface{}) (string, error) {
- return graphql.UnmarshalString(v)
+ res, err := graphql.UnmarshalString(v)
+ return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
@@ 9235,6 10150,7 @@ func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx conte
var err error
res := make([]string, len(vSlice))
for i := range vSlice {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
res[i], err = ec.unmarshalN__DirectiveLocation2string(ctx, vSlice[i])
if err != nil {
return nil, err
@@ 9381,7 10297,8 @@ func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgen
}
func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v interface{}) (string, error) {
- return graphql.UnmarshalString(v)
+ res, err := graphql.UnmarshalString(v)
+ return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
@@ 9394,10 10311,6 @@ func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel a
return res
}
-func (ec *executionContext) marshalOACL2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐACL(ctx context.Context, sel ast.SelectionSet, v model.ACL) graphql.Marshaler {
- return ec._ACL(ctx, sel, &v)
-}
-
func (ec *executionContext) marshalOACL2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐACL(ctx context.Context, sel ast.SelectionSet, v *model.ACL) graphql.Marshaler {
if v == nil {
return graphql.Null
@@ 9405,21 10318,13 @@ func (ec *executionContext) marshalOACL2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsr
return ec._ACL(ctx, sel, v)
}
-func (ec *executionContext) unmarshalOAccessMode2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessMode(ctx context.Context, v interface{}) (model.AccessMode, error) {
- var res model.AccessMode
- return res, res.UnmarshalGQL(v)
-}
-
-func (ec *executionContext) marshalOAccessMode2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessMode(ctx context.Context, sel ast.SelectionSet, v model.AccessMode) graphql.Marshaler {
- return v
-}
-
func (ec *executionContext) unmarshalOAccessMode2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessMode(ctx context.Context, v interface{}) (*model.AccessMode, error) {
if v == nil {
return nil, nil
}
- res, err := ec.unmarshalOAccessMode2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessMode(ctx, v)
- return &res, err
+ var res = new(model.AccessMode)
+ err := res.UnmarshalGQL(v)
+ return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalOAccessMode2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessMode(ctx context.Context, sel ast.SelectionSet, v *model.AccessMode) graphql.Marshaler {
@@ 9429,10 10334,6 @@ func (ec *executionContext) marshalOAccessMode2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋg
return v
}
-func (ec *executionContext) marshalOArtifact2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐArtifact(ctx context.Context, sel ast.SelectionSet, v model.Artifact) graphql.Marshaler {
- return ec._Artifact(ctx, sel, &v)
-}
-
func (ec *executionContext) marshalOArtifact2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐArtifact(ctx context.Context, sel ast.SelectionSet, v *model.Artifact) graphql.Marshaler {
if v == nil {
return graphql.Null
@@ 9441,7 10342,8 @@ func (ec *executionContext) marshalOArtifact2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgit
}
func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) {
- return graphql.UnmarshalBoolean(v)
+ res, err := graphql.UnmarshalBoolean(v)
+ return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler {
@@ 9452,19 10354,15 @@ func (ec *executionContext) unmarshalOBoolean2ᚖbool(ctx context.Context, v int
if v == nil {
return nil, nil
}
- res, err := ec.unmarshalOBoolean2bool(ctx, v)
- return &res, err
+ res, err := graphql.UnmarshalBoolean(v)
+ return &res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler {
if v == nil {
return graphql.Null
}
- return ec.marshalOBoolean2bool(ctx, sel, *v)
-}
-
-func (ec *executionContext) marshalOCommit2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐCommit(ctx context.Context, sel ast.SelectionSet, v model.Commit) graphql.Marshaler {
- return ec._Commit(ctx, sel, &v)
+ return graphql.MarshalBoolean(*v)
}
func (ec *executionContext) marshalOCommit2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐCommit(ctx context.Context, sel ast.SelectionSet, v *model.Commit) graphql.Marshaler {
@@ 9474,63 10372,43 @@ func (ec *executionContext) marshalOCommit2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgit
return ec._Commit(ctx, sel, v)
}
-func (ec *executionContext) unmarshalOCursor2gitᚗsrᚗhtᚋאsircmpwnᚋgqlᚗsrᚗhtᚋmodelᚐCursor(ctx context.Context, v interface{}) (model1.Cursor, error) {
- var res model1.Cursor
- return res, res.UnmarshalGQL(v)
-}
-
-func (ec *executionContext) marshalOCursor2gitᚗsrᚗhtᚋאsircmpwnᚋgqlᚗsrᚗhtᚋmodelᚐCursor(ctx context.Context, sel ast.SelectionSet, v model1.Cursor) graphql.Marshaler {
- return v
-}
-
-func (ec *executionContext) unmarshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgqlᚗsrᚗhtᚋmodelᚐCursor(ctx context.Context, v interface{}) (*model1.Cursor, error) {
+func (ec *executionContext) unmarshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐCursor(ctx context.Context, v interface{}) (*model1.Cursor, error) {
if v == nil {
return nil, nil
}
- res, err := ec.unmarshalOCursor2gitᚗsrᚗhtᚋאsircmpwnᚋgqlᚗsrᚗhtᚋmodelᚐCursor(ctx, v)
- return &res, err
+ var res = new(model1.Cursor)
+ err := res.UnmarshalGQL(v)
+ return res, graphql.ErrorOnPath(ctx, err)
}
-func (ec *executionContext) marshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgqlᚗsrᚗhtᚋmodelᚐCursor(ctx context.Context, sel ast.SelectionSet, v *model1.Cursor) graphql.Marshaler {
+func (ec *executionContext) marshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐCursor(ctx context.Context, sel ast.SelectionSet, v *model1.Cursor) graphql.Marshaler {
if v == nil {
return graphql.Null
}
return v
}
-func (ec *executionContext) unmarshalOFilter2gitᚗsrᚗhtᚋאsircmpwnᚋgqlᚗsrᚗhtᚋmodelᚐFilter(ctx context.Context, v interface{}) (model1.Filter, error) {
- return ec.unmarshalInputFilter(ctx, v)
-}
-
-func (ec *executionContext) unmarshalOFilter2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgqlᚗsrᚗhtᚋmodelᚐFilter(ctx context.Context, v interface{}) (*model1.Filter, error) {
+func (ec *executionContext) unmarshalOFilter2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐFilter(ctx context.Context, v interface{}) (*model1.Filter, error) {
if v == nil {
return nil, nil
}
- res, err := ec.unmarshalOFilter2gitᚗsrᚗhtᚋאsircmpwnᚋgqlᚗsrᚗhtᚋmodelᚐFilter(ctx, v)
- return &res, err
-}
-
-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)
+ res, err := ec.unmarshalInputFilter(ctx, v)
+ return &res, graphql.ErrorOnPath(ctx, err)
}
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
+ res, err := graphql.UnmarshalInt(v)
+ return &res, graphql.ErrorOnPath(ctx, 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)
+ return graphql.MarshalInt(*v)
}
func (ec *executionContext) marshalOObject2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐObject(ctx context.Context, sel ast.SelectionSet, v model.Object) graphql.Marshaler {
@@ 9540,10 10418,6 @@ func (ec *executionContext) marshalOObject2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsr
return ec._Object(ctx, sel, v)
}
-func (ec *executionContext) marshalOReference2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐReference(ctx context.Context, sel ast.SelectionSet, v model.Reference) graphql.Marshaler {
- return ec._Reference(ctx, sel, &v)
-}
-
func (ec *executionContext) marshalOReference2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐReference(ctx context.Context, sel ast.SelectionSet, v *model.Reference) graphql.Marshaler {
if v == nil {
return graphql.Null
@@ 9551,20 10425,12 @@ func (ec *executionContext) marshalOReference2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgi
return ec._Reference(ctx, sel, v)
}
-func (ec *executionContext) unmarshalORepoInput2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐRepoInput(ctx context.Context, v interface{}) (model.RepoInput, error) {
- return ec.unmarshalInputRepoInput(ctx, v)
-}
-
func (ec *executionContext) unmarshalORepoInput2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐRepoInput(ctx context.Context, v interface{}) (*model.RepoInput, error) {
if v == nil {
return nil, nil
}
- res, err := ec.unmarshalORepoInput2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐRepoInput(ctx, v)
- return &res, err
-}
-
-func (ec *executionContext) marshalORepository2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐRepository(ctx context.Context, sel ast.SelectionSet, v model.Repository) graphql.Marshaler {
- return ec._Repository(ctx, sel, &v)
+ res, err := ec.unmarshalInputRepoInput(ctx, v)
+ return &res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalORepository2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐRepository(ctx context.Context, sel ast.SelectionSet, v *model.Repository) graphql.Marshaler {
@@ 9574,10 10440,6 @@ func (ec *executionContext) marshalORepository2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋg
return ec._Repository(ctx, sel, v)
}
-func (ec *executionContext) marshalORepositoryCursor2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐRepositoryCursor(ctx context.Context, sel ast.SelectionSet, v model.RepositoryCursor) graphql.Marshaler {
- return ec._RepositoryCursor(ctx, sel, &v)
-}
-
func (ec *executionContext) marshalORepositoryCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐRepositoryCursor(ctx context.Context, sel ast.SelectionSet, v *model.RepositoryCursor) graphql.Marshaler {
if v == nil {
return graphql.Null
@@ 9586,7 10448,8 @@ func (ec *executionContext) marshalORepositoryCursor2ᚖgitᚗsrᚗhtᚋאsircmp
}
func (ec *executionContext) unmarshalOString2string(ctx context.Context, v interface{}) (string, error) {
- return graphql.UnmarshalString(v)
+ res, err := graphql.UnmarshalString(v)
+ return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalOString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
@@ 9594,6 10457,9 @@ func (ec *executionContext) marshalOString2string(ctx context.Context, sel ast.S
}
func (ec *executionContext) unmarshalOString2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) {
+ if v == nil {
+ return nil, nil
+ }
var vSlice []interface{}
if v != nil {
if tmp1, ok := v.([]interface{}); ok {
@@ 9605,6 10471,7 @@ func (ec *executionContext) unmarshalOString2ᚕstringᚄ(ctx context.Context, v
var err error
res := make([]string, len(vSlice))
for i := range vSlice {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
res[i], err = ec.unmarshalNString2string(ctx, vSlice[i])
if err != nil {
return nil, err
@@ 9629,42 10496,30 @@ func (ec *executionContext) unmarshalOString2ᚖstring(ctx context.Context, v in
if v == nil {
return nil, nil
}
- res, err := ec.unmarshalOString2string(ctx, v)
- return &res, err
+ res, err := graphql.UnmarshalString(v)
+ return &res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler {
if v == nil {
return graphql.Null
}
- 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)
+ return graphql.MarshalString(*v)
}
func (ec *executionContext) unmarshalOTime2ᚖtimeᚐTime(ctx context.Context, v interface{}) (*time.Time, error) {
if v == nil {
return nil, nil
}
- res, err := ec.unmarshalOTime2timeᚐTime(ctx, v)
- return &res, err
+ res, err := graphql.UnmarshalTime(v)
+ return &res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalOTime2ᚖtimeᚐTime(ctx context.Context, sel ast.SelectionSet, v *time.Time) graphql.Marshaler {
if v == nil {
return graphql.Null
}
- return ec.marshalOTime2timeᚐTime(ctx, sel, *v)
-}
-
-func (ec *executionContext) marshalOTreeEntry2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTreeEntry(ctx context.Context, sel ast.SelectionSet, v model.TreeEntry) graphql.Marshaler {
- return ec._TreeEntry(ctx, sel, &v)
+ return graphql.MarshalTime(*v)
}
func (ec *executionContext) marshalOTreeEntry2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTreeEntry(ctx context.Context, sel ast.SelectionSet, v *model.TreeEntry) graphql.Marshaler {
@@ 9674,10 10529,6 @@ func (ec *executionContext) marshalOTreeEntry2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgi
return ec._TreeEntry(ctx, sel, v)
}
-func (ec *executionContext) marshalOUser2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐUser(ctx context.Context, sel ast.SelectionSet, v model.User) graphql.Marshaler {
- return ec._User(ctx, sel, &v)
-}
-
func (ec *executionContext) marshalOUser2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐUser(ctx context.Context, sel ast.SelectionSet, v *model.User) graphql.Marshaler {
if v == nil {
return graphql.Null
@@ 9685,21 10536,13 @@ func (ec *executionContext) marshalOUser2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgitᚗs
return ec._User(ctx, sel, v)
}
-func (ec *executionContext) unmarshalOVisibility2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐVisibility(ctx context.Context, v interface{}) (model.Visibility, error) {
- var res model.Visibility
- return res, res.UnmarshalGQL(v)
-}
-
-func (ec *executionContext) marshalOVisibility2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐVisibility(ctx context.Context, sel ast.SelectionSet, v model.Visibility) graphql.Marshaler {
- return v
-}
-
func (ec *executionContext) unmarshalOVisibility2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐVisibility(ctx context.Context, v interface{}) (*model.Visibility, error) {
if v == nil {
return nil, nil
}
- res, err := ec.unmarshalOVisibility2gitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐVisibility(ctx, v)
- return &res, err
+ var res = new(model.Visibility)
+ err := res.UnmarshalGQL(v)
+ return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalOVisibility2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgitᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐVisibility(ctx context.Context, sel ast.SelectionSet, v *model.Visibility) graphql.Marshaler {
@@ 9829,10 10672,6 @@ func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋg
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
@@ 9840,10 10679,6 @@ func (ec *executionContext) marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlge
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