From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jonas Bernoulli Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: srht Date: Sun, 22 May 2022 00:30:46 +0200 Message-ID: <87sfp2jz6x.fsf@bernoul.li> References: <87ilq1tep7.fsf@posteo.org> <87h75k1zu3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26368"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Aleksandr Vityazev , Stefan Monnier , Emacs developers To: Stefan Kangas , Tassilo Horn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 22 00:33:29 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nsXf6-0006ew-N9 for ged-emacs-devel@m.gmane-mx.org; Sun, 22 May 2022 00:33:28 +0200 Original-Received: from localhost ([::1]:59778 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nsXf5-0002E2-9Y for ged-emacs-devel@m.gmane-mx.org; Sat, 21 May 2022 18:33:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40962) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsXca-0000dG-AS for emacs-devel@gnu.org; Sat, 21 May 2022 18:30:52 -0400 Original-Received: from mail.hostpark.net ([212.243.197.30]:49238) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsXcY-0005zp-8i; Sat, 21 May 2022 18:30:52 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.hostpark.net (Postfix) with ESMTP id A0C28165FF; Sun, 22 May 2022 00:30:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bernoul.li; h= content-type:content-type:mime-version:message-id:date:date :references:in-reply-to:subject:subject:from:from:received :received; s=sel2011a; t=1653172246; bh=GeGIAqWVgftSNmMJ94c6gon8 M/BTSS7z2Oh91JqoDqo=; b=P3vwXZ4n5Ve84Y/25rjW8B2uFunhZIZdZ6FAZNIv Bef6PZFJLYrBbr8RoMRX/HU565rD2ADLanPVIdJ1qfV9qSP9VBcKPWvKsnwyBMS+ Sbtb+s39lojiME2SJitRuq7RJEQOXKPWEarruFszb7f/x6NvfP0LXMg+hsz2p5RA MNc= X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net Original-Received: from mail.hostpark.net ([127.0.0.1]) by localhost (mail0.hostpark.net [127.0.0.1]) (amavisd-new, port 10224) with ESMTP id N3ITSCJ6DfQC; Sun, 22 May 2022 00:30:46 +0200 (CEST) Original-Received: from customer (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.hostpark.net (Postfix) with ESMTPSA id 67A61165AF; Sun, 22 May 2022 00:30:46 +0200 (CEST) In-Reply-To: Received-SPF: none client-ip=212.243.197.30; envelope-from=jonas@bernoul.li; helo=mail.hostpark.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:290061 Archived-At: Stefan Kangas writes: > Tassilo Horn 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