3 ms·
If you're using graphQL just for that... You can expose a POST endpoint that can follow relation (GET) links recursively, starting from a base resource. It's a
by boubiyeah 8y ago
If you're using graphQL just for that...
You can expose a POST endpoint that can follow relation (GET) links recursively, starting from a base resource.
It's a bit of work but still far less than implementing a good schema, resolvers, etc. And much less technological coupling to a particular solution (apollo, etc).
- wereHamster 8y ago> And much less technological coupling to a particular solution (apollo, etc). You are confusing a specification (GraphQL) with an implementation (Apollo). You don't need apollo to access a graphql server. A plain old HTTP POST is all that you need. From a web browser, use the builtin `fetch()` function and be done. No coupling whatsoever.
- boubiyeah 8y agoI'm not confusing anything, but regardless of which solution ones chooses, the implementation is nothing but trivial and people usually turn to fully ready implementations like apollo.