diff options
author | Michael Muré <batolettre@gmail.com> | 2018-09-09 20:21:49 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-09-09 20:22:27 +0200 |
commit | 09e097e1bf32ad153c139e3f6befad9fb059fd6e (patch) | |
tree | 422db558f5ead4ec673bca6a2ede413514d49d5b /graphql/resolvers/repo.go | |
parent | 21f9840e991ae569ec1efa404011e9a16ed2ab3b (diff) | |
download | git-bug-09e097e1bf32ad153c139e3f6befad9fb059fd6e.tar.gz |
cache: combine sorting and filtering into a query with its micro-DSL
Diffstat (limited to 'graphql/resolvers/repo.go')
-rw-r--r-- | graphql/resolvers/repo.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/graphql/resolvers/repo.go b/graphql/resolvers/repo.go index 75c1307d..7922256f 100644 --- a/graphql/resolvers/repo.go +++ b/graphql/resolvers/repo.go @@ -20,7 +20,10 @@ func (repoResolver) AllBugs(ctx context.Context, obj *models.Repository, after * } // Simply pass a []string with the ids to the pagination algorithm - source := obj.Repo.AllBugsId(cache.OrderByCreation, cache.OrderAscending) + source := obj.Repo.QueryBugs(&cache.Query{ + OrderBy: cache.OrderByCreation, + OrderDirection: cache.OrderAscending, + }) // The edger create a custom edge holding just the id edger := func(id string, offset int) connections.Edge { |