unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Aleksandr Vityazev <avityazev@posteo.org>
To: Tassilo Horn <tsdh@gnu.org>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>,  emacs-devel@gnu.org
Subject: Re: [ELPA] New package: srht
Date: Fri, 20 May 2022 18:39:29 +0000	[thread overview]
Message-ID: <87ee0ot5em.fsf@posteo.org> (raw)
In-Reply-To: <87h75k1zu3.fsf@gnu.org> (Tassilo Horn's message of "Fri, 20 May 2022 08:05:40 +0200")


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	other threads:[~2022-05-20 18:39 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 [this message]
2022-05-20 19:08                   ` Stefan Kangas
2022-05-21 22:30                     ` Jonas Bernoulli

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=87ee0ot5em.fsf@posteo.org \
    --to=avityazev@posteo.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --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).