3 ms·
The GraphQL equivalent to creating a new, specialized REST route would be to create a new, specialized query. E.g. the following REST /articles-with-comme
by valenterry 6y ago
The GraphQL equivalent to creating a new, specialized REST route would be to create a new, specialized query.
E.g. the following REST
/articles-with-comments?number=20
which returns title, contents etc. would map to a completely new query in graphql
articlesWithComments(number: Integer) {
title
contents
...
}
so it is exactly as easy to optimize. Of course this is not very composable, but that is equally true for both solutions.
- gabereiser 6y agoand this is the pattern we see in the wild mostly.