Skip to content

Commit

Permalink
Merge pull request #68 from kikoseijo/v2-beta
Browse files Browse the repository at this point in the history
Installation error fix.
  • Loading branch information
chrissm79 authored Mar 21, 2018
2 parents 8e2e819 + 0683400 commit 923cd21
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
8 changes: 8 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
7 changes: 6 additions & 1 deletion src/Schema/Utils/SchemaStitcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 923cd21

Please sign in to comment.