6 ms·
Perhaps it's nitpicking, but what benefit is it to not make the GraphQL language be valid JSON?
by indubitably 9y ago
Perhaps it's nitpicking, but what benefit is it to not make the GraphQL language be valid JSON?
- bpicolo 9y agoA JSON dsl would be significantly more verbose to support the feature set. GraphQL is super straightforward.
- joshribakoff 9y agoThere 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 https://github.com/kadirahq/graphqlify
- jaredcnance 9y agoJust going to put this here: http://jsonapi.org/ http://jsonapi.org/
- patelpankaj 9y agovalid 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.