From aff0d998420924bc47d3da954bd436caee3dfd09 Mon Sep 17 00:00:00 2001 From: Gisle Aune Date: Sat, 27 Apr 2019 11:37:01 +0200 Subject: [PATCH] graph2: Added exception for open logs query in complexity. --- graph2/complexity.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/graph2/complexity.go b/graph2/complexity.go index 6179884..a46ab5e 100644 --- a/graph2/complexity.go +++ b/graph2/complexity.go @@ -44,6 +44,10 @@ func complexity() (cr ComplexityRoot) { return childComplexity + findComplexity } cr.Query.Logs = func(childComplexity int, filter *logs.Filter) int { + if filter != nil && filter.Open != nil && *filter.Open == true { + return childComplexity + findComplexity + } + return childComplexity + listComplexity } cr.Query.Chapter = func(childComplexity int, id string) int {