draft planovace
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import gql from "graphql-tag";
|
||||
|
||||
export const FRAGMENT_FLIGHT_PLAN_FULL_INFO = gql`
|
||||
fragment flightPlanFullInfo on FlightPlan {
|
||||
id
|
||||
name
|
||||
markers {
|
||||
name
|
||||
position
|
||||
type
|
||||
gpsLatitude
|
||||
gpsLongitude
|
||||
}
|
||||
}`;
|
||||
|
||||
export const FRAGMENT_FLIGHT_PLAN_LIST_INFO = gql`
|
||||
fragment flightPlanListInfo on FlightPlanListInfo {
|
||||
id
|
||||
name
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
import gql from "graphql-tag";
|
||||
import {FRAGMENT_FLIGHT_PLAN_FULL_INFO} from "src/graphql/fragments/flightPlan";
|
||||
|
||||
export const CREATE_FLIGHT_PLAN = gql`
|
||||
mutation createFlight_Plan($input: CreateFlightPlanInput!) {
|
||||
createFlightPlan(input: $input) {
|
||||
...flightPlanFullInfo
|
||||
}
|
||||
}
|
||||
|
||||
${FRAGMENT_FLIGHT_PLAN_FULL_INFO}
|
||||
`;
|
||||
|
||||
export const EDIT_FLIGHT_PLAN = gql`
|
||||
mutation editFlightPlan($id: Int!, $input: EditFlightPlanInput!) {
|
||||
editFlight_Plan(id: $id, input: $input) {
|
||||
...flight_planFullInfo
|
||||
}
|
||||
}
|
||||
${FRAGMENT_FLIGHT_PLAN_FULL_INFO}
|
||||
`;
|
||||
export const DELETE_FLIGHT_PLAN = gql`
|
||||
mutation deleteFlightPlan($id: Int!) {
|
||||
deleteFlightPlan(id: $id) {
|
||||
id
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
import gql from "graphql-tag";
|
||||
import {FRAGMENT_FLIGHT_PLAN_LIST_INFO} from "src/graphql/fragments/flightPlan";
|
||||
|
||||
export const FLIGHT_PLANS_LIST = gql`
|
||||
query flightPlansList {
|
||||
flightPlans {
|
||||
...flightPlanListInfo
|
||||
}
|
||||
}
|
||||
|
||||
${FRAGMENT_FLIGHT_PLAN_LIST_INFO}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user