I believe the schema.graphql needs to be initialised if it does not yet exist:
-> artisan artomator:graphql_scaffold Test --prefix=Namespace/Prefix/Here
Specify fields for the model (skip id & timestamp fields, we will add it automatically)
Read docs carefully to specify field inputs)
Enter "exit" to finish
Field: (name db_type html_type options) []:
> name string
Enter validations: []:
> required
Field: (name db_type html_type options) []:
> exit
Migration created:
2020_03_29_124346_create_tests_table.php
Model created:
Test.php
Repository created:
TestRepository.php
ErrorException
file_get_contents(/Users/admin/Webserver/laravel.com.demo/graphql/schema.graphql): failed to open stream: No such file or directory
at vendor/pwweb/artomator/src/Generators/GraphQL/GraphQLMutationGenerator.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.mutations');
37| $this->templateData = fill_template($this->commandData->dynamicVars, $this->templateData);
38| $this->templateData = fill_template($this->generateSchema(), $this->templateData);
39| }
• Database name seems incorrect: You're using the default database name `laravel`. This database does not exist.
Edit the `.env` file and use the correct database name in the `DB_DATABASE` key.
https://laravel.com/docs/master/database#configuration
+17 vendor frames
18 artisan:37
Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))-> artisan artomator:graphql_scaffold Test --prefix=Namespace/Prefix/Here
Specify fields for the model (skip id & timestamp fields, we will add it automatically)
Read docs carefully to specify field inputs)
Enter "exit" to finish
Field: (name db_type html_type options) []:
> name string
Enter validations: []:
> required
Field: (name db_type html_type options) []:
> exit
Migration created:
2020_03_29_124346_create_tests_table.php
Model created:
Test.php
Repository created:
TestRepository.php
ErrorException
file_get_contents(/Users/admin/Webserver/laravel.com.demo/graphql/schema.graphql): failed to open stream: No such file or directory
at vendor/pwweb/artomator/src/Generators/GraphQL/GraphQLMutationGenerator.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.mutations');
37| $this->templateData = fill_template($this->commandData->dynamicVars, $this->templateData);
38| $this->templateData = fill_template($this->generateSchema(), $this->templateData);
39| }
• Database name seems incorrect: You're using the default database name `laravel`. This database does not exist.
Edit the `.env` file and use the correct database name in the `DB_DATABASE` key.
https://laravel.com/docs/master/database#configuration
+17 vendor frames
18 artisan:37
Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))```
I believe the schema.graphql needs to be initialised if it does not yet exist: