News for hackers. Stuff that matters.
Re:Claude Advanced Tool Use by wrs on Monday November 24, 2025 @04:14PM (#46039417)
It doesn’t actually require that second part. Every time I’ve used it in a production system, we had an approved list of query shapes that were accepted. If the client wanted to use a new kind of query, it was performance tested and sometimes needed to be optimized before approval for use.

If you open it up for any possible query, then give that to uncontrolled clients, it’s a recipe for disaster.

Re:Claude Advanced Tool Use by kaoD on Monday November 24, 2025 @04:20PM (#46039479)
Oh, we have that too! But we call it HTTP endpoints.
Re:Claude Advanced Tool Use by johnfn on Monday November 24, 2025 @05:02PM (#46039928)
Really? Hmm... where in the HTTP spec does it allow for returning an arbitrary subset of any specific request, rather than the whole thing? And where does it ensure all the results are keyed by id so that you can actually build and update a sensible cache around all of it rather than the mess that totally free-form HTTP responses lead to? Oh weird HTTP doesn't have any of that stuff? Maybe we should make a new spec, something which does allow for these patterns and behaviors? And it might be confusing if we use the exact same name as HTTP, since the usage patterns are different and it enables new abilities. If only we could think of such a name...
Re:Claude Advanced Tool Use by eli on Monday November 24, 2025 @05:17PM (#46040052)
An HTTP Range request asks the server to send parts of a resource back to a client. Range requests are useful for various clients, including media players that support random access, data tools that require only part of a large file, and download managers that let users pause and resume a download.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Ran...

Re:Claude Advanced Tool Use by 867-5309 on Monday November 24, 2025 @06:00PM (#46040421)
also handy for bypassing bandwidth restrictions: capped at 100kbps? launch 1000 workers to grab chunks then assemble the survivors
Re:Claude Advanced Tool Use by fragmede on Monday November 24, 2025 @06:44PM (#46040761)
that's what axel downloader does!
Re:Claude Advanced Tool Use by johnfn on Monday November 24, 2025 @09:48PM (#46041857)
HTTP Range doesn't have anything to do with allowing a client to select a subset of fields.
Re:Claude Advanced Tool Use by eli on Monday November 24, 2025 @10:40PM (#46042131)
The Range header isn't for requesting a subset of a resource from the server?
Re:Claude Advanced Tool Use by johnfn on Monday November 24, 2025 @11:53PM (#46042462)
Let's say your REST endpoint returned an object with keys foo, bar, baz and quuz. How would you use HTTP Range to only select foo and baz?
Re:Claude Advanced Tool Use by tlarkworthy on Monday November 24, 2025 @05:46PM (#46040315)
Etag and cache control headers?
Re:Claude Advanced Tool Use by wrs on Monday November 24, 2025 @10:05PM (#46041946)
GQL is an HTTP endpoint. The question is, how are you schematizing, documenting, validating, code-generating, monitoring, etc. the request and response on your HTTP endpoints? (OpenAPI is another good choice.)
Re:Claude Advanced Tool Use by awesome_dude on Monday November 24, 2025 @04:25PM (#46039544)
Without wishing to take part in a pile on - I am wondering why you're using graphql if you are kneecapping it and restricting it to set queries.
Re:Claude Advanced Tool Use by wrs on Monday November 24, 2025 @04:43PM (#46039736)
Because it solves all sorts of other problems, like having a well-defined way to specify the schema of queries and results, and lots of tools built around that.

I would be surprised to see many (or any) GQL endpoints in systems with significant complexity and scale that allow completely arbitrary requests.

Re:Claude Advanced Tool Use by lkbm on Monday November 24, 2025 @04:56PM (#46039867)
Shopify's GraphQL API limits you in complexity (essentially max number of fields returned), but it's basically arbitrary shapes.
Re:Claude Advanced Tool Use by mattmanser on Monday November 24, 2025 @06:15PM (#46040554)
OpenAPI does the same thing for http requests, with tooling around it.

With typed languages you can auto-generate OpenAPI schemas from your code.

Re:Claude Advanced Tool Use by wrs on Monday November 24, 2025 @10:01PM (#46041919)
Yep, OpenAPI is also a good choice nowadays. That’s typically used with the assumption you’ve chosen a supported subset of queries. With GQL you have to add that on top.
Re:Claude Advanced Tool Use by kspacewalk2 on Monday November 24, 2025 @04:33PM (#46039631)
Probably for one of the reasons graphql was created in the first place - accomplish a set of fairly complex operations using one rather than a multitude of API calls. The set can be "everything" or it can be "this well-defined subset".
Re:Claude Advanced Tool Use by awesome_dude on Monday November 24, 2025 @04:38PM (#46039674)
You could be right, but that's really just "Our API makes multiple calls to itself in the background"

I could be wrong but I thought GraphQL's point of difference from a blind proxy was that it was flexible.

Re:Claude Advanced Tool Use by wrs on Monday November 24, 2025 @04:44PM (#46039747)
It is flexible, but you don’t have to let it be infinitely flexible. There’s no practical use case for that. (Well, until LLMs, perhaps!)
Re:Claude Advanced Tool Use by awesome_dude on Monday November 24, 2025 @04:49PM (#46039791)
I guess that I'm reading your initial post a little more strictly than you're meaning
Re:Claude Advanced Tool Use by mcpeepants on Monday November 24, 2025 @05:52PM (#46040364)
I think they mean something like (or what I think of as) “RPC calls, but with the flexibility to select a granular subset of the result based on one or more schemas”. This is how I’ve used graphql in the past at least.
Re:Claude Advanced Tool Use by troupo on Monday November 24, 2025 @05:37PM (#46040235)
> I am wondering why you're using graphql if you are kneecapping it and restricting it to set queries.

Because you never want to expose unbounded unlimited dynamic queries in production. You do want a very small subset that you can monitor, debug, and optimize.