-
Notifications
You must be signed in to change notification settings - Fork 4
How to use GraphSchema
...more to come...
This page is about App architectures for using GraphSchema.
Check out the Example if you just want to get up and running.
GraphSchema spins up a GraphQL data backend for your app from nothing but a declarative GraphQL schema file. That means you can be really agile about how you integrate GraphSchema into an app and how you deploy development, testing and production infrastructure.
There are lots of setups that could work, so the following isn't restrictive.
For example, A good use of the way GraphSchema is designed is running a kubernetes cluster with Dgraph (e.g as per here) and GraphSchema pods and scaling the GraphSchema API endpoints as per need.
Even with that, there are essentially two choices of what you would expose GraphSchema to.
In some circumstances, it could be workable to have GraphSchema as the whole backend of a service. E.g. in a trusted environment, internal infrastructure or if the built-in API keys are enough.
However, normally, you'd want to layer business logic on top of GraphSchema and expose the results of that as a GraphQL endpoint or other service.
E.g. if you had a layered architecture of web frontend with GraphQL backend, then the backend can be a business logic layer that uses GraphSchema as a data microservice backend. That's how I'm using in an app - the exposed app is a thin authentication and logic layer that uses the GraphSchema API as it's DB layer.