Skip to content
This repository has been archived by the owner on Feb 10, 2019. It is now read-only.

Fix Lumen 5.5 compability #401

Open
wants to merge 2 commits into
base: feature/relay
Choose a base branch
from
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: 1 addition & 1 deletion src/Folklore/GraphQL/LumenServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Folklore/GraphQL/Relay/Relay.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this related to Lumen compatibility or a separate fix?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably it's а separate fix, I include it to this pull request because test in CI for php 7.1 are failed

$connectionName = array_get($config, 'connectionTypeName', str_plural($typeName).'Connection');

$connectionType = new ConnectionType([
Expand Down