aboutsummaryrefslogtreecommitdiffstats
path: root/cache/query.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-09-11 19:46:38 +0200
committerMichael Muré <batolettre@gmail.com>2018-09-11 19:46:38 +0200
commit7b05983c19af4da70f2a9a5062913f4e4f5d5faa (patch)
tree006d9b828d249e6a7e3362164308089991c74857 /cache/query.go
parent9cbd5b4ee113c660377ffe9c01ca374d6addfef4 (diff)
downloadgit-bug-7b05983c19af4da70f2a9a5062913f4e4f5d5faa.tar.gz
graphql: AllBugs now accept a query
Diffstat (limited to 'cache/query.go')
-rw-r--r--cache/query.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/cache/query.go b/cache/query.go
index 198adfc9..6ffa6510 100644
--- a/cache/query.go
+++ b/cache/query.go
@@ -12,9 +12,12 @@ type Query struct {
OrderDirection
}
-// Return an identity query
+// Return an identity query with default sorting (creation-desc)
func NewQuery() *Query {
- return &Query{}
+ return &Query{
+ OrderBy: OrderByCreation,
+ OrderDirection: OrderDescending,
+ }
}
// ParseQuery parse a query DSL