Skip to content

Commit cc4c326

Browse files
committed
Add a empty data to error-mode
1 parent 3b70ad4 commit cc4c326

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

graphql.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010

1111
try {
1212
$schema = file_get_contents('schema.graphql');
13-
$schema = BuildSchema::build($schema);
13+
$schema = BuildSchema::build($schema);
1414
$rootValue = [
1515
'echo' => $resolveEcho,
1616
'sum' => $resolveSum,
17-
'prefix' => 'You said: ',
17+
'prefix' => '',
1818
];
1919

2020
if(isset($_POST["submit"])) {
@@ -50,6 +50,8 @@
5050
"debug" => [
5151
"message" => $e->getMessage(),
5252
],
53+
"data"=>[],
5354
];
5455
}
56+
5557
echo json_encode($result);

0 commit comments

Comments
 (0)