Hacker News new | ask | show | jobs
by indubitably 3040 days ago
Perhaps it's nitpicking, but what benefit is it to not make the GraphQL language be valid JSON?
4 comments

A JSON dsl would be significantly more verbose to support the feature set. GraphQL is super straightforward.
There is a json (technically object) to graphql converter up on npm I use to dynamically create queries. I use it sparingly due to verbosity https://github.com/kadirahq/graphqlify
valid point, but are you talking about the schema or the results. For Schema, it makes sense to have a different DSL as JSON's cons include the inability to describe types on values.

Just with 3 types (string, number, boolean), we can not cover more advanced types.

Just going to put this here: http://jsonapi.org/