Closed frankpde closed 4 years ago
Using artisan artomator:graphql_scaffold MyModel results in an error when the program attempts to create schema.graphql:
artisan artomator:graphql_scaffold MyModel
schema.graphql
ErrorException file_get_contents(*****/graphql/schema.graphql): failed to open stream: No such file or directory at vendor/pwweb/artomator/src/Generators/GraphQL/GraphQLQueryGenerator.php:35 31| public function __construct(CommandData $commandData) 32| { 33| $this->commandData = $commandData; 34| $this->fileName = $commandData->config->pathGraphQL; > 35| $this->fileContents = file_get_contents($this->fileName); 36| $this->templateData = get_artomator_template('graphql.query'); 37| $this->templateData = fill_template($this->commandData->dynamicVars, $this->templateData); 38| } 39| +17 vendor frames 18 artisan:37 Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
You need to perform at least the following:
$ php artisan vendor:publish --tag=artomator
This will generate the graphql.schema file, which is needed before you can run any GraphQL based commands.
graphql.schema
Using
artisan artomator:graphql_scaffold MyModel
results in an error when the program attempts to createschema.graphql
: