Re:Designing a URL-based query syntax for GraphQL
by mark_and_sweep on Friday June 18, 2021 @06:53AM
(#27549144)
Seems like an unnecessary layer of abstraction to me. If I'm in a webbrowser anyway, it's much easier to open the console, write decodeURIComponent(`<your_encoded_query_here>`) and look at the decoded query rather than having to translate PQL to GraphQL syntax in my head, especially since the GraphQL will be a nicely formatted multi-line string whereas the PQL is single-line.
[ Parent
| on HN ]
Re:Designing a URL-based query syntax for GraphQL
by AgoRapide on Friday June 18, 2021 @07:28AM
(#27549311)
I have dabbled with the same problem with AgoRapide which offers queries through GET (although on a much simpler level than PQL / GraphQL).
I just present the query in readable form together with the output, letting the user choose between copy / paste the URL or copy / paste the readable form.
Example:
http://arnorthwind.agorapide.com/RQ/dt/Order/WHERE%20Shipped...
will present the alternative form
Order
WHERE ShippedDate = Today
SELECT OrderId, ShippedDate, CustomerId, Customer.CompanyName, OrderDetail.Sum.Sum() AS SumOrder
together with options for choosing Yesterday, 2 days ago and so on.See more examples at http://arnorthwind.agorapide.com/