News for hackers. Stuff that matters.
Re:Some New HTTP Verbs by freedomben on Tuesday September 13, 2022 @09:22AM (#32823914)
Yeah, it's gotta be a joke. The only one that actually sounds useful to me is HELP.

I have to disagree with you on that one, a HELP that could explain the endpoint and verbs? that would be AWESOME. kind of like `kubectl explain`, which has been helpful to me on multiple occasions. Of course 99% of apps would not implement that, but frameworks could easily give you that for free as the dev, and reuse the declarative code that already exists in the router... There are already tools that generate swagger files and such, seems like it wouldn't be much harder to render a server response/document on demand. You could even serve a beautiful doc page viewable in a browser! The more I think on this, the more I like it.

Re:Some New HTTP Verbs by adeel_siddiqui on Tuesday September 13, 2022 @11:15AM (#32825387)
Isn't there already the OPTIONS verb which does the same thing as a possible HELP method?

>The HTTP OPTIONS method requests permitted communication options for a given URL or server. A client can specify a URL with this method, or an asterisk (*) to refer to the entire server.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/OP...

Re:Some New HTTP Verbs by freedomben on Tuesday September 13, 2022 @12:03PM (#32826097)
Yes, good point, OPTIONS would probably cover this use case. Anybody know of a framework (such as rails, phoenix, laravel, etc) that offers that? would be super interesting
Re:Some New HTTP Verbs by hn_throwaway_99 on Tuesday September 13, 2022 @09:35AM (#32824072)
FWIW, this is a huge benefit of GraphQL. All GraphQL servers that publish their schemas can instantly have their schemas loaded with full documentation and an interactive execution environment with GraphQL Playground.
Re:Some New HTTP Verbs by capableweb on Tuesday September 13, 2022 @09:43AM (#32824187)
Is it really a distinct benefit though since something similar to that have been existing for a really long time before GraphQL already? From OpenAPI/Swagger all the way back to HATEOS/HAL and RDF, if not even earlier.
Re:Some New HTTP Verbs by freedomben on Wednesday September 14, 2022 @11:34AM (#32838666)
I'm not generally a fan of graphql, but yes it's a remarkable feature. The other options (like swagger) take more effort and tend to not be maintained well. But even when they are, it's still not as developer friendly (to the client) as graphql.
Re:Some New HTTP Verbs by hn_throwaway_99 on Tuesday September 13, 2022 @12:57PM (#32826968)
I've worked with all of those options before I started working with GraphQL. The "out-of-the-box" support, especially the standardization that GraphQL enforces with its schema definition, is/was night-and-day compared to something like Swagger.
Re:Some New HTTP Verbs by eurasiantiger on Tuesday September 13, 2022 @10:27AM (#32824703)
It is a distinct benefit when your query playground is schema-aware and can suggest completions for types, fields and field (query) parameters, as well as validate everything pre-request.
Re:Some New HTTP Verbs by Joker_vD on Tuesday September 13, 2022 @09:25AM (#32823965)
That's pretty much just entrypoint for HATEOAS, isn't it?
Re:Some New HTTP Verbs by BerislavLopac on Tuesday September 13, 2022 @11:31AM (#32825611)
> The only one that actually sounds useful to me is HELP.

And we already have OPTIONS for that.