Re:How and why GraphQL will influence the Sourcehut alpha
by andrewingram on Thursday June 11, 2020 @05:08PM
(#23493304)
I always say that GraphQL is best thought of as frontend code that lives on a backend server. If in your current world you have front-end code that talks to multiple traditional REST endpoints, the frontend is therefore responsible for managing all the relationships between the API data in order to build a coherent object graph which the UI can interpret. GraphQL turns this object graph into a first class citizen that can be consistently queried, rather than something everyone keeps having to reinvent, and moves it closer to the source of truth (the downstream services) for performance reasons (so that each network hop can be measured in single digit milliseconds rather than tens or hundreds).
I've seen GraphQL schemas being implemented on the client, it's certainly doable, but the performance is terrible compared to doing it on a server close to the source of truth.
Re:How and why GraphQL will influence the Sourcehut alpha
by jbreiding on Thursday June 11, 2020 @01:25PM
(#23491107)
Graphql is generally referred to as be4fe, meaning backends for frontend.
Not exactly client side, but the main consumer is the client and s2s or service to service isn't intended target.
You'd want code gen to easily wrap REST services.
You could get some of the pipeline query/subquery stuff back (and lose caching) by setting up a proxy running this service or fallback to client side aggregation to span services not backed by the graph system (and maybe keep caching).
Maybe we're back to SOAP and WSDLs, though.