Compare commits
4 Commits
0a7f86dc33
...
644f3697c7
| Author | SHA1 | Date | |
|---|---|---|---|
| 644f3697c7 | |||
| 31d385d3d4 | |||
| ebc7ff4f2f | |||
| 67a58a5277 |
@@ -6,6 +6,7 @@ use App;
|
||||
use Config;
|
||||
use Illuminate\Foundation\AliasLoader;
|
||||
use GermanAirlinesVa\Graphql\Classes\GraphqlServiceProvider;
|
||||
use Nuwave\Lighthouse\Subscriptions\SubscriptionServiceProvider;
|
||||
|
||||
class Plugin extends PluginBase
|
||||
{
|
||||
@@ -34,6 +35,7 @@ class Plugin extends PluginBase
|
||||
App::make('October\Rain\Support\ClassLoader')->addDirectories('graphql');
|
||||
$this->bootPackages();
|
||||
App::register(GraphqlServiceProvider::class);
|
||||
App::register(SubscriptionServiceProvider::class);
|
||||
}
|
||||
|
||||
public function bootPackages()
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
title = "CMS"
|
||||
==
|
||||
<?php
|
||||
use Cms\Classes\Theme;
|
||||
use Cms\Classes\Content;
|
||||
|
||||
function resolveCmsContent($root, $args) {
|
||||
if (! $theme = Theme::getActiveTheme()) {
|
||||
throw new \Exception(Lang::get('cms::lang.theme.active.not_found'));
|
||||
}
|
||||
|
||||
return Content::loadCached($theme, $args['name']);
|
||||
}
|
||||
?>
|
||||
==
|
||||
# Content
|
||||
extend type Query { cmsContent(name: String!): CmsContent! }
|
||||
type CmsContent { fileName: String! content: String markup: String parsedMarkup: String }
|
||||
# CMS-wide types
|
||||
# Backend\Models\User
|
||||
type BackendUser { id: ID! }
|
||||
#System\Models\File
|
||||
type SystemFile { id: ID path: String title: String description: String }
|
||||
@@ -0,0 +1,15 @@
|
||||
title = "Fleet"
|
||||
==
|
||||
==
|
||||
# Content
|
||||
extend type Query {
|
||||
aircraft: [Aircraft] @all(model: "GermanAirlinesVa\\Fleet\\Models\\Aircraft")
|
||||
aircraftType: [AircraftType] @all(model: "GermanAirlinesVa\\Fleet\\Models\\AircraftType")
|
||||
}
|
||||
|
||||
type Subscription {
|
||||
aircraft: [Aircraft] @subscription(class: "GermanAirlinesVa\\Fleet\\Classes\\Aircraft")
|
||||
}
|
||||
|
||||
type Aircraft { name: String! registration: String! }
|
||||
type AircraftType { type: String! aircrafts: [Aircraft] @hasMany }
|
||||
Reference in New Issue
Block a user