Out of the box, GraphQL provides you with two abstractions: a schema and resolvers.
The first layer of abstraction is provided by the GraphQL schema. It hides the details of the backend architecture from the frontend. The schema can even be written in GraphQL schema language, making it quite concise and easy to read or maintain. The most important decision at this layer is choosing which types and fields to create. This is specific to each application, but there are some general rules you can follow. For the sake of brevity I’ll skip them here, but if you’re interested, watch out for a future post on our GraphQL blog.
#graphql #code #structure
GraphQL’s value proposition for full-stack and frontend developers is pretty clear. It provides the missing layer of abstraction between backends and frontends.