
GraphQL Best Practices - jsjaspreet
https://jsjaspreet.com/blog/graphql-best-practices
======
ramenmeal
I've never used GraphQL and have a question. If you're at a larger company
with many services, how many GraphQL servers are running? Who owns them? Is it
a server per product? Per org? One for the whole company?

Obviously there's no set rule, but I'm curious how its playing out.

~~~
jsjaspreet
At my current workplace we're moving to GraphQL slowly and use it as a Gateway
to front our backend REST APIs.

Backend feature teams own their APIs, but are all consumed by one GraphQL API
which is the nexus of backend communication for things like periodic tasks and
our client applications. None of the APIs call each other directly.

I think it's working out really well for the front end teams and aligning well
with our engineering organization as a whole. As for who owns the GraphQL
repos, everyone contributes to it but we rely on engineering leadership to
keep an eye on changes as the system solidifies.

~~~
strken
Although we're not a very large company, we do something similar, using it as
a gateway for everything but file uploads and some other special cases. It
feels like a cross between a system-wide statically typed interface and HTTP
routing. The tools (graphiql, graphdoc, apollo, the apollo eslint plugin) are
really good and they help make the API feel discoverable and flexible.

