|
|
|
|
|
by jbjorge
3235 days ago
|
|
To all considering using graphql, let me tell you something that was unclear to me when I first tried it:
If you plan to use it with a schemaless (nosql/graph) backend, graphql will force you to write a schema for it. If you can't (due to dynamic data), you will just end up forcing graphql treat your data as json-blobs with no schema.
Graphql turns into a json-blob transmitter with no benefits.
Also, if you have deeply nested/recursive data structures, the client performing the query needs to know just how deep it should query. This can lead to ridiculous queries if you're running on a graph db where the client doesn't know how many vertices it should traverse.
REST is a better fit if the above is true for you. |
|
GraphQL excels at nested data structures. When you have infinitely recursive child nodes of the same type (like ancestors in a family tree) the GraphQL list type should be used.