unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Arun Isaac <arunisaac@systemreboot.net>
To: jgart <jgart@dismail.de>, Guix Devel <guix-devel@gnu.org>
Subject: Re: Get all closed tickets with kolam
Date: Mon, 24 Oct 2022 18:55:38 +0530	[thread overview]
Message-ID: <87czah2w19.fsf@systemreboot.net> (raw)
In-Reply-To: <20221021185257.GB23680@dismail.de>


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	other threads:[~2022-10-24 17:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-21 23:52 Get all closed tickets with kolam jgart
2022-10-24 13:25 ` Arun Isaac [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87czah2w19.fsf@systemreboot.net \
    --to=arunisaac@systemreboot.net \
    --cc=guix-devel@gnu.org \
    --cc=jgart@dismail.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).