Prace s mapu, zobrazeni GPX, editace kopilota, skeletony
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import gql from "graphql-tag";
|
||||
|
||||
export const FRAGMENT_COPILOT_LIST_INFO = gql`
|
||||
fragment copilotListInfo on Copilot {
|
||||
id
|
||||
name
|
||||
}
|
||||
`;
|
||||
|
||||
export const FRAGMENT_COPILOT_FULL_INFO = gql`
|
||||
fragment copilotFullInfo on Copilot {
|
||||
id
|
||||
name
|
||||
}
|
||||
`;
|
||||
@@ -2,6 +2,20 @@ import gql from "graphql-tag";
|
||||
import {FRAGMENT_AIRCRAFT_BASIC_INFO, FRAGMENT_AIRCRAFT_FULL_INFO} from "src/graphql/fragments/aircraft";
|
||||
import {FRAGMENT_AIRPORT_INFO} from "src/graphql/fragments/airport";
|
||||
import {FRAGMENT_PHOTO_FULL_INFO} from "src/graphql/fragments/photo";
|
||||
import {FRAGMENT_POI_FULL_INFO} from "src/graphql/fragments/poi";
|
||||
|
||||
export const FRAGMENT_WEATHER_FULL_INFO = gql`
|
||||
fragment weatherFullInfo on WeatherInfo {
|
||||
datetime
|
||||
qnh
|
||||
temperatureSurface
|
||||
dewpointSurface
|
||||
windSpeedSurface
|
||||
windDirectionSurface
|
||||
cloudcoverTotal
|
||||
cloudcoverLow
|
||||
rain
|
||||
}`;
|
||||
|
||||
export const FRAGMENT_FLIGHT_FULL_INFO = gql`
|
||||
fragment flightFullInfo on Flight {
|
||||
@@ -12,8 +26,6 @@ fragment flightFullInfo on Flight {
|
||||
landingDatetime
|
||||
landings
|
||||
durationMinCalculated
|
||||
solo
|
||||
withInstructor
|
||||
|
||||
coverPhoto {
|
||||
thumbnailUrl
|
||||
@@ -24,12 +36,10 @@ fragment flightFullInfo on Flight {
|
||||
...airportInfo
|
||||
}
|
||||
|
||||
gpxTrackUrl
|
||||
track {
|
||||
pointOfInterest {
|
||||
id
|
||||
name
|
||||
gpsLatitude
|
||||
gpsLongitude
|
||||
...pointOfInterestFullInfo
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +47,15 @@ fragment flightFullInfo on Flight {
|
||||
...airportInfo
|
||||
}
|
||||
|
||||
landingWeatherInfo {
|
||||
...weatherFullInfo
|
||||
}
|
||||
|
||||
takeoffWeatherInfo {
|
||||
...weatherFullInfo
|
||||
}
|
||||
|
||||
|
||||
aircraft {
|
||||
...aircraftFullInfo
|
||||
}
|
||||
@@ -49,6 +68,8 @@ fragment flightFullInfo on Flight {
|
||||
${FRAGMENT_PHOTO_FULL_INFO}
|
||||
${FRAGMENT_AIRCRAFT_FULL_INFO}
|
||||
${FRAGMENT_AIRPORT_INFO}
|
||||
${FRAGMENT_POI_FULL_INFO}
|
||||
${FRAGMENT_WEATHER_FULL_INFO}
|
||||
`;
|
||||
|
||||
export const FRAGMENT_FLIGHT_LIST_INFO = gql`
|
||||
@@ -92,10 +113,3 @@ fragment flightEditIds on Flight {
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
// export const FRAGMENT_LOCATION = gql`
|
||||
// fragment airportInfo on Airport {
|
||||
// id
|
||||
// name
|
||||
// }
|
||||
// `;
|
||||
|
||||
@@ -11,4 +11,8 @@ export const FRAGMENT_PHOTO_FULL_INFO = gql`
|
||||
flightId
|
||||
pointOfInterestId
|
||||
isFlightCover
|
||||
gpsLatitude
|
||||
gpsLongitude
|
||||
gpsAltitude
|
||||
exposedAt
|
||||
}`;
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
import gql from "graphql-tag";
|
||||
import {FRAGMENT_COPILOT_FULL_INFO} from "src/graphql/fragments/copilot";
|
||||
|
||||
export const CREATE_COPILOT = gql`
|
||||
mutation createCopilot($input: CreateCopilotInput!) {
|
||||
createCopilot(input: $input) {
|
||||
...copilotFullInfo
|
||||
}
|
||||
}
|
||||
|
||||
${FRAGMENT_COPILOT_FULL_INFO}
|
||||
`;
|
||||
|
||||
export const EDIT_COPILOT = gql`
|
||||
mutation editCopilot($id: Int!, $input: EditCopilotInput!) {
|
||||
editCopilot(id: $id, input: $input) {
|
||||
...copilotFullInfo
|
||||
}
|
||||
}
|
||||
|
||||
${FRAGMENT_COPILOT_FULL_INFO}
|
||||
`;
|
||||
export const DELETE_COPILOT = gql`
|
||||
mutation deleteCopilot($id: Int!) {
|
||||
deleteCopilot(id: $id) {
|
||||
id
|
||||
}
|
||||
}
|
||||
`;
|
||||
@@ -1,5 +1,6 @@
|
||||
import gql from "graphql-tag";
|
||||
import {FRAGMENT_AIRCRAFT_FULL_INFO} from "src/graphql/fragments/aircraft";
|
||||
import {FRAGMENT_FLIGHT_LIST_INFO} from "src/graphql/fragments/flight";
|
||||
|
||||
export const AIRCRAFTS_LIST = gql`
|
||||
query AircraftsList {
|
||||
@@ -16,8 +17,13 @@ export const AIRCRAFT_DETAIL = gql`
|
||||
query AircraftDetail($id: Int!) {
|
||||
aircraft(id: $id) {
|
||||
...aircraftFullInfo
|
||||
|
||||
flights {
|
||||
...flightListInfo
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
${FRAGMENT_AIRCRAFT_FULL_INFO}
|
||||
|
||||
${FRAGMENT_FLIGHT_LIST_INFO}
|
||||
`;
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
import gql from "graphql-tag";
|
||||
import {FRAGMENT_FLIGHT_LIST_INFO} from "src/graphql/fragments/flight";
|
||||
import {FRAGMENT_COPILOT_FULL_INFO, FRAGMENT_COPILOT_LIST_INFO} from "src/graphql/fragments/copilot";
|
||||
|
||||
export const COPILOTS_LIST = gql`
|
||||
query copilotsList {
|
||||
copilots {
|
||||
id
|
||||
name
|
||||
...copilotListInfo
|
||||
}
|
||||
}
|
||||
|
||||
${FRAGMENT_COPILOT_LIST_INFO}
|
||||
`;
|
||||
|
||||
export const COPILOTS_DETAIL = gql`
|
||||
export const COPILOT_DETAIL = gql`
|
||||
query copilot($id: Int!) {
|
||||
copilot(id: $id) {
|
||||
id
|
||||
name
|
||||
...copilotFullInfo
|
||||
|
||||
flights {
|
||||
...flightListInfo
|
||||
@@ -22,5 +23,6 @@ query copilot($id: Int!) {
|
||||
}
|
||||
}
|
||||
|
||||
${FRAGMENT_COPILOT_FULL_INFO}
|
||||
${FRAGMENT_FLIGHT_LIST_INFO}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user