Clean and simple single-file example of main GraphQL concepts originally proposed and implemented by Leo Cavalcante.
php -S localhost:8080 graphql.php
curl --data '{"query": "query { echo(message: \"Hello World\") }" }' --header "Content-Type: application/json" http://localhost:8080
curl --data '{"query": "mutation { sum(x: 2, y: 2) }" }' --header "Content-Type: application/json" http://localhost:8080