From 2914738d4544855fe2353cf93149e770da2ab8a0 Mon Sep 17 00:00:00 2001 From: Treschelet Date: Tue, 6 Nov 2018 12:35:42 +0300 Subject: [PATCH 1/2] Fix Laravel 5.5 compability --- src/Folklore/GraphQL/LumenServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Folklore/GraphQL/LumenServiceProvider.php b/src/Folklore/GraphQL/LumenServiceProvider.php index c0cad515..505f736b 100644 --- a/src/Folklore/GraphQL/LumenServiceProvider.php +++ b/src/Folklore/GraphQL/LumenServiceProvider.php @@ -9,7 +9,7 @@ class LumenServiceProvider extends ServiceProvider */ protected function getRouter() { - return $this->app; + return property_exists($this->app, 'router') ? $this->app->router : $this->app; } /** From 075577bd5c92f7bf6767ff08e36a7d06f6246198 Mon Sep 17 00:00:00 2001 From: treschelet Date: Tue, 6 Nov 2018 14:16:22 +0300 Subject: [PATCH 2/2] Fix no config field in edge type --- src/Folklore/GraphQL/Relay/Relay.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Folklore/GraphQL/Relay/Relay.php b/src/Folklore/GraphQL/Relay/Relay.php index d720334e..3d1fa31f 100644 --- a/src/Folklore/GraphQL/Relay/Relay.php +++ b/src/Folklore/GraphQL/Relay/Relay.php @@ -24,7 +24,7 @@ public function connectionField($config = []) public function connectionFieldFromEdgeType($edgeType, $config = []) { - $typeName = array_get($edgeType->config, 'name'); + $typeName = $edgeType->name ? $edgeType->name : get_class($edgeType); $connectionName = array_get($config, 'connectionTypeName', str_plural($typeName).'Connection'); $connectionType = new ConnectionType([