unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Jonas Bernoulli <jonas@bernoul.li>
To: Stefan Kangas <stefan@marxist.se>, Tassilo Horn <tsdh@gnu.org>
Cc: Aleksandr Vityazev <avityazev@posteo.org>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	Emacs developers <emacs-devel@gnu.org>
Subject: Re: [ELPA] New package: srht
Date: Sun, 22 May 2022 00:30:46 +0200	[thread overview]
Message-ID: <87sfp2jz6x.fsf@bernoul.li> (raw)
In-Reply-To: <CADwFkmmdUMTE++20wiomRVuByaJQ74+pALaqtVy0ZJGNNfsEng@mail.gmail.com>

Stefan Kangas <stefan@marxist.se> writes:

> Tassilo Horn <tsdh@gnu.org> writes:
>
>> That's mostly to Stefan: WRT, the graphql library [1]: Wouldn't it make
>> sense to contact the author to include it in GNU ELPA as soon as
>> possible given that GraphQL seems to be trending nowadays?  Right now,
>> there's basically just the single author plus some commits from Jonas
>> (tarsius, the Magit author) who has already signed the CA (plus some
>> 1-line status badge fix by someone else).
>
> I have no real opinion here, but I note that this library is A) rather
> short and B) hasn't been updated in several years.  Perhaps it is a
> great opportunity for Someone (TM) to do some greenfield development
> and get this on GNU ELPA or even into core, if GraphQL is very
> relevant to support.

Instead of starting from scratch again, I would recommend looking at
existing solutions.

My gsexp.el implements the same functionality as graphql.el: turning
a s-expression into a GraphQL query.  On top of that ghub-graphql.el
implements automatic unpagination.

One huge difference between GraphQL and REST is that the response can
be paginated in several places.  The client has to determine where the
result is incomplete and then it has to send *different* queries to get
that data too.  This is what ghub-graphql-vacuum implements; it fetches
all the requested data without the client having to concern itself with
the details and as if the server did so voluntarily when asked to do so.
Most importantly ghub-graphql derives follow up queries from the initial
query, a task which is rather more complicated than just tacking on
"&page=n+1".

Unfortunately both of these libraries suffer from being severely
under-documented.  gsexp.el also omit at least one features, that I had
no use for: "fragments".  I found those to be very limited; certainly
too limited to be of any use when implementing automatic unpagination.
ghub-graphql.el is maybe a bit too complicated.

gsexp.el and ghub-graphql.el are both maintained in the Ghub
repository (https://github.com/magit/ghub) and are used by
Forge (https://github.com/magit/forge).

IMO what would be most useful at this point would be a test suit, that
could be used to detect gaps in graphql.el/gsexp.el/nih.el, and which
would also demonstrate how to use these libraries and how they differ.

     Jonas



      reply	other threads:[~2022-05-21 22:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16 16:15 [ELPA] New package: srht Aleksandr Vityazev
2022-05-17 12:54 ` Alexander Adolf
2022-05-17 14:49   ` Aleksandr Vityazev
2022-05-18 11:15     ` Alexander Adolf
2022-05-18 12:49     ` Stefan Monnier
2022-05-18 13:13       ` Tassilo Horn
2022-05-17 16:03   ` Tassilo Horn
2022-05-17 18:42 ` Stefan Monnier
2022-05-17 19:07   ` Aleksandr Vityazev
2022-05-17 19:17     ` Stefan Monnier
2022-05-18 17:47       ` Aleksandr Vityazev
2022-05-19  4:56         ` Tassilo Horn
2022-05-19 19:10           ` Aleksandr Vityazev
2022-05-19 19:50             ` Tassilo Horn
2022-05-19 21:06               ` Aleksandr Vityazev
2022-05-20  6:05                 ` Tassilo Horn
2022-05-20 18:39                   ` Aleksandr Vityazev
2022-05-20 19:08                   ` Stefan Kangas
2022-05-21 22:30                     ` Jonas Bernoulli [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://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87sfp2jz6x.fsf@bernoul.li \
    --to=jonas@bernoul.li \
    --cc=avityazev@posteo.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=stefan@marxist.se \
    --cc=tsdh@gnu.org \
    /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/emacs.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).