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 position
16 waitingPassengers {
17 data {
18 id
19 attributes {
20 name
21 email
22 location
23 user {
24 data {
25 id
26 attributes {
27 firstName
28 lastName
29 }
30 }
31 }
32 }
33 }
34 }
35 travels(pagination: {limit: 500}) {
36 data {
37 id
38 attributes {
39 meeting
40 meeting_latitude
41 meeting_longitude
42 departureDate
43 departureTime
44 details
45 vehicleName
46 phone_number
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 user {
62 data {
63 id
64 attributes {
65 firstName
66 lastName
67 }
68 }
69 }
70 }
71 }
72 }
73 }
74 }
75 }
76 }
77}
78
79mutation createEvent($eventData: EventInput!) {
80 createEvent(data: $eventData) {
81 data {
82 ...EventFields
83 }
84 }
85}
86
87mutation updateEvent($uuid: String!, $eventUpdate: EventInput!) {
88 updateEventByUUID(uuid: $uuid, data: $eventUpdate) {
89 data {
90 ...EventFields
91 }
92 }
93}
94
95mutation addEventAdmin($eventId: ID!, $email: String!) {
96 addEventAdmin(eventId: $eventId, email: $email) {
97 data {
98 id
99 attributes {
100 administrators
101 }
102 }
103 }
104}
105
106mutation deleteEventAdmin($eventId: ID!, $email: String!) {
107 deleteEventAdmin(eventId: $eventId, email: $email) {
108 data {
109 id
110 attributes {
111 administrators
112 }
113 }
114 }
115}
116
117query eventByUUID($uuid: String!) {
118 eventByUUID(uuid: $uuid) {
119 data {
120 ...EventFields
121 }
122 }
123}