Merge pull request #117 from shinderohitt/patch-1

Fix commands for hello world example
This commit is contained in:
Vladimir Razuvaev 2017-05-16 17:20:42 +07:00 committed by GitHub
commit 53edfa0f84

View File

@ -1,8 +1,8 @@
<?php <?php
// Test this using following command // Test this using following command
// php -S localhost:8080 ./graphql.php & // php -S localhost:8080 ./graphql.php &
// curl http://localhost:8080 -d "query { echo(message: \"Hello\") }" // curl http://localhost:8080 -d '{"query": "query { echo(message: \"Hello World\") }" }'
// curl http://localhost:8080 -d "mutation { sum(x: 2, y: 2) }" // curl http://localhost:8080 -d '{"query": "mutation { sum(x: 2, y: 2) }" }'
require_once __DIR__ . '/../../vendor/autoload.php'; require_once __DIR__ . '/../../vendor/autoload.php';
use GraphQL\Type\Definition\ObjectType; use GraphQL\Type\Definition\ObjectType;