3 ms·
What do you mean by structured? How is GraphQL structured Would you consider something like PHP's serialize() function to be structured? serialize(array('1
by underwater 7y ago
What do you mean by structured? How is GraphQL structured Would you consider something like PHP's serialize() function to be structured?
serialize(array('1' => 'elem 1', '2'=> 'elem 2', '3'=> 'elem 3'));
// a:3:{i:1;s:6:"elem 1";i:2;s:6:"elem 2";i:3;s:6:"elem 3";}
There are a lot of advantages to creating a custom syntax. In your example what does `query: { user: { id: 1, name: "true", } }` yield? How do you represent fragments? How do you represent variables and directives?
You could implement conventions like `$ref`s in JSON schema, but then you've ended up creating another custom syntax... just this time it's piggy backing on JSON instead of plain text.