diff options
author | Michael Muré <batolettre@gmail.com> | 2018-09-11 19:46:38 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-09-11 19:46:38 +0200 |
commit | 7b05983c19af4da70f2a9a5062913f4e4f5d5faa (patch) | |
tree | 006d9b828d249e6a7e3362164308089991c74857 /cache/query.go | |
parent | 9cbd5b4ee113c660377ffe9c01ca374d6addfef4 (diff) | |
download | git-bug-7b05983c19af4da70f2a9a5062913f4e4f5d5faa.tar.gz |
graphql: AllBugs now accept a query
Diffstat (limited to 'cache/query.go')
-rw-r--r-- | cache/query.go | 7 |
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 |