Zaklad pro zadavani novych letu
This commit is contained in:
@@ -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
|
||||
// }
|
||||
// `;
|
||||
@@ -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}
|
||||
`
|
||||
@@ -0,0 +1,11 @@
|
||||
import gql from "graphql-tag";
|
||||
|
||||
export const AIRPORTS_LIST = gql`
|
||||
query AirportsList {
|
||||
airports {
|
||||
id
|
||||
name
|
||||
icaoCode
|
||||
}
|
||||
}
|
||||
`;
|
||||
@@ -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}
|
||||
|
||||
`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user