Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
67 | public function parseLiteral($ast, array $variables = null) |
||
68 | { |
||
69 | // Note: throwing GraphQL\Error\Error vs \UnexpectedValueException to benefit from GraphQL |
||
70 | // error location in query: |
||
71 | if (!($ast instanceof StringValueNode)) { |
||
72 | throw new Error('Query error: Can only parse strings got: ' . $ast->kind, [$ast]); |
||
73 | } |
||
74 | |||
75 | return $ast->value; |
||
76 | } |
||
78 |