web: Preprocess search query from GraphQL before use.
authorArun Isaac <arunisaac@systemreboot.net>
Wed, 16 Feb 2022 08:24:46 +0000 (13:54 +0530)
committerRicardo Wurmus <rekado@elephly.net>
Thu, 17 Feb 2022 22:19:02 +0000 (23:19 +0100)
* mumi/web/graphql.scm (<query>): Preprocess search query using
process-query before passing on to search-bugs.

mumi/web/graphql.scm

index 662c5ba87216210f0ebc495ae81f81a0e5bf2f73..56110a088c044e44ff10262a596c1f8823f2ded4 100644 (file)
            (bug-status number)))
   (issues (non-nullable-type (list-type <issue>))
           (lambda* (parent context info #:key search)
-            (search-bugs search)))
+            (search-bugs (string-join
+                          (process-query search)))))
   (person (non-nullable-type <person>)
           (lambda* (parent context info #:key email)
             email)))