MCPcopy Create free account
hub / github.com/git-bug/git-bug / _Query_repository

Method _Query_repository

api/graphql/graph/root.generated.go:927–953  ·  view source on GitHub ↗
(ctx context.Context, field graphql.CollectedField)

Source from the content-addressed store, hash-verified

925}
926
927func (ec *executionContext) _Query_repository(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
928 fc, err := ec.fieldContext_Query_repository(ctx, field)
929 if err != nil {
930 return graphql.Null
931 }
932 ctx = graphql.WithFieldContext(ctx, fc)
933 defer func() {
934 if r := recover(); r != nil {
935 ec.Error(ctx, ec.Recover(ctx, r))
936 ret = graphql.Null
937 }
938 }()
939 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
940 ctx = rctx // use context from middleware stack in children
941 return ec.resolvers.Query().Repository(rctx, fc.Args["ref"].(*string))
942 })
943 if err != nil {
944 ec.Error(ctx, err)
945 return graphql.Null
946 }
947 if resTmp == nil {
948 return graphql.Null
949 }
950 res := resTmp.(*models.Repository)
951 fc.Result = res
952 return ec.marshalORepository2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐRepository(ctx, field.Selections, res)
953}
954
955func (ec *executionContext) fieldContext_Query_repository(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
956 fc = &graphql.FieldContext{

Callers 1

_QueryMethod · 0.95

Tested by

no test coverage detected