From cda3f3d13bd21f22a4c8634d5c423af8ddc5980b Mon Sep 17 00:00:00 2001 From: Kiko Seijo Date: Tue, 20 Mar 2018 23:56:13 +0100 Subject: [PATCH 1/2] Fix for file_get_content error. --- src/Schema/Utils/SchemaStitcher.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Schema/Utils/SchemaStitcher.php b/src/Schema/Utils/SchemaStitcher.php index 9f5756ffe8..0260ebde33 100644 --- a/src/Schema/Utils/SchemaStitcher.php +++ b/src/Schema/Utils/SchemaStitcher.php @@ -44,7 +44,12 @@ public function lighthouseSchema($globalId = '_id') */ protected function appSchema($path) { - $schema = file_get_contents($path); + try { + $schema = file_get_contents($path); + } catch (\Exception $e) { + // TODO: Publish demo/startup file with a minimal. + return ''; + } $imports = collect(explode("\n", $schema))->filter(function ($line) { return 0 === strpos(trim($line), '#import'); From 068340088176e15d7d9bc4fec85d697c298f182e Mon Sep 17 00:00:00 2001 From: Kiko Seijo Date: Tue, 20 Mar 2018 23:56:36 +0100 Subject: [PATCH 2/2] L5 package autodiscovery --- composer.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/composer.json b/composer.json index 66e141f14f..841d2a02b1 100644 --- a/composer.json +++ b/composer.json @@ -49,6 +49,14 @@ "test" : "vendor/bin/phpunit --colors=always", "test:ci": "composer test -- --verbose --coverage-text --coverage-clover=coverage.xml" }, + "extra": { + "laravel": { + "providers": ["Nuwave\\Lighthouse\\Providers\\LighthouseServiceProvider"], + "aliases": { + "graphql": "Nuwave\\Lighthouse\\GraphQL" + } + } + }, "config": { "sort-packages": true }