guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get all closed tickets with kolam


From: Arun Isaac
Subject: Re: Get all closed tickets with kolam
Date: Mon, 24 Oct 2022 18:55:38 +0530

Hi jgart,

> If so, is that endpoint currently deployed and accessible via mumi's
> graphql API?

Yes, the currently deployed mumi GraphQL endpoint is functioning
normally.

Sorry about the complete lack of documentation about how to use the
GraphQL endpoint. Here is some working code with a bunch of GraphQL
queries. I hope it helps. If it doesn't, do not hesitate to ping me. I
will write better documentation "at some point". ;-)

--8<---------------cut here---------------start------------->8---
(use-modules (ice-9 pretty-print)
             (kolam http))

(define %graphql-endpoint
  "https://issues.guix.gnu.org/graphql";)

;; Shown below are different GraphQL queries. Comment out all except
;; one.

;; Find the number, title and date of all closed issues.
(define %graphql-document
  '(document
    (query (#(issues #:search "is:closed")
            number
            title
            date))))

;; Find the number, title, status and date of all issues submitted by
;; "arun".
(define %graphql-document
  '(document
    (query (#(issues #:search "is:open submitter:arun")
            number
            title
            open
            date))))

;; Find the title and submitter of issue 34948.
(define %graphql-document
  '(document (query (#(issue #:number 34948)
                     title
                     (submitter name address)))))

;; Find issues Arun Isaac participated in, the title of those issues
;; and who closed those issues.
(define %graphql-document
  '(document
    (query (#(person #:email "Arun Isaac <arunisaac@systemreboot.net>")
            name
            (participated_in_issues
             title
             (closer name address))))))

;; Run the GraphQL query, and print the results.
(pretty-print
 (graphql-http-get %graphql-endpoint %graphql-document))
--8<---------------cut here---------------end--------------->8---

> Is there currently a way to get all closed tickets on mumi?

Yes, there is. See the first example query in the code above. In fact,
in the #:search field of `#(issues #:search "is:closed")`, you can put
in any search query that you can put in at the
https://issues.guix.gnu.org web interface. The GraphQL endpoint and the
web interface share the same search code.

Currently, mumi provides three different GraphQL object types---issue,
person and email. Please see
https://git.elephly.net/gitweb.cgi?p=software/mumi.git;a=blob;f=mumi/web/graphql.scm;h=56110a088c044e44ff10262a596c1f8823f2ded4;hb=HEAD
for a complete list of fields provided by each object.

Also, only GraphQL query operations are supported at the
moment. Mutation and subscription operations are not.

> I'm asking this on the guix-devel mailing list because I find others
> might find this info useful.

Good thinking! :-)

Cheers,
Arun



reply via email to

[Prev in Thread] Current Thread [Next in Thread]