Skip to content

Commit

Permalink
split graphql schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
lwih committed Sep 28, 2023
1 parent 5dd56b6 commit 29268d6
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 68 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
type Query {
missions(userId: ID): [Mission]!
mission(missionId: ID): Mission!
}

type Mission {
id: ID!
isClosed: Boolean!
missionSource: String!
type Action {
id: String
startDateTimeUtc: String!
endDateTimeUtc: String!
actions: [Action]
endDateTimeUtc: String
source: MissionSource!
status: ActionStatusType!
type: ActionType
data: ActionData
}

enum MissionSource {
Expand All @@ -20,33 +17,12 @@ enum MissionSource {
RAPPORTNAV
}

type Action {
id: String
startDateTimeUtc: String!
endDateTimeUtc: String
source: MissionSource!
status: ActionStatusType!
type: ActionType
data: ActionData
}

union ActionData =
FishActionData
| EnvActionData
| NavActionControl
| NavActionStatus

#union NavActionData = ActionControl | ActionStatus

#type NavActionData {
# id: String!
# startDateTimeUtc: String!
# endDateTimeUtc: String
# actionType: ActionType
# controlAction: ActionControl
# statusAction: ActionStatus
#}

type NavActionStatus {
statusAction: NavActionStatus
id: String!
Expand Down Expand Up @@ -106,36 +82,6 @@ enum VesselSize {
MORE_THAN_46m
}

type ControlNavigation {
id: String!
confirmed: Boolean
observations: String
}

type ControlSecurity {
id: String!
confirmed: Boolean
observations: String
}

type ControlAdministrative {
id: String!
confirmed: Boolean
compliantOperatingPermit: Boolean
upToDateNavigationPermit: Boolean
compliantSecurityDocuments: Boolean
observations: String
}

type ControlGensDeMer {
id: String!
confirmed: Boolean
staffOutnumbered: Boolean
upToDateMedicalCheck: Boolean
knowledgeOfFrenchLawAndLanguage: Boolean
observations: String
}

enum ActionType {
CONTROL
SURVEILLANCE
Expand Down Expand Up @@ -191,10 +137,3 @@ enum VehicleTypeEnum {
VEHICLE_LAND
VEHICLE_AIR
}

type User {
id: ID
name: String!
email: String!
token: String
}
29 changes: 29 additions & 0 deletions backend/src/main/resources/graphql/controls.graphqls
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
type ControlNavigation {
id: String!
confirmed: Boolean
observations: String
}

type ControlSecurity {
id: String!
confirmed: Boolean
observations: String
}

type ControlAdministrative {
id: String!
confirmed: Boolean
compliantOperatingPermit: Boolean
upToDateNavigationPermit: Boolean
compliantSecurityDocuments: Boolean
observations: String
}

type ControlGensDeMer {
id: String!
confirmed: Boolean
staffOutnumbered: Boolean
upToDateMedicalCheck: Boolean
knowledgeOfFrenchLawAndLanguage: Boolean
observations: String
}
13 changes: 13 additions & 0 deletions backend/src/main/resources/graphql/mission.graphqls
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
type Query {
missions(userId: ID): [Mission]!
mission(missionId: ID): Mission!
}

type Mission {
id: ID!
isClosed: Boolean!
missionSource: String!
startDateTimeUtc: String!
endDateTimeUtc: String!
actions: [Action]
}
6 changes: 6 additions & 0 deletions backend/src/main/resources/graphql/user.graphqls
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
type User {
id: ID
name: String!
email: String!
token: String
}

0 comments on commit 29268d6

Please sign in to comment.