Is space and multiple line in a query string essential?

Moved from GitHub dgo/128

Posted by FlyingOnion:

If so, what formats or rules should the string obey?

parasssh commented :

Can you elaborate? Did you mean query or mutation?

For mutation, the data must be JSON or RDF format.
For query, it must be GraphQL± query string described here . Specifically, yes, you can omit multiple lines. Spaces are required to tokenize properly.


  result(func: has(, first: 10) {

can also be written as,

{result(func: has(, first: 10) {uid expand(_all_)}}