Zaklad pro zadavani novych letu

This commit is contained in:
Michal Kváček
2023-06-06 07:35:04 +02:00
parent 9d843c62a6
commit 25bf93589e
19 changed files with 413 additions and 197 deletions
+35
View File
@@ -0,0 +1,35 @@
import gql from "graphql-tag";
export const FRAGMENT_FLIGHT_FULL_INFO = gql`
fragment flightFullInfo on Flight {
id
name
takeoffDatetime
landingDatetime
takeoffAirport {
id
name
}
landingAirport {
id
name
}
aircraft {
id
name
photoUrl
}
}
`;
// export const FRAGMENT_LOCATION = gql`
// fragment airportInfo on Airport {
// id
// name
// }
// `;
+12
View File
@@ -0,0 +1,12 @@
import gql from "graphql-tag";
import {FRAGMENT_FLIGHT_FULL_INFO} from "src/graphql/fragments/flight";
export const CREATE_FLIGHT = gql`
mutation createFlight($input: CreateFlightInput!) {
createFlight(input: $input) {
...flightFullInfo
}
}
${FRAGMENT_FLIGHT_FULL_INFO}
`
+11
View File
@@ -0,0 +1,11 @@
import gql from "graphql-tag";
export const AIRPORTS_LIST = gql`
query AirportsList {
airports {
id
name
icaoCode
}
}
`;
+5 -2
View File
@@ -1,10 +1,13 @@
import gql from "graphql-tag";
import {FRAGMENT_FLIGHT_FULL_INFO} from "src/graphql/fragments/flight";
export const FLIGHTS_LIST = gql`
query FlightsList {
flights {
name
id
...flightFullInfo
}
}
${FRAGMENT_FLIGHT_FULL_INFO}
`;