|
|
|
|
|
by lipanski
2048 days ago
|
|
> Give me all users whose phone number starts with 555 There's no magic there, it's left up to you whether you expose such functionality and you are in full control of all fields that make up your API. Most of the time your APIs will reflect your database associations `{ users { posts { comments } } }` which should be indexed anyway. Custom queries on top of that, like a search filter, can be indexed/optimized individually. Resources can be paginated quite easily and you can also enforce a maximum depth when requesting associations, so that you don't end up with requests too large to deliver. The main problem with GraphQL comes from the many different ways you can use it, which makes caching or eager loading difficult. |
|
That's not exposing database associations. At most that's exposing aspects of the domain model which are also reflected in the persistence model.