> Presumably your "REST-style" services that lie beneath GraphQL also have a schema
There aren't any "REST services" below the GraphQL layer. I am not using GraphQL as a service orchestration layer on top of REST services. Representing an organisation graph is not the only value of GraphQL.
> so you'd only ever consider it if...
> but should never be the case for...
This is weirdly black-and-white and rather unimaginative thinking.
I thought about spelling out a more detailed explanation of the situations where I think people miss out on the value of schema-first GraphQL, particularly in content flows or interpreted languages, as a lone developer building complex prototypes/proof of concept/v1 apps, but honestly the tone and tenor of comments here strongly suggests that it isn't worth the typing time. Like with any nuanced discussion of ORMs; HN has orthodox hatreds.
It may be increasingly in the past for me, at any rate, because of LLMs.
I don't know if gqlgen-style approaches make as much sense for LLMs because code generation is a significant indirection, and even an intensively schema-first approach like Laravel Lighthouse means asking the LLM to write in an additional language and manage the mapping. Good for me, not for the LLM.
Plus I am moving on from all interpreted languages at the back end; it no longer makes any kind of sense to deploy PHP, Python or Node apps when you are responsible for the whole deal. The supply chain attack surface is too severe, the internet-facing attack surface is worse, etc.; it's just a recipe for lying awake worrying about the next shell vulnerability.
> There aren't any "REST services" below the GraphQL layer.
We did already discuss that other uses emerged, but it was originally designed to have "REST-like" services behind it. I mean that's cool if you found some other use for it, but that isn't what it was designed for or what we were talking about.
> I think people miss out on the value of schema-first GraphQL
That's possible, but I don't think you've made the general value proposition of a dynamic graph system clear. In my experience, if my application has simple boundaries, which is most apps, then there is no meaningful graph traversal to speak of and if my application is complex and does have a need for graph-like structures then things like the n+1 problem still make leveraging it impractical. I don't think many are working on systems that are truly graph problems and optimized for such. If you take away the graph dynamism then there are much better schema tools and always has been.
> I don't know if gqlgen-style approaches make as much sense for LLMs
There is no avoiding Conway's law, so that depends on your organization structure. If LLMs have changed how your organization functions then it is possible that whatever value you saw before no longer applies, but it is likely that Facebook's problems GraphQL was created to solve remain. LLMs aren't exactly magicians.
There aren't any "REST services" below the GraphQL layer. I am not using GraphQL as a service orchestration layer on top of REST services. Representing an organisation graph is not the only value of GraphQL.
> so you'd only ever consider it if...
> but should never be the case for...
This is weirdly black-and-white and rather unimaginative thinking.
I thought about spelling out a more detailed explanation of the situations where I think people miss out on the value of schema-first GraphQL, particularly in content flows or interpreted languages, as a lone developer building complex prototypes/proof of concept/v1 apps, but honestly the tone and tenor of comments here strongly suggests that it isn't worth the typing time. Like with any nuanced discussion of ORMs; HN has orthodox hatreds.
It may be increasingly in the past for me, at any rate, because of LLMs.
I don't know if gqlgen-style approaches make as much sense for LLMs because code generation is a significant indirection, and even an intensively schema-first approach like Laravel Lighthouse means asking the LLM to write in an additional language and manage the mapping. Good for me, not for the LLM.
Plus I am moving on from all interpreted languages at the back end; it no longer makes any kind of sense to deploy PHP, Python or Node apps when you are responsible for the whole deal. The supply chain attack surface is too severe, the internet-facing attack surface is worse, etc.; it's just a recipe for lying awake worrying about the next shell vulnerability.
Replies (1)
We did already discuss that other uses emerged, but it was originally designed to have "REST-like" services behind it. I mean that's cool if you found some other use for it, but that isn't what it was designed for or what we were talking about.
> I think people miss out on the value of schema-first GraphQL
That's possible, but I don't think you've made the general value proposition of a dynamic graph system clear. In my experience, if my application has simple boundaries, which is most apps, then there is no meaningful graph traversal to speak of and if my application is complex and does have a need for graph-like structures then things like the n+1 problem still make leveraging it impractical. I don't think many are working on systems that are truly graph problems and optimized for such. If you take away the graph dynamism then there are much better schema tools and always has been.
> I don't know if gqlgen-style approaches make as much sense for LLMs
There is no avoiding Conway's law, so that depends on your organization structure. If LLMs have changed how your organization functions then it is possible that whatever value you saw before no longer applies, but it is likely that Facebook's problems GraphQL was created to solve remain. LLMs aren't exactly magicians.