emacs-devel
[Top][All Lists]
Advanced

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

Re: [ELPA] New package: srht


From: Aleksandr Vityazev
Subject: Re: [ELPA] New package: srht
Date: Fri, 20 May 2022 18:39:29 +0000

Hi Tassilo,

On 2022-05-20, 08:05 +0200, Tassilo Horn <tsdh@gnu.org> wrote:

> Aleksandr Vityazev <avityazev@posteo.org> writes:
>
> Hi Aleksandr,
>
>>> Oh, I finally made it!  It seems you cannot use an OAuth 2.0 token
>>> but must use a legacy one.  I'm not sure whose fault that is.  I use
>>> a sr.ht OAuth 2.0 token in hut (the command line client for sr.ht)
>>> without issues.  I think that uses the same REST/GraphQL APIs.
>>
>> Sourcehut REST API does not support OAuth2 [1], also worth clarifying.
>> I don't use hut, but after looking a bit, I can tell that only GraphQl
>> with API2.0 is used there. There is a GraphQl library for Emacs, but
>> unfortunately neither elpa nor non-gnu elpa has it.
>
> Isn't it a bit unfortunate that this new package starts by using the
> REST APIs which are described as legacy already and superseeded by the
> GraphQL APIs (which are, confessedly, not yet complete for all
> services)?  I think the REST APIs will be functional in the mid-term
> future, but...

Yes, that's right, in the long run choosing GraphQl implementation would
be the right thing to do. However, I'm hardly familiar with GraphQl. I
don't think I'll switch to a redesign right now, I'll finish with the
REST API first and then we'll see.

> And is GraphQL really so different to REST?  I've never used the former
> but at a cursory glance I have the impression that they are quite
> similar just that the former is "GraphQL query in, JSON out" whereas the
> latter is "JSON in, JSON out".  Is that wrong?

Yes, that's true and yes they are different and in my opinion
drastically different, although I haven't had to fully explore it yet, I
could be wrong.


-- 
Best regards,
Aleksandr Vityazev



reply via email to

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