// Code generated by github.com/99designs/gqlgen, DO NOT EDIT. package search import ( "bytes" "context" "errors" "strconv" "sync" "time" "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/introspection" gqlparser "github.com/vektah/gqlparser/v2" "github.com/vektah/gqlparser/v2/ast" ) // region ************************** generated!.gotpl ************************** // NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface. func NewExecutableSchema(cfg Config) graphql.ExecutableSchema { return &executableSchema{ resolvers: cfg.Resolvers, directives: cfg.Directives, complexity: cfg.Complexity, } } type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot } type ResolverRoot interface { Query() QueryResolver } type DirectiveRoot struct { Deprecated func(ctx context.Context, obj interface{}, next graphql.Resolver, reason *string) (res interface{}, err error) Include func(ctx context.Context, obj interface{}, next graphql.Resolver, ifArg bool) (res interface{}, err error) Skip func(ctx context.Context, obj interface{}, next graphql.Resolver, ifArg bool) (res interface{}, err error) } type ComplexityRoot struct { Cve struct { Description func(childComplexity int) int ID func(childComplexity int) int PackageList func(childComplexity int) int Severity func(childComplexity int) int Title func(childComplexity int) int } CVEResultForImage struct { CVEList func(childComplexity int) int Tag func(childComplexity int) int } ImageInfo struct { Description func(childComplexity int) int Labels func(childComplexity int) int LastUpdated func(childComplexity int) int Latest func(childComplexity int) int Licenses func(childComplexity int) int Name func(childComplexity int) int Size func(childComplexity int) int Vendor func(childComplexity int) int } ImgResultForCve struct { Name func(childComplexity int) int Tags func(childComplexity int) int } ImgResultForDigest struct { Name func(childComplexity int) int Tags func(childComplexity int) int } ImgResultForFixedCve struct { Tags func(childComplexity int) int } PackageInfo struct { FixedVersion func(childComplexity int) int InstalledVersion func(childComplexity int) int Name func(childComplexity int) int } Query struct { CVEListForImage func(childComplexity int, image string) int ImageListForCve func(childComplexity int, id string) int ImageListForDigest func(childComplexity int, id string) int ImageListWithCVEFixed func(childComplexity int, id string, image string) int ImageListWithLatestTag func(childComplexity int) int } TagInfo struct { Digest func(childComplexity int) int Name func(childComplexity int) int Timestamp func(childComplexity int) int } } type QueryResolver interface { CVEListForImage(ctx context.Context, image string) (*CVEResultForImage, error) ImageListForCve(ctx context.Context, id string) ([]*ImgResultForCve, error) ImageListWithCVEFixed(ctx context.Context, id string, image string) (*ImgResultForFixedCve, error) ImageListForDigest(ctx context.Context, id string) ([]*ImgResultForDigest, error) ImageListWithLatestTag(ctx context.Context) ([]*ImageInfo, error) } type executableSchema struct { resolvers ResolverRoot directives DirectiveRoot complexity ComplexityRoot } func (e *executableSchema) Schema() *ast.Schema { return parsedSchema } func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) { ec := executionContext{nil, e} _ = ec switch typeName + "." + field { case "CVE.Description": if e.complexity.Cve.Description == nil { break } return e.complexity.Cve.Description(childComplexity), true case "CVE.Id": if e.complexity.Cve.ID == nil { break } return e.complexity.Cve.ID(childComplexity), true case "CVE.PackageList": if e.complexity.Cve.PackageList == nil { break } return e.complexity.Cve.PackageList(childComplexity), true case "CVE.Severity": if e.complexity.Cve.Severity == nil { break } return e.complexity.Cve.Severity(childComplexity), true case "CVE.Title": if e.complexity.Cve.Title == nil { break } return e.complexity.Cve.Title(childComplexity), true case "CVEResultForImage.CVEList": if e.complexity.CVEResultForImage.CVEList == nil { break } return e.complexity.CVEResultForImage.CVEList(childComplexity), true case "CVEResultForImage.Tag": if e.complexity.CVEResultForImage.Tag == nil { break } return e.complexity.CVEResultForImage.Tag(childComplexity), true case "ImageInfo.Description": if e.complexity.ImageInfo.Description == nil { break } return e.complexity.ImageInfo.Description(childComplexity), true case "ImageInfo.Labels": if e.complexity.ImageInfo.Labels == nil { break } return e.complexity.ImageInfo.Labels(childComplexity), true case "ImageInfo.LastUpdated": if e.complexity.ImageInfo.LastUpdated == nil { break } return e.complexity.ImageInfo.LastUpdated(childComplexity), true case "ImageInfo.Latest": if e.complexity.ImageInfo.Latest == nil { break } return e.complexity.ImageInfo.Latest(childComplexity), true case "ImageInfo.Licenses": if e.complexity.ImageInfo.Licenses == nil { break } return e.complexity.ImageInfo.Licenses(childComplexity), true case "ImageInfo.Name": if e.complexity.ImageInfo.Name == nil { break } return e.complexity.ImageInfo.Name(childComplexity), true case "ImageInfo.Size": if e.complexity.ImageInfo.Size == nil { break } return e.complexity.ImageInfo.Size(childComplexity), true case "ImageInfo.Vendor": if e.complexity.ImageInfo.Vendor == nil { break } return e.complexity.ImageInfo.Vendor(childComplexity), true case "ImgResultForCVE.Name": if e.complexity.ImgResultForCve.Name == nil { break } return e.complexity.ImgResultForCve.Name(childComplexity), true case "ImgResultForCVE.Tags": if e.complexity.ImgResultForCve.Tags == nil { break } return e.complexity.ImgResultForCve.Tags(childComplexity), true case "ImgResultForDigest.Name": if e.complexity.ImgResultForDigest.Name == nil { break } return e.complexity.ImgResultForDigest.Name(childComplexity), true case "ImgResultForDigest.Tags": if e.complexity.ImgResultForDigest.Tags == nil { break } return e.complexity.ImgResultForDigest.Tags(childComplexity), true case "ImgResultForFixedCVE.Tags": if e.complexity.ImgResultForFixedCve.Tags == nil { break } return e.complexity.ImgResultForFixedCve.Tags(childComplexity), true case "PackageInfo.FixedVersion": if e.complexity.PackageInfo.FixedVersion == nil { break } return e.complexity.PackageInfo.FixedVersion(childComplexity), true case "PackageInfo.InstalledVersion": if e.complexity.PackageInfo.InstalledVersion == nil { break } return e.complexity.PackageInfo.InstalledVersion(childComplexity), true case "PackageInfo.Name": if e.complexity.PackageInfo.Name == nil { break } return e.complexity.PackageInfo.Name(childComplexity), true case "Query.CVEListForImage": if e.complexity.Query.CVEListForImage == nil { break } args, err := ec.field_Query_CVEListForImage_args(context.TODO(), rawArgs) if err != nil { return 0, false } return e.complexity.Query.CVEListForImage(childComplexity, args["image"].(string)), true case "Query.ImageListForCVE": if e.complexity.Query.ImageListForCve == nil { break } args, err := ec.field_Query_ImageListForCVE_args(context.TODO(), rawArgs) if err != nil { return 0, false } return e.complexity.Query.ImageListForCve(childComplexity, args["id"].(string)), true case "Query.ImageListForDigest": if e.complexity.Query.ImageListForDigest == nil { break } args, err := ec.field_Query_ImageListForDigest_args(context.TODO(), rawArgs) if err != nil { return 0, false } return e.complexity.Query.ImageListForDigest(childComplexity, args["id"].(string)), true case "Query.ImageListWithCVEFixed": if e.complexity.Query.ImageListWithCVEFixed == nil { break } args, err := ec.field_Query_ImageListWithCVEFixed_args(context.TODO(), rawArgs) if err != nil { return 0, false } return e.complexity.Query.ImageListWithCVEFixed(childComplexity, args["id"].(string), args["image"].(string)), true case "Query.ImageListWithLatestTag": if e.complexity.Query.ImageListWithLatestTag == nil { break } return e.complexity.Query.ImageListWithLatestTag(childComplexity), true case "TagInfo.Digest": if e.complexity.TagInfo.Digest == nil { break } return e.complexity.TagInfo.Digest(childComplexity), true case "TagInfo.Name": if e.complexity.TagInfo.Name == nil { break } return e.complexity.TagInfo.Name(childComplexity), true case "TagInfo.Timestamp": if e.complexity.TagInfo.Timestamp == nil { break } return e.complexity.TagInfo.Timestamp(childComplexity), true } return 0, false } func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { rc := graphql.GetOperationContext(ctx) ec := executionContext{rc, e} first := true switch rc.Operation.Operation { case ast.Query: return func(ctx context.Context) *graphql.Response { if !first { return nil } first = false data := ec._Query(ctx, rc.Operation.SelectionSet) var buf bytes.Buffer data.MarshalGQL(&buf) return &graphql.Response{ Data: buf.Bytes(), } } default: return graphql.OneShot(graphql.ErrorResponse(ctx, "unsupported GraphQL operation")) } } type executionContext struct { *graphql.OperationContext *executableSchema } func (ec *executionContext) introspectSchema() (*introspection.Schema, error) { if ec.DisableIntrospection { return nil, errors.New("introspection disabled") } return introspection.WrapSchema(parsedSchema), nil } func (ec *executionContext) introspectType(name string) (*introspection.Type, error) { if ec.DisableIntrospection { return nil, errors.New("introspection disabled") } return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil } var sources = []*ast.Source{ {Name: "schema.graphql", Input: `scalar Time type CVEResultForImage { Tag: String CVEList: [CVE] } type CVE { Id: String Title: String Description: String Severity: String PackageList: [PackageInfo] } type PackageInfo { Name: String InstalledVersion: String FixedVersion: String } type ImgResultForCVE { Name: String Tags: [String] } type ImgResultForFixedCVE { Tags: [TagInfo] } type ImgResultForDigest { Name: String Tags: [String] } type TagInfo { Name: String Digest: String Timestamp: Time } type ImageInfo { Name: String Latest: String LastUpdated: Time Description: String Licenses: String Vendor: String Size: String Labels: String } type Query { CVEListForImage(image: String!) :CVEResultForImage ImageListForCVE(id: String!) :[ImgResultForCVE] ImageListWithCVEFixed(id: String!, image: String!) :ImgResultForFixedCVE ImageListForDigest(id: String!) :[ImgResultForDigest] ImageListWithLatestTag:[ImageInfo] } `, BuiltIn: false}, } var parsedSchema = gqlparser.MustLoadSchema(sources...) // endregion ************************** generated!.gotpl ************************** // region ***************************** args.gotpl ***************************** func (ec *executionContext) dir_deprecated_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["reason"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("reason")) arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) if err != nil { return nil, err } } args["reason"] = arg0 return args, nil } func (ec *executionContext) dir_include_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} var arg0 bool if tmp, ok := rawArgs["if"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("if")) arg0, err = ec.unmarshalNBoolean2bool(ctx, tmp) if err != nil { return nil, err } } args["if"] = arg0 return args, nil } func (ec *executionContext) dir_skip_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} var arg0 bool if tmp, ok := rawArgs["if"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("if")) arg0, err = ec.unmarshalNBoolean2bool(ctx, tmp) if err != nil { return nil, err } } args["if"] = arg0 return args, nil } func (ec *executionContext) field_Query_CVEListForImage_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["image"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("image")) arg0, err = ec.unmarshalNString2string(ctx, tmp) if err != nil { return nil, err } } args["image"] = arg0 return args, nil } func (ec *executionContext) field_Query_ImageListForCVE_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} var arg0 string if tmp, ok := rawArgs["id"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id")) arg0, err = ec.unmarshalNString2string(ctx, tmp) if err != nil { return nil, err } } args["id"] = arg0 return args, nil } func (ec *executionContext) field_Query_ImageListForDigest_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} var arg0 string if tmp, ok := rawArgs["id"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id")) arg0, err = ec.unmarshalNString2string(ctx, tmp) if err != nil { return nil, err } } args["id"] = arg0 return args, nil } func (ec *executionContext) field_Query_ImageListWithCVEFixed_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} var arg0 string if tmp, ok := rawArgs["id"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id")) arg0, err = ec.unmarshalNString2string(ctx, tmp) if err != nil { return nil, err } } args["id"] = arg0 var arg1 string if tmp, ok := rawArgs["image"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("image")) arg1, err = ec.unmarshalNString2string(ctx, tmp) if err != nil { return nil, err } } args["image"] = arg1 return args, nil } func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} var arg0 string if tmp, ok := rawArgs["name"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) arg0, err = ec.unmarshalNString2string(ctx, tmp) if err != nil { return nil, err } } args["name"] = arg0 return args, nil } func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} var arg0 bool if tmp, ok := rawArgs["includeDeprecated"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) if err != nil { return nil, err } } args["includeDeprecated"] = arg0 return args, nil } func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} var arg0 bool if tmp, ok := rawArgs["includeDeprecated"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) if err != nil { return nil, err } } args["includeDeprecated"] = arg0 return args, nil } // endregion ***************************** args.gotpl ***************************** // region ************************** directives.gotpl ************************** func (ec *executionContext) _fieldMiddleware(ctx context.Context, obj interface{}, next graphql.Resolver) interface{} { fc := graphql.GetFieldContext(ctx) for _, d := range fc.Field.Directives { switch d.Name { case "include": rawArgs := d.ArgumentMap(ec.Variables) args, err := ec.dir_include_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return nil } n := next next = func(ctx context.Context) (interface{}, error) { if ec.directives.Include == nil { return nil, errors.New("directive include is not implemented") } return ec.directives.Include(ctx, obj, n, args["if"].(bool)) } case "skip": rawArgs := d.ArgumentMap(ec.Variables) args, err := ec.dir_skip_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return nil } n := next next = func(ctx context.Context) (interface{}, error) { if ec.directives.Skip == nil { return nil, errors.New("directive skip is not implemented") } return ec.directives.Skip(ctx, obj, n, args["if"].(bool)) } } } res, err := ec.ResolverMiddleware(ctx, next) if err != nil { ec.Error(ctx, err) return nil } return res } // endregion ************************** directives.gotpl ************************** // region **************************** field.gotpl ***************************** func (ec *executionContext) _CVE_Id(ctx context.Context, field graphql.CollectedField, obj *Cve) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "CVE", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil }) if resTmp == nil { return graphql.Null } res := resTmp.(*string) fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _CVE_Title(ctx context.Context, field graphql.CollectedField, obj *Cve) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "CVE", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Title, nil }) if resTmp == nil { return graphql.Null } res := resTmp.(*string) fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _CVE_Description(ctx context.Context, field graphql.CollectedField, obj *Cve) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "CVE", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil }) if resTmp == nil { return graphql.Null } res := resTmp.(*string) fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _CVE_Severity(ctx context.Context, field graphql.CollectedField, obj *Cve) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "CVE", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Severity, nil }) if resTmp == nil { return graphql.Null } res := resTmp.(*string) fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _CVE_PackageList(ctx context.Context, field graphql.CollectedField, obj *Cve) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "CVE", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.PackageList, nil }) if resTmp == nil { return graphql.Null } res := resTmp.([]*PackageInfo) fc.Result = res return ec.marshalOPackageInfo2ᚕᚖgithubᚗcomᚋanuvuᚋzotᚋpkgᚋextensionsᚋsearchᚐPackageInfo(ctx, field.Selections, res) } func (ec *executionContext) _CVEResultForImage_Tag(ctx context.Context, field graphql.CollectedField, obj *CVEResultForImage) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "CVEResultForImage", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Tag, nil }) if resTmp == nil { return graphql.Null } res := resTmp.(*string) fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _CVEResultForImage_CVEList(ctx context.Context, field graphql.CollectedField, obj *CVEResultForImage) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "CVEResultForImage", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.CVEList, nil }) if resTmp == nil { return graphql.Null } res := resTmp.([]*Cve) fc.Result = res return ec.marshalOCVE2ᚕᚖgithubᚗcomᚋanuvuᚋzotᚋpkgᚋextensionsᚋsearchᚐCve(ctx, field.Selections, res) } func (ec *executionContext) _ImageInfo_Name(ctx context.Context, field graphql.CollectedField, obj *ImageInfo) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "ImageInfo", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil }) if resTmp == nil { return graphql.Null } res := resTmp.(*string) fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _ImageInfo_Latest(ctx context.Context, field graphql.CollectedField, obj *ImageInfo) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "ImageInfo", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Latest, nil }) if resTmp == nil { return graphql.Null } res := resTmp.(*string) fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _ImageInfo_LastUpdated(ctx context.Context, field graphql.CollectedField, obj *ImageInfo) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "ImageInfo", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.LastUpdated, nil }) if resTmp == nil { return graphql.Null } res := resTmp.(*time.Time) fc.Result = res return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res) } func (ec *executionContext) _ImageInfo_Description(ctx context.Context, field graphql.CollectedField, obj *ImageInfo) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "ImageInfo", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil }) if resTmp == nil { return graphql.Null } res := resTmp.(*string) fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _ImageInfo_Licenses(ctx context.Context, field graphql.CollectedField, obj *ImageInfo) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "ImageInfo", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Licenses, nil }) if resTmp == nil { return graphql.Null } res := resTmp.(*string) fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _ImageInfo_Vendor(ctx context.Context, field graphql.CollectedField, obj *ImageInfo) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "ImageInfo", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Vendor, nil }) if resTmp == nil { return graphql.Null } res := resTmp.(*string) fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _ImageInfo_Size(ctx context.Context, field graphql.CollectedField, obj *ImageInfo) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "ImageInfo", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Size, nil }) if resTmp == nil { return graphql.Null } res := resTmp.(*string) fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _ImageInfo_Labels(ctx context.Context, field graphql.CollectedField, obj *ImageInfo) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "ImageInfo", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Labels, nil }) if resTmp == nil { return graphql.Null } res := resTmp.(*string) fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _ImgResultForCVE_Name(ctx context.Context, field graphql.CollectedField, obj *ImgResultForCve) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "ImgResultForCVE", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil }) if resTmp == nil { return graphql.Null } res := resTmp.(*string) fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _ImgResultForCVE_Tags(ctx context.Context, field graphql.CollectedField, obj *ImgResultForCve) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "ImgResultForCVE", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Tags, nil }) if resTmp == nil { return graphql.Null } res := resTmp.([]*string) fc.Result = res return ec.marshalOString2ᚕᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _ImgResultForDigest_Name(ctx context.Context, field graphql.CollectedField, obj *ImgResultForDigest) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "ImgResultForDigest", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil }) if resTmp == nil { return graphql.Null } res := resTmp.(*string) fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _ImgResultForDigest_Tags(ctx context.Context, field graphql.CollectedField, obj *ImgResultForDigest) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "ImgResultForDigest", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Tags, nil }) if resTmp == nil { return graphql.Null } res := resTmp.([]*string) fc.Result = res return ec.marshalOString2ᚕᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _ImgResultForFixedCVE_Tags(ctx context.Context, field graphql.CollectedField, obj *ImgResultForFixedCve) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "ImgResultForFixedCVE", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Tags, nil }) if resTmp == nil { return graphql.Null } res := resTmp.([]*TagInfo) fc.Result = res return ec.marshalOTagInfo2ᚕᚖgithubᚗcomᚋanuvuᚋzotᚋpkgᚋextensionsᚋsearchᚐTagInfo(ctx, field.Selections, res) } func (ec *executionContext) _PackageInfo_Name(ctx context.Context, field graphql.CollectedField, obj *PackageInfo) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "PackageInfo", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil }) if resTmp == nil { return graphql.Null } res := resTmp.(*string) fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _PackageInfo_InstalledVersion(ctx context.Context, field graphql.CollectedField, obj *PackageInfo) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "PackageInfo", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.InstalledVersion, nil }) if resTmp == nil { return graphql.Null } res := resTmp.(*string) fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _PackageInfo_FixedVersion(ctx context.Context, field graphql.CollectedField, obj *PackageInfo) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "PackageInfo", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.FixedVersion, nil }) if resTmp == nil { return graphql.Null } res := resTmp.(*string) fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _Query_CVEListForImage(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, IsMethod: true, IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_CVEListForImage_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } fc.Args = args resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().CVEListForImage(rctx, args["image"].(string)) }) if resTmp == nil { return graphql.Null } res := resTmp.(*CVEResultForImage) fc.Result = res return ec.marshalOCVEResultForImage2ᚖgithubᚗcomᚋanuvuᚋzotᚋpkgᚋextensionsᚋsearchᚐCVEResultForImage(ctx, field.Selections, res) } func (ec *executionContext) _Query_ImageListForCVE(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, IsMethod: true, IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_ImageListForCVE_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } fc.Args = args resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().ImageListForCve(rctx, args["id"].(string)) }) if resTmp == nil { return graphql.Null } res := resTmp.([]*ImgResultForCve) fc.Result = res return ec.marshalOImgResultForCVE2ᚕᚖgithubᚗcomᚋanuvuᚋzotᚋpkgᚋextensionsᚋsearchᚐImgResultForCve(ctx, field.Selections, res) } func (ec *executionContext) _Query_ImageListWithCVEFixed(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, IsMethod: true, IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_ImageListWithCVEFixed_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } fc.Args = args resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().ImageListWithCVEFixed(rctx, args["id"].(string), args["image"].(string)) }) if resTmp == nil { return graphql.Null } res := resTmp.(*ImgResultForFixedCve) fc.Result = res return ec.marshalOImgResultForFixedCVE2ᚖgithubᚗcomᚋanuvuᚋzotᚋpkgᚋextensionsᚋsearchᚐImgResultForFixedCve(ctx, field.Selections, res) } func (ec *executionContext) _Query_ImageListForDigest(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, IsMethod: true, IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_ImageListForDigest_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } fc.Args = args resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().ImageListForDigest(rctx, args["id"].(string)) }) if resTmp == nil { return graphql.Null } res := resTmp.([]*ImgResultForDigest) fc.Result = res return ec.marshalOImgResultForDigest2ᚕᚖgithubᚗcomᚋanuvuᚋzotᚋpkgᚋextensionsᚋsearchᚐImgResultForDigest(ctx, field.Selections, res) } func (ec *executionContext) _Query_ImageListWithLatestTag(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, IsMethod: true, IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().ImageListWithLatestTag(rctx) }) if resTmp == nil { return graphql.Null } res := resTmp.([]*ImageInfo) fc.Result = res return ec.marshalOImageInfo2ᚕᚖgithubᚗcomᚋanuvuᚋzotᚋpkgᚋextensionsᚋsearchᚐImageInfo(ctx, field.Selections, res) } func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, IsMethod: true, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query___type_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } fc.Args = args resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.introspectType(args["name"].(string)) }) if resTmp == nil { return graphql.Null } res := resTmp.(*introspection.Type) fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, IsMethod: true, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.introspectSchema() }) if resTmp == nil { return graphql.Null } res := resTmp.(*introspection.Schema) fc.Result = res return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) } func (ec *executionContext) _TagInfo_Name(ctx context.Context, field graphql.CollectedField, obj *TagInfo) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "TagInfo", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil }) if resTmp == nil { return graphql.Null } res := resTmp.(*string) fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _TagInfo_Digest(ctx context.Context, field graphql.CollectedField, obj *TagInfo) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "TagInfo", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Digest, nil }) if resTmp == nil { return graphql.Null } res := resTmp.(*string) fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _TagInfo_Timestamp(ctx context.Context, field graphql.CollectedField, obj *TagInfo) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "TagInfo", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Timestamp, nil }) if resTmp == nil { return graphql.Null } res := resTmp.(*time.Time) fc.Result = res return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil }) if resTmp == nil { if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil }) if resTmp == nil { return graphql.Null } res := resTmp.(string) fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Locations, nil }) if resTmp == nil { if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]string) fc.Result = res return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Args, nil }) if resTmp == nil { if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.InputValue) fc.Result = res return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil }) if resTmp == nil { if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil }) if resTmp == nil { return graphql.Null } res := resTmp.(string) fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, IsMethod: true, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IsDeprecated(), nil }) if resTmp == nil { if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, IsMethod: true, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DeprecationReason(), nil }) if resTmp == nil { return graphql.Null } res := resTmp.(*string) fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil }) if resTmp == nil { if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil }) if resTmp == nil { return graphql.Null } res := resTmp.(string) fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Args, nil }) if resTmp == nil { if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.InputValue) fc.Result = res return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil }) if resTmp == nil { if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, IsMethod: true, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IsDeprecated(), nil }) if resTmp == nil { if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, IsMethod: true, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DeprecationReason(), nil }) if resTmp == nil { return graphql.Null } res := resTmp.(*string) fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil }) if resTmp == nil { if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil }) if resTmp == nil { return graphql.Null } res := resTmp.(string) fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil }) if resTmp == nil { if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, IsMethod: false, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DefaultValue, nil }) if resTmp == nil { return graphql.Null } res := resTmp.(*string) fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, IsMethod: true, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Types(), nil }) if resTmp == nil { if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.Type) fc.Result = res return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, IsMethod: true, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.QueryType(), nil }) if resTmp == nil { if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, IsMethod: true, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.MutationType(), nil }) if resTmp == nil { return graphql.Null } res := resTmp.(*introspection.Type) fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, IsMethod: true, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.SubscriptionType(), nil }) if resTmp == nil { return graphql.Null } res := resTmp.(*introspection.Type) fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, IsMethod: true, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Directives(), nil }) if resTmp == nil { if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.Directive) fc.Result = res return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res) } func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, IsMethod: true, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Kind(), nil }) if resTmp == nil { if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) fc.Result = res return ec.marshalN__TypeKind2string(ctx, field.Selections, res) } func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, IsMethod: true, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name(), nil }) if resTmp == nil { return graphql.Null } res := resTmp.(*string) fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, IsMethod: true, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description(), nil }) if resTmp == nil { return graphql.Null } res := resTmp.(string) fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, IsMethod: true, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field___Type_fields_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } fc.Args = args resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Fields(args["includeDeprecated"].(bool)), nil }) if resTmp == nil { return graphql.Null } res := resTmp.([]introspection.Field) fc.Result = res return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res) } func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, IsMethod: true, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Interfaces(), nil }) if resTmp == nil { return graphql.Null } res := resTmp.([]introspection.Type) fc.Result = res return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) } func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, IsMethod: true, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.PossibleTypes(), nil }) if resTmp == nil { return graphql.Null } res := resTmp.([]introspection.Type) fc.Result = res return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) } func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, IsMethod: true, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field___Type_enumValues_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } fc.Args = args resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.EnumValues(args["includeDeprecated"].(bool)), nil }) if resTmp == nil { return graphql.Null } res := resTmp.([]introspection.EnumValue) fc.Result = res return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res) } func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, IsMethod: true, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.InputFields(), nil }) if resTmp == nil { return graphql.Null } res := resTmp.([]introspection.InputValue) fc.Result = res return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, IsMethod: true, IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.OfType(), nil }) if resTmp == nil { return graphql.Null } res := resTmp.(*introspection.Type) fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } // endregion **************************** field.gotpl ***************************** // region **************************** input.gotpl ***************************** // endregion **************************** input.gotpl ***************************** // region ************************** interface.gotpl *************************** // endregion ************************** interface.gotpl *************************** // region **************************** object.gotpl **************************** var cVEImplementors = []string{"CVE"} func (ec *executionContext) _CVE(ctx context.Context, sel ast.SelectionSet, obj *Cve) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, cVEImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("CVE") case "Id": out.Values[i] = ec._CVE_Id(ctx, field, obj) case "Title": out.Values[i] = ec._CVE_Title(ctx, field, obj) case "Description": out.Values[i] = ec._CVE_Description(ctx, field, obj) case "Severity": out.Values[i] = ec._CVE_Severity(ctx, field, obj) case "PackageList": out.Values[i] = ec._CVE_PackageList(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() if invalids > 0 { return graphql.Null } return out } var cVEResultForImageImplementors = []string{"CVEResultForImage"} func (ec *executionContext) _CVEResultForImage(ctx context.Context, sel ast.SelectionSet, obj *CVEResultForImage) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, cVEResultForImageImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("CVEResultForImage") case "Tag": out.Values[i] = ec._CVEResultForImage_Tag(ctx, field, obj) case "CVEList": out.Values[i] = ec._CVEResultForImage_CVEList(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() if invalids > 0 { return graphql.Null } return out } var imageInfoImplementors = []string{"ImageInfo"} func (ec *executionContext) _ImageInfo(ctx context.Context, sel ast.SelectionSet, obj *ImageInfo) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, imageInfoImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("ImageInfo") case "Name": out.Values[i] = ec._ImageInfo_Name(ctx, field, obj) case "Latest": out.Values[i] = ec._ImageInfo_Latest(ctx, field, obj) case "LastUpdated": out.Values[i] = ec._ImageInfo_LastUpdated(ctx, field, obj) case "Description": out.Values[i] = ec._ImageInfo_Description(ctx, field, obj) case "Licenses": out.Values[i] = ec._ImageInfo_Licenses(ctx, field, obj) case "Vendor": out.Values[i] = ec._ImageInfo_Vendor(ctx, field, obj) case "Size": out.Values[i] = ec._ImageInfo_Size(ctx, field, obj) case "Labels": out.Values[i] = ec._ImageInfo_Labels(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() if invalids > 0 { return graphql.Null } return out } var imgResultForCVEImplementors = []string{"ImgResultForCVE"} func (ec *executionContext) _ImgResultForCVE(ctx context.Context, sel ast.SelectionSet, obj *ImgResultForCve) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, imgResultForCVEImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("ImgResultForCVE") case "Name": out.Values[i] = ec._ImgResultForCVE_Name(ctx, field, obj) case "Tags": out.Values[i] = ec._ImgResultForCVE_Tags(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() if invalids > 0 { return graphql.Null } return out } var imgResultForDigestImplementors = []string{"ImgResultForDigest"} func (ec *executionContext) _ImgResultForDigest(ctx context.Context, sel ast.SelectionSet, obj *ImgResultForDigest) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, imgResultForDigestImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("ImgResultForDigest") case "Name": out.Values[i] = ec._ImgResultForDigest_Name(ctx, field, obj) case "Tags": out.Values[i] = ec._ImgResultForDigest_Tags(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() if invalids > 0 { return graphql.Null } return out } var imgResultForFixedCVEImplementors = []string{"ImgResultForFixedCVE"} func (ec *executionContext) _ImgResultForFixedCVE(ctx context.Context, sel ast.SelectionSet, obj *ImgResultForFixedCve) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, imgResultForFixedCVEImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("ImgResultForFixedCVE") case "Tags": out.Values[i] = ec._ImgResultForFixedCVE_Tags(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() if invalids > 0 { return graphql.Null } return out } var packageInfoImplementors = []string{"PackageInfo"} func (ec *executionContext) _PackageInfo(ctx context.Context, sel ast.SelectionSet, obj *PackageInfo) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, packageInfoImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("PackageInfo") case "Name": out.Values[i] = ec._PackageInfo_Name(ctx, field, obj) case "InstalledVersion": out.Values[i] = ec._PackageInfo_InstalledVersion(ctx, field, obj) case "FixedVersion": out.Values[i] = ec._PackageInfo_FixedVersion(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() if invalids > 0 { return graphql.Null } return out } var queryImplementors = []string{"Query"} func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors) ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ Object: "Query", }) out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("Query") case "CVEListForImage": field := field out.Concurrently(i, func() (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) } }() res = ec._Query_CVEListForImage(ctx, field) return res }) case "ImageListForCVE": field := field out.Concurrently(i, func() (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) } }() res = ec._Query_ImageListForCVE(ctx, field) return res }) case "ImageListWithCVEFixed": field := field out.Concurrently(i, func() (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) } }() res = ec._Query_ImageListWithCVEFixed(ctx, field) return res }) case "ImageListForDigest": field := field out.Concurrently(i, func() (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) } }() res = ec._Query_ImageListForDigest(ctx, field) return res }) case "ImageListWithLatestTag": field := field out.Concurrently(i, func() (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) } }() res = ec._Query_ImageListWithLatestTag(ctx, field) return res }) case "__type": out.Values[i] = ec._Query___type(ctx, field) case "__schema": out.Values[i] = ec._Query___schema(ctx, field) default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() if invalids > 0 { return graphql.Null } return out } var tagInfoImplementors = []string{"TagInfo"} func (ec *executionContext) _TagInfo(ctx context.Context, sel ast.SelectionSet, obj *TagInfo) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, tagInfoImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("TagInfo") case "Name": out.Values[i] = ec._TagInfo_Name(ctx, field, obj) case "Digest": out.Values[i] = ec._TagInfo_Digest(ctx, field, obj) case "Timestamp": out.Values[i] = ec._TagInfo_Timestamp(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() if invalids > 0 { return graphql.Null } return out } var __DirectiveImplementors = []string{"__Directive"} func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("__Directive") case "name": out.Values[i] = ec.___Directive_name(ctx, field, obj) if out.Values[i] == graphql.Null { invalids++ } case "description": out.Values[i] = ec.___Directive_description(ctx, field, obj) case "locations": out.Values[i] = ec.___Directive_locations(ctx, field, obj) if out.Values[i] == graphql.Null { invalids++ } case "args": out.Values[i] = ec.___Directive_args(ctx, field, obj) if out.Values[i] == graphql.Null { invalids++ } default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() if invalids > 0 { return graphql.Null } return out } var __EnumValueImplementors = []string{"__EnumValue"} func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("__EnumValue") case "name": out.Values[i] = ec.___EnumValue_name(ctx, field, obj) if out.Values[i] == graphql.Null { invalids++ } case "description": out.Values[i] = ec.___EnumValue_description(ctx, field, obj) case "isDeprecated": out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj) if out.Values[i] == graphql.Null { invalids++ } case "deprecationReason": out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() if invalids > 0 { return graphql.Null } return out } var __FieldImplementors = []string{"__Field"} func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("__Field") case "name": out.Values[i] = ec.___Field_name(ctx, field, obj) if out.Values[i] == graphql.Null { invalids++ } case "description": out.Values[i] = ec.___Field_description(ctx, field, obj) case "args": out.Values[i] = ec.___Field_args(ctx, field, obj) if out.Values[i] == graphql.Null { invalids++ } case "type": out.Values[i] = ec.___Field_type(ctx, field, obj) if out.Values[i] == graphql.Null { invalids++ } case "isDeprecated": out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj) if out.Values[i] == graphql.Null { invalids++ } case "deprecationReason": out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() if invalids > 0 { return graphql.Null } return out } var __InputValueImplementors = []string{"__InputValue"} func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("__InputValue") case "name": out.Values[i] = ec.___InputValue_name(ctx, field, obj) if out.Values[i] == graphql.Null { invalids++ } case "description": out.Values[i] = ec.___InputValue_description(ctx, field, obj) case "type": out.Values[i] = ec.___InputValue_type(ctx, field, obj) if out.Values[i] == graphql.Null { invalids++ } case "defaultValue": out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() if invalids > 0 { return graphql.Null } return out } var __SchemaImplementors = []string{"__Schema"} func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("__Schema") case "types": out.Values[i] = ec.___Schema_types(ctx, field, obj) if out.Values[i] == graphql.Null { invalids++ } case "queryType": out.Values[i] = ec.___Schema_queryType(ctx, field, obj) if out.Values[i] == graphql.Null { invalids++ } case "mutationType": out.Values[i] = ec.___Schema_mutationType(ctx, field, obj) case "subscriptionType": out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj) case "directives": out.Values[i] = ec.___Schema_directives(ctx, field, obj) if out.Values[i] == graphql.Null { invalids++ } default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() if invalids > 0 { return graphql.Null } return out } var __TypeImplementors = []string{"__Type"} func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("__Type") case "kind": out.Values[i] = ec.___Type_kind(ctx, field, obj) if out.Values[i] == graphql.Null { invalids++ } case "name": out.Values[i] = ec.___Type_name(ctx, field, obj) case "description": out.Values[i] = ec.___Type_description(ctx, field, obj) case "fields": out.Values[i] = ec.___Type_fields(ctx, field, obj) case "interfaces": out.Values[i] = ec.___Type_interfaces(ctx, field, obj) case "possibleTypes": out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj) case "enumValues": out.Values[i] = ec.___Type_enumValues(ctx, field, obj) case "inputFields": out.Values[i] = ec.___Type_inputFields(ctx, field, obj) case "ofType": out.Values[i] = ec.___Type_ofType(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() if invalids > 0 { return graphql.Null } return out } // endregion **************************** object.gotpl **************************** // region ***************************** type.gotpl ***************************** func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) { res, err := graphql.UnmarshalBoolean(v) return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { res := graphql.MarshalBoolean(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } return res } func (ec *executionContext) unmarshalNString2string(ctx context.Context, v interface{}) (string, error) { res, err := graphql.UnmarshalString(v) return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } return res } func (ec *executionContext) marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler { return ec.___Directive(ctx, sel, &v) } func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Directive) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 if !isLen1 { wg.Add(len(v)) } for i := range v { i := i fc := &graphql.FieldContext{ Index: &i, Result: &v[i], } ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = nil } }() if !isLen1 { defer wg.Done() } ret[i] = ec.marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, sel, v[i]) } if isLen1 { f(i) } else { go f(i) } } wg.Wait() return ret } func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Context, v interface{}) (string, error) { res, err := graphql.UnmarshalString(v) return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } return res } func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { var vSlice []interface{} if v != nil { if tmp1, ok := v.([]interface{}); ok { vSlice = tmp1 } else { vSlice = []interface{}{v} } } var err error res := make([]string, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) res[i], err = ec.unmarshalN__DirectiveLocation2string(ctx, vSlice[i]) if err != nil { return nil, err } } return res, nil } func (ec *executionContext) marshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 if !isLen1 { wg.Add(len(v)) } for i := range v { i := i fc := &graphql.FieldContext{ Index: &i, Result: &v[i], } ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = nil } }() if !isLen1 { defer wg.Done() } ret[i] = ec.marshalN__DirectiveLocation2string(ctx, sel, v[i]) } if isLen1 { f(i) } else { go f(i) } } wg.Wait() return ret } func (ec *executionContext) marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx context.Context, sel ast.SelectionSet, v introspection.EnumValue) graphql.Marshaler { return ec.___EnumValue(ctx, sel, &v) } func (ec *executionContext) marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx context.Context, sel ast.SelectionSet, v introspection.Field) graphql.Marshaler { return ec.___Field(ctx, sel, &v) } func (ec *executionContext) marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx context.Context, sel ast.SelectionSet, v introspection.InputValue) graphql.Marshaler { return ec.___InputValue(ctx, sel, &v) } func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 if !isLen1 { wg.Add(len(v)) } for i := range v { i := i fc := &graphql.FieldContext{ Index: &i, Result: &v[i], } ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = nil } }() if !isLen1 { defer wg.Done() } ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) } if isLen1 { f(i) } else { go f(i) } } wg.Wait() return ret } func (ec *executionContext) marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler { return ec.___Type(ctx, sel, &v) } func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 if !isLen1 { wg.Add(len(v)) } for i := range v { i := i fc := &graphql.FieldContext{ Index: &i, Result: &v[i], } ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = nil } }() if !isLen1 { defer wg.Done() } ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) } if isLen1 { f(i) } else { go f(i) } } wg.Wait() return ret } func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null } return ec.___Type(ctx, sel, v) } func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v interface{}) (string, error) { res, err := graphql.UnmarshalString(v) return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } return res } func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) { res, err := graphql.UnmarshalBoolean(v) return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { return graphql.MarshalBoolean(v) } func (ec *executionContext) unmarshalOBoolean2ᚖbool(ctx context.Context, v interface{}) (*bool, error) { if v == nil { return nil, nil } res, err := graphql.UnmarshalBoolean(v) return &res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler { if v == nil { return graphql.Null } return graphql.MarshalBoolean(*v) } func (ec *executionContext) marshalOCVE2ᚕᚖgithubᚗcomᚋanuvuᚋzotᚋpkgᚋextensionsᚋsearchᚐCve(ctx context.Context, sel ast.SelectionSet, v []*Cve) graphql.Marshaler { if v == nil { return graphql.Null } ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 if !isLen1 { wg.Add(len(v)) } for i := range v { i := i fc := &graphql.FieldContext{ Index: &i, Result: &v[i], } ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = nil } }() if !isLen1 { defer wg.Done() } ret[i] = ec.marshalOCVE2ᚖgithubᚗcomᚋanuvuᚋzotᚋpkgᚋextensionsᚋsearchᚐCve(ctx, sel, v[i]) } if isLen1 { f(i) } else { go f(i) } } wg.Wait() return ret } func (ec *executionContext) marshalOCVE2ᚖgithubᚗcomᚋanuvuᚋzotᚋpkgᚋextensionsᚋsearchᚐCve(ctx context.Context, sel ast.SelectionSet, v *Cve) graphql.Marshaler { if v == nil { return graphql.Null } return ec._CVE(ctx, sel, v) } func (ec *executionContext) marshalOCVEResultForImage2ᚖgithubᚗcomᚋanuvuᚋzotᚋpkgᚋextensionsᚋsearchᚐCVEResultForImage(ctx context.Context, sel ast.SelectionSet, v *CVEResultForImage) graphql.Marshaler { if v == nil { return graphql.Null } return ec._CVEResultForImage(ctx, sel, v) } func (ec *executionContext) marshalOImageInfo2ᚕᚖgithubᚗcomᚋanuvuᚋzotᚋpkgᚋextensionsᚋsearchᚐImageInfo(ctx context.Context, sel ast.SelectionSet, v []*ImageInfo) graphql.Marshaler { if v == nil { return graphql.Null } ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 if !isLen1 { wg.Add(len(v)) } for i := range v { i := i fc := &graphql.FieldContext{ Index: &i, Result: &v[i], } ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = nil } }() if !isLen1 { defer wg.Done() } ret[i] = ec.marshalOImageInfo2ᚖgithubᚗcomᚋanuvuᚋzotᚋpkgᚋextensionsᚋsearchᚐImageInfo(ctx, sel, v[i]) } if isLen1 { f(i) } else { go f(i) } } wg.Wait() return ret } func (ec *executionContext) marshalOImageInfo2ᚖgithubᚗcomᚋanuvuᚋzotᚋpkgᚋextensionsᚋsearchᚐImageInfo(ctx context.Context, sel ast.SelectionSet, v *ImageInfo) graphql.Marshaler { if v == nil { return graphql.Null } return ec._ImageInfo(ctx, sel, v) } func (ec *executionContext) marshalOImgResultForCVE2ᚕᚖgithubᚗcomᚋanuvuᚋzotᚋpkgᚋextensionsᚋsearchᚐImgResultForCve(ctx context.Context, sel ast.SelectionSet, v []*ImgResultForCve) graphql.Marshaler { if v == nil { return graphql.Null } ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 if !isLen1 { wg.Add(len(v)) } for i := range v { i := i fc := &graphql.FieldContext{ Index: &i, Result: &v[i], } ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = nil } }() if !isLen1 { defer wg.Done() } ret[i] = ec.marshalOImgResultForCVE2ᚖgithubᚗcomᚋanuvuᚋzotᚋpkgᚋextensionsᚋsearchᚐImgResultForCve(ctx, sel, v[i]) } if isLen1 { f(i) } else { go f(i) } } wg.Wait() return ret } func (ec *executionContext) marshalOImgResultForCVE2ᚖgithubᚗcomᚋanuvuᚋzotᚋpkgᚋextensionsᚋsearchᚐImgResultForCve(ctx context.Context, sel ast.SelectionSet, v *ImgResultForCve) graphql.Marshaler { if v == nil { return graphql.Null } return ec._ImgResultForCVE(ctx, sel, v) } func (ec *executionContext) marshalOImgResultForDigest2ᚕᚖgithubᚗcomᚋanuvuᚋzotᚋpkgᚋextensionsᚋsearchᚐImgResultForDigest(ctx context.Context, sel ast.SelectionSet, v []*ImgResultForDigest) graphql.Marshaler { if v == nil { return graphql.Null } ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 if !isLen1 { wg.Add(len(v)) } for i := range v { i := i fc := &graphql.FieldContext{ Index: &i, Result: &v[i], } ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = nil } }() if !isLen1 { defer wg.Done() } ret[i] = ec.marshalOImgResultForDigest2ᚖgithubᚗcomᚋanuvuᚋzotᚋpkgᚋextensionsᚋsearchᚐImgResultForDigest(ctx, sel, v[i]) } if isLen1 { f(i) } else { go f(i) } } wg.Wait() return ret } func (ec *executionContext) marshalOImgResultForDigest2ᚖgithubᚗcomᚋanuvuᚋzotᚋpkgᚋextensionsᚋsearchᚐImgResultForDigest(ctx context.Context, sel ast.SelectionSet, v *ImgResultForDigest) graphql.Marshaler { if v == nil { return graphql.Null } return ec._ImgResultForDigest(ctx, sel, v) } func (ec *executionContext) marshalOImgResultForFixedCVE2ᚖgithubᚗcomᚋanuvuᚋzotᚋpkgᚋextensionsᚋsearchᚐImgResultForFixedCve(ctx context.Context, sel ast.SelectionSet, v *ImgResultForFixedCve) graphql.Marshaler { if v == nil { return graphql.Null } return ec._ImgResultForFixedCVE(ctx, sel, v) } func (ec *executionContext) marshalOPackageInfo2ᚕᚖgithubᚗcomᚋanuvuᚋzotᚋpkgᚋextensionsᚋsearchᚐPackageInfo(ctx context.Context, sel ast.SelectionSet, v []*PackageInfo) graphql.Marshaler { if v == nil { return graphql.Null } ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 if !isLen1 { wg.Add(len(v)) } for i := range v { i := i fc := &graphql.FieldContext{ Index: &i, Result: &v[i], } ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = nil } }() if !isLen1 { defer wg.Done() } ret[i] = ec.marshalOPackageInfo2ᚖgithubᚗcomᚋanuvuᚋzotᚋpkgᚋextensionsᚋsearchᚐPackageInfo(ctx, sel, v[i]) } if isLen1 { f(i) } else { go f(i) } } wg.Wait() return ret } func (ec *executionContext) marshalOPackageInfo2ᚖgithubᚗcomᚋanuvuᚋzotᚋpkgᚋextensionsᚋsearchᚐPackageInfo(ctx context.Context, sel ast.SelectionSet, v *PackageInfo) graphql.Marshaler { if v == nil { return graphql.Null } return ec._PackageInfo(ctx, sel, v) } func (ec *executionContext) unmarshalOString2string(ctx context.Context, v interface{}) (string, error) { 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 { return graphql.MarshalString(v) } 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 { vSlice = tmp1 } else { vSlice = []interface{}{v} } } var err error res := make([]*string, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) res[i], err = ec.unmarshalOString2ᚖstring(ctx, vSlice[i]) if err != nil { return nil, err } } return res, nil } func (ec *executionContext) marshalOString2ᚕᚖstring(ctx context.Context, sel ast.SelectionSet, v []*string) graphql.Marshaler { if v == nil { return graphql.Null } ret := make(graphql.Array, len(v)) for i := range v { ret[i] = ec.marshalOString2ᚖstring(ctx, sel, v[i]) } return ret } func (ec *executionContext) unmarshalOString2ᚖstring(ctx context.Context, v interface{}) (*string, error) { if v == nil { return nil, nil } res, err := 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 graphql.MarshalString(*v) } func (ec *executionContext) marshalOTagInfo2ᚕᚖgithubᚗcomᚋanuvuᚋzotᚋpkgᚋextensionsᚋsearchᚐTagInfo(ctx context.Context, sel ast.SelectionSet, v []*TagInfo) graphql.Marshaler { if v == nil { return graphql.Null } ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 if !isLen1 { wg.Add(len(v)) } for i := range v { i := i fc := &graphql.FieldContext{ Index: &i, Result: &v[i], } ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = nil } }() if !isLen1 { defer wg.Done() } ret[i] = ec.marshalOTagInfo2ᚖgithubᚗcomᚋanuvuᚋzotᚋpkgᚋextensionsᚋsearchᚐTagInfo(ctx, sel, v[i]) } if isLen1 { f(i) } else { go f(i) } } wg.Wait() return ret } func (ec *executionContext) marshalOTagInfo2ᚖgithubᚗcomᚋanuvuᚋzotᚋpkgᚋextensionsᚋsearchᚐTagInfo(ctx context.Context, sel ast.SelectionSet, v *TagInfo) graphql.Marshaler { if v == nil { return graphql.Null } return ec._TagInfo(ctx, sel, v) } func (ec *executionContext) unmarshalOTime2ᚖtimeᚐTime(ctx context.Context, v interface{}) (*time.Time, error) { if v == nil { return nil, nil } 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 graphql.MarshalTime(*v) } func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler { if v == nil { return graphql.Null } ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 if !isLen1 { wg.Add(len(v)) } for i := range v { i := i fc := &graphql.FieldContext{ Index: &i, Result: &v[i], } ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = nil } }() if !isLen1 { defer wg.Done() } ret[i] = ec.marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, sel, v[i]) } if isLen1 { f(i) } else { go f(i) } } wg.Wait() return ret } func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Field) graphql.Marshaler { if v == nil { return graphql.Null } ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 if !isLen1 { wg.Add(len(v)) } for i := range v { i := i fc := &graphql.FieldContext{ Index: &i, Result: &v[i], } ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = nil } }() if !isLen1 { defer wg.Done() } ret[i] = ec.marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, sel, v[i]) } if isLen1 { f(i) } else { go f(i) } } wg.Wait() return ret } func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { if v == nil { return graphql.Null } ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 if !isLen1 { wg.Add(len(v)) } for i := range v { i := i fc := &graphql.FieldContext{ Index: &i, Result: &v[i], } ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = nil } }() if !isLen1 { defer wg.Done() } ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) } if isLen1 { f(i) } else { go f(i) } } wg.Wait() return ret } func (ec *executionContext) marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v *introspection.Schema) graphql.Marshaler { if v == nil { return graphql.Null } return ec.___Schema(ctx, sel, v) } func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { if v == nil { return graphql.Null } ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 if !isLen1 { wg.Add(len(v)) } for i := range v { i := i fc := &graphql.FieldContext{ Index: &i, Result: &v[i], } ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = nil } }() if !isLen1 { defer wg.Done() } ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) } if isLen1 { f(i) } else { go f(i) } } wg.Wait() return ret } func (ec *executionContext) marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { if v == nil { return graphql.Null } return ec.___Type(ctx, sel, v) } // endregion ***************************** type.gotpl *****************************