Esempio n. 1
0
 /**
  * Define environment setup.
  *
  * @param  \Illuminate\Foundation\Application  $app
  * @return void
  */
 protected function getEnvironmentSetUp($app)
 {
     parent::getEnvironmentSetUp($app);
     $app['config']->set('lighthouse.schema.register', function () {
         $graphql = app('graphql');
         $graphql->schema()->type('company', CompanyType::class);
         $graphql->schema()->type('user', UserType::class);
         $graphql->schema()->type('task', TaskType::class);
         $graphql->schema()->query('companyQuery', Support\CompanyQuery::class);
         $graphql->schema()->dataLoader('company', CompanyDataLoader::class);
         $graphql->schema()->dataLoader('user', UserDataLoader::class);
         $graphql->schema()->dataLoader('task', TaskDataLoader::class);
     });
 }
Esempio n. 2
0
 /**
  * Set up environment.
  *
  * @param  \Illuminate\Foundation\Application $app
  * @return void
  */
 protected function getEnvironmentSetup($app)
 {
     parent::getEnvironmentSetUp($app);
     $app['config']->set('lighthouse.cache', __DIR__ . '/../Support/storage/cache');
 }