Skip to content

Commit 5be0944

Browse files
authored
Merge pull request #83 from bertrandgauthier/master
Small correction in examples
2 parents 595ae52 + 1adfe21 commit 5be0944

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

examples/00-hello-world/graphql.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<?php
22
// Test this using following command
3-
// php -S localhost:8080 ./graphql.php
4-
require_once '../../vendor/autoload.php';
3+
// php -S localhost:8080 ./graphql.php &
4+
// curl http://localhost:8080 -d "query { echo(message: \"Hello\") }"
5+
// curl http://localhost:8080 -d "mutation { sum(x: 2, y: 2) }"
6+
require_once __DIR__ . '/../../vendor/autoload.php';
57

68
use GraphQL\Type\Definition\ObjectType;
79
use GraphQL\Type\Definition\Type;

examples/01-blog/graphql.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
// Test this using following command
3-
// php -S localhost:8080 ./index.php
4-
require_once '../../vendor/autoload.php';
3+
// php -S localhost:8080 ./graphql.php
4+
require_once __DIR__ . '/../../vendor/autoload.php';
55

66
use \GraphQL\Examples\Blog\Types;
77
use \GraphQL\Examples\Blog\AppContext;

0 commit comments

Comments
 (0)