Format
This commit is contained in:
+8
-32
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user