|
|
|
|
|
by ecjhdnc2025
706 days ago
|
|
> Who would torture themselves like that? It's not really torture. I do. I have built a private federation API in a system where there's a "mothership" service that needs to talk to individual websites. Those websites are WordPress at the moment but they may be Magento, PrestaShop or whatever in the future. GraphQL means I can template the API calls used to keep them in sync with the mothership. It's awesome. I also use it for the frontend/backend connection of a couple of admin APIs and an intranet app. Nuxt frontends, Laravel/Lighthouse headless backends. The only pain point is the unnecessarily complex Apollo stuff in the client, but that gives you really nice smart queries in Nuxt 2; it may not be that crucial in Vue 3/Nuxt 3. |
|
It's even better with Vue 3 (or Vue 2 with the composition API anyway), especially when you combine it with graphql-codegen. Smart queries become just another composable, no `this.$apollo` to be seen. Got that going with API Platform on the backend myself, which has really nice integration with symfony, though it speaks only a bare-bones dialect of graphql as opposed to Lighthouse with all its crazy directives. No persisted queries either, but it's an internal app with bandwidth to burn.
Been eying wp-graphql for my one wordpress project. From my dabbling with it, the DX feels a lot nicer than the WP REST api, though I'm sure you know that's an awfully low bar to clear.