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

Method _Repository

api/graphql/graph/repository.generated.go:870–1140  ·  view source on GitHub ↗
(ctx context.Context, sel ast.SelectionSet, obj *models.Repository)

Source from the content-addressed store, hash-verified

868var repositoryImplementors = []string{"Repository"}
869
870func (ec *executionContext) _Repository(ctx context.Context, sel ast.SelectionSet, obj *models.Repository) graphql.Marshaler {
871 fields := graphql.CollectFields(ec.OperationContext, sel, repositoryImplementors)
872
873 out := graphql.NewFieldSet(fields)
874 deferred := make(map[string]*graphql.FieldSet)
875 for i, field := range fields {
876 switch field.Name {
877 case "__typename":
878 out.Values[i] = graphql.MarshalString("Repository")
879 case "name":
880 field := field
881
882 innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) {
883 defer func() {
884 if r := recover(); r != nil {
885 ec.Error(ctx, ec.Recover(ctx, r))
886 }
887 }()
888 res = ec._Repository_name(ctx, field, obj)
889 return res
890 }
891
892 if field.Deferrable != nil {
893 dfs, ok := deferred[field.Deferrable.Label]
894 di := 0
895 if ok {
896 dfs.AddField(field)
897 di = len(dfs.Values) - 1
898 } else {
899 dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
900 deferred[field.Deferrable.Label] = dfs
901 }
902 dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
903 return innerFunc(ctx, dfs)
904 })
905
906 // don't run the out.Concurrently() call below
907 out.Values[i] = graphql.Null
908 continue
909 }
910
911 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
912 case "allBugs":
913 field := field
914
915 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
916 defer func() {
917 if r := recover(); r != nil {
918 ec.Error(ctx, ec.Recover(ctx, r))
919 }
920 }()
921 res = ec._Repository_allBugs(ctx, field, obj)
922 if res == graphql.Null {
923 atomic.AddUint32(&fs.Invalids, 1)
924 }
925 return res
926 }
927

Calls 9

_Repository_nameMethod · 0.95
_Repository_allBugsMethod · 0.95
_Repository_bugMethod · 0.95
_Repository_identityMethod · 0.95
processDeferredGroupMethod · 0.95
ErrorMethod · 0.45

Tested by

no test coverage detected