frontend/graphql/event.gql (view raw)
1fragment EventFields on EventEntity {
2 id
3 attributes {
4 uuid
5 name
6 description
7 enabled_modules
8 email
9 lang
10 administrators
11 date
12 address
13 latitude
14 longitude
15 waitingPassengers {
16 data {
17 id
18 attributes {
19 name
20 email
21 location
22 user {
23 data {
24 id
25 attributes {
26 firstName
27 lastName
28 }
29 }
30 }
31 }
32 }
33 }
34 travels(pagination: {limit: 500}) {
35 data {
36 id
37 attributes {
38 meeting
39 meeting_latitude
40 meeting_longitude
41 departureDate
42 departureTime
43 details
44 vehicleName
45 phone_number
46 phoneCountry
47 seats
48 user {
49 data {
50 id
51 }
52 }
53 passengers {
54 data {
55 id
56 attributes {
57 name
58 location
59 email
60 phone
61 phoneCountry
62 user {
63 data {
64 id
65 attributes {
66 firstName
67 lastName
68 }
69 }
70 }
71 }
72 }
73 }
74 }
75 }
76 }
77 }
78}
79
80mutation createEvent($eventData: EventInput!) {
81 createEvent(data: $eventData) {
82 data {
83 ...EventFields
84 }
85 }
86}
87
88mutation updateEvent($uuid: String!, $eventUpdate: EventInput!) {
89 updateEventByUUID(uuid: $uuid, data: $eventUpdate) {
90 data {
91 ...EventFields
92 }
93 }
94}
95
96mutation addEventAdmin($eventId: ID!, $email: String!) {
97 addEventAdmin(eventId: $eventId, email: $email) {
98 data {
99 id
100 attributes {
101 administrators
102 }
103 }
104 }
105}
106
107mutation deleteEventAdmin($eventId: ID!, $email: String!) {
108 deleteEventAdmin(eventId: $eventId, email: $email) {
109 data {
110 id
111 attributes {
112 administrators
113 }
114 }
115 }
116}
117
118query eventByUUID($uuid: String!) {
119 eventByUUID(uuid: $uuid) {
120 data {
121 ...EventFields
122 }
123 }
124}
125
126query eventTripAlerts($uuid: String!) {
127 eventByUUID(uuid: $uuid) {
128 data {
129 id
130 attributes {
131 tripAlerts {
132 data {
133 id
134 attributes {
135 address
136 radius
137 latitude
138 longitude
139 user {
140 data {
141 id
142 attributes {
143 firstName
144 lastName
145 email
146 }
147 }
148 }
149 }
150 }
151 }
152 }
153 }
154 }
155}