4 ms·
Sorry for the shameless plug, but I wrote this blogpost talking about something very similar: https://blog.hasura.io/why-not-use-a-json-dsl-instead-of-graphql-d
by tango12 8y ago
Sorry for the shameless plug, but I wrote this blogpost talking about something very similar: https://blog.hasura.io/why-not-use-a-json-dsl-instead-of-graphql-d29f20cc97d2 https://blog.hasura.io/why-not-use-a-json-dsl-instead-of-gra...
The main edge over REST I think, is schema introspection and consequent community tooling.
- viraptor 8y agoI'm not sure how the need for graphql follows from the ideas/solutions. You could have graphjson, which enforces publishing a schema in the standard and forces a structure which allows easy validation. Graphql can be as "wrong" as json. If I write `query { query { query { foo`, it's not any more correct than `{"query": {"query": {"query": "foo"}}}`, but at least I've got existing tools to format the second one and generalise the inner fragments between multiple queries.