This commit is contained in:
Your Name
2021-08-04 00:56:18 +02:00
parent 51941b88ee
commit f01509cab1
12 changed files with 112 additions and 139 deletions
+4 -11
View File
@@ -1,5 +1,4 @@
title = "CMS"
==
title = "CMS" ==
<?php
use Cms\Classes\Theme;
use Cms\Classes\Content;
@@ -12,12 +11,6 @@ function resolveCmsContent($root, $args) {
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 }
== # 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 }
+8 -32
View File
@@ -1,32 +1,8 @@
title = "Fleet"
==
==
# Content
extend type Query {
aircraft: [Aircraft] @all(model: "GermanAirlinesVa\\Fleet\\Models\\Aircraft")
aircraftType: [AircraftType] @all(model: "GermanAirlinesVa\\Fleet\\Models\\AircraftType")
}
extend type Subscription {
aircraftAdded: Aircraft @subscription(class: "GermanAirlinesVa\\Fleet\\Classes\\AircraftAdded")
}
extend type Mutation {
addAircraft(
aircraft_type_id: ID!,
home_airport_id: ID!,
name: String!,
registration: String!
): Aircraft
@create(model: "GermanAirlinesVa\\Fleet\\Models\\Aircraft")
@broadcast(subscription: "aircraftAdded")
}
type Aircraft {
id: ID!
aircraft_type_id: ID!
home_airport_id: ID!
name: String!
registration: String!
}
type AircraftType { type: String! aircrafts: [Aircraft] @hasMany }
title = "Fleet" == == # Content extend type Query { aircraft: [Aircraft] @all(model:
"GermanAirlinesVa\\Fleet\\Models\\Aircraft") aircraftType: [AircraftType] @all(model:
"GermanAirlinesVa\\Fleet\\Models\\AircraftType") } extend type Subscription { aircraftAdded: Aircraft
@subscription(class: "GermanAirlinesVa\\Fleet\\Classes\\AircraftAdded") } extend type Mutation { addAircraft(
aircraft_type_id: ID!, home_airport_id: ID!, name: String!, registration: String! ): Aircraft @create(model:
"GermanAirlinesVa\\Fleet\\Models\\Aircraft") @broadcast(subscription: "aircraftAdded") } type Aircraft { id: ID!
aircraft_type_id: ID! home_airport_id: ID! name: String! registration: String! } type AircraftType { type: String!
aircrafts: [Aircraft] @hasMany }