emacs-devel
[Top][All Lists]
Advanced

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

Re: [ELPA] New package: srht


From: Jonas Bernoulli
Subject: Re: [ELPA] New package: srht
Date: Sun, 22 May 2022 00:30:46 +0200

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 via email to

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