diff --git a/graphql/graph/gen_graph.go b/graphql/graph/gen_graph.go
index 679133772871417f2fa0ef0c7d7bfb06fca638f5..ba1eb7e9bcce3b915f8b041ffd72a2f03fcd543d 100644
--- a/graphql/graph/gen_graph.go
+++ b/graphql/graph/gen_graph.go
@@ -306,8 +306,7 @@ type ComplexityRoot struct {
 	}
 
 	Query struct {
-		DefaultRepository func(childComplexity int) int
-		Repository        func(childComplexity int, ref string) int
+		Repository func(childComplexity int, ref *string) int
 	}
 
 	Repository struct {
@@ -452,8 +451,7 @@ type MutationResolver interface {
 	CommitAsNeeded(ctx context.Context, input models.CommitAsNeededInput) (*models.CommitAsNeededPayload, error)
 }
 type QueryResolver interface {
-	DefaultRepository(ctx context.Context) (*models.Repository, error)
-	Repository(ctx context.Context, ref string) (*models.Repository, error)
+	Repository(ctx context.Context, ref *string) (*models.Repository, error)
 }
 type RepositoryResolver interface {
 	AllBugs(ctx context.Context, obj *models.Repository, after *string, before *string, first *int, last *int, query *string) (*models.BugConnection, error)
@@ -1539,13 +1537,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
 
 		return e.complexity.PageInfo.StartCursor(childComplexity), true
 
-	case "Query.defaultRepository":
-		if e.complexity.Query.DefaultRepository == nil {
-			break
-		}
-
-		return e.complexity.Query.DefaultRepository(childComplexity), true
-
 	case "Query.repository":
 		if e.complexity.Query.Repository == nil {
 			break
@@ -1556,7 +1547,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
 			return 0, false
 		}
 
-		return e.complexity.Query.Repository(childComplexity, args["ref"].(string)), true
+		return e.complexity.Query.Repository(childComplexity, args["ref"].(*string)), true
 
 	case "Repository.allBugs":
 		if e.complexity.Repository.AllBugs == nil {
@@ -2366,12 +2357,8 @@ type Repository {
     ): LabelConnection!
 }`, BuiltIn: false},
 	&ast.Source{Name: "schema/root.graphql", Input: `type Query {
-    """The default unnamend repository."""
-    defaultRepository: Repository
-    """Access a repository by reference/name."""
-    repository(ref: String!): Repository
-
-    #TODO: connection for all repositories
+    """Access a repository by reference/name. If no ref is given, the default repository is returned if any."""
+    repository(ref: String): Repository
 }
 
 type Mutation {
@@ -2837,9 +2824,9 @@ func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs
 func (ec *executionContext) field_Query_repository_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
 	var err error
 	args := map[string]interface{}{}
-	var arg0 string
+	var arg0 *string
 	if tmp, ok := rawArgs["ref"]; ok {
-		arg0, err = ec.unmarshalNString2string(ctx, tmp)
+		arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
 		if err != nil {
 			return nil, err
 		}
@@ -7821,37 +7808,6 @@ func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graph
 	return ec.marshalNString2string(ctx, field.Selections, res)
 }
 
-func (ec *executionContext) _Query_defaultRepository(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
-	defer func() {
-		if r := recover(); r != nil {
-			ec.Error(ctx, ec.Recover(ctx, r))
-			ret = graphql.Null
-		}
-	}()
-	fc := &graphql.FieldContext{
-		Object:   "Query",
-		Field:    field,
-		Args:     nil,
-		IsMethod: true,
-	}
-
-	ctx = graphql.WithFieldContext(ctx, fc)
-	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
-		ctx = rctx // use context from middleware stack in children
-		return ec.resolvers.Query().DefaultRepository(rctx)
-	})
-	if err != nil {
-		ec.Error(ctx, err)
-		return graphql.Null
-	}
-	if resTmp == nil {
-		return graphql.Null
-	}
-	res := resTmp.(*models.Repository)
-	fc.Result = res
-	return ec.marshalORepository2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐRepository(ctx, field.Selections, res)
-}
-
 func (ec *executionContext) _Query_repository(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
 	defer func() {
 		if r := recover(); r != nil {
@@ -7876,7 +7832,7 @@ func (ec *executionContext) _Query_repository(ctx context.Context, field graphql
 	fc.Args = args
 	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
 		ctx = rctx // use context from middleware stack in children
-		return ec.resolvers.Query().Repository(rctx, args["ref"].(string))
+		return ec.resolvers.Query().Repository(rctx, args["ref"].(*string))
 	})
 	if err != nil {
 		ec.Error(ctx, err)
@@ -12392,17 +12348,6 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
 		switch field.Name {
 		case "__typename":
 			out.Values[i] = graphql.MarshalString("Query")
-		case "defaultRepository":
-			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_defaultRepository(ctx, field)
-				return res
-			})
 		case "repository":
 			field := field
 			out.Concurrently(i, func() (res graphql.Marshaler) {
diff --git a/graphql/graphql_test.go b/graphql/graphql_test.go
index 4bab7f5869f600237ee2b8f58b1fc1a7594abc91..197701508d655c012ea7cdac1212e9eea523c662 100644
--- a/graphql/graphql_test.go
+++ b/graphql/graphql_test.go
@@ -25,7 +25,7 @@ func TestQueries(t *testing.T) {
 
 	query := `
      query {
-        defaultRepository {
+        repository {
           allBugs(first: 2) {
             pageInfo {
               endCursor
@@ -162,7 +162,7 @@ func TestQueries(t *testing.T) {
 	}
 
 	var resp struct {
-		DefaultRepository struct {
+		Repository struct {
 			AllBugs struct {
 				PageInfo models.PageInfo
 				Nodes    []struct {
diff --git a/graphql/resolvers/query.go b/graphql/resolvers/query.go
index 9503ccf45ea424a4622898c1d7f4482b87f1924d..6fb1863806855226cda8cb4f63522261ca2c1693 100644
--- a/graphql/resolvers/query.go
+++ b/graphql/resolvers/query.go
@@ -27,8 +27,15 @@ func (r rootQueryResolver) DefaultRepository(_ context.Context) (*models.Reposit
 	}, nil
 }
 
-func (r rootQueryResolver) Repository(_ context.Context, ref string) (*models.Repository, error) {
-	repo, err := r.cache.ResolveRepo(ref)
+func (r rootQueryResolver) Repository(_ context.Context, ref *string) (*models.Repository, error) {
+	var repo *cache.RepoCache
+	var err error
+
+	if ref == nil {
+		repo, err = r.cache.DefaultRepo()
+	} else {
+		repo, err = r.cache.ResolveRepo(*ref)
+	}
 
 	if err != nil {
 		return nil, err
diff --git a/graphql/schema/root.graphql b/graphql/schema/root.graphql
index 2a12cc375cc5aea2c7d606d5cd989215110695d0..317cf56aef7882fc42b4bba0031542d73241f880 100644
--- a/graphql/schema/root.graphql
+++ b/graphql/schema/root.graphql
@@ -1,10 +1,6 @@
 type Query {
-    """The default unnamend repository."""
-    defaultRepository: Repository
-    """Access a repository by reference/name."""
-    repository(ref: String!): Repository
-
-    #TODO: connection for all repositories
+    """Access a repository by reference/name. If no ref is given, the default repository is returned if any."""
+    repository(ref: String): Repository
 }
 
 type Mutation {