3 ms·
This. Nearly every GraphQL schema I've seen is a logical representation of the domain, just like how we typically approach schema design in OO apps. This is pro
by ryanmarsh 8y ago
This. Nearly every GraphQL schema I've seen is a logical representation of the domain, just like how we typically approach schema design in OO apps. This is probably fine in many contexts where your GraphQL endpoint is consumed by other internal services.
However, if your GraphQL endpoint is used by consumer/public/external clients I feel like we need to give everyone permission to make a Schema matching the View Model, not the Model (proper). In practice GraphQL works quite nicely as a layer to translate the model proper into the view model. This makes MVVM much more attractive for SPA's than in object->relational worlds prior.