Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/GraphQLController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class GraphQLController extends Controller {
* @return \Illuminate\Http\JsonResponse
*/
public function query(Request $request, $schema = null) {

$inputs = $request->all();
$data = [];

Expand All @@ -48,7 +47,6 @@ public function query(Request $request, $schema = null) {
else {
$data = $this->executeQuery($schema, $inputs);
}

} catch (\Exception $exception) {
$data = GraphQL::formatGraphQLException($exception);
Log::debug($exception);
Expand Down
2 changes: 1 addition & 1 deletion src/Support/Definition/Definition.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public function resolveInputType() {
'fields' => function () {
return array_merge([
'id' => Type::id(),
'__typename' => Type::string(),
'_morphType' => Type::string(),
], $this->getMutable());
}
]));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class MorphToRelationTransformer extends AbstractRelationTransformer {
*/
protected function hydrate() {
$id = array_get($this->values, 'id', null);
$type = array_get($this->values, '__typename', null);
$type = array_get($this->values, '_morphType', null);

if (is_null($type)) {
throw new \Exception(
Expand Down