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 phoneCountry
48 seats
49 user {
50 data {
51 id
52 }
53 }
54 passengers {
55 data {
56 id
57 attributes {
58 name
59 location
60 email
61 phone
62 phoneCountry
63 user {
64 data {
65 id
66 attributes {
67 firstName
68 lastName
69 }
70 }
71 }
72 }
73 }
74 }
75 }
76 }
77 }
78 }
79}
80
81mutation createEvent($eventData: EventInput!) {
82 createEvent(data: $eventData) {
83 data {
84 ...EventFields
85 }
86 }
87}
88
89mutation updateEvent($uuid: String!, $eventUpdate: EventInput!) {
90 updateEventByUUID(uuid: $uuid, data: $eventUpdate) {
91 data {
92 ...EventFields
93 }
94 }
95}
96
97mutation addEventAdmin($eventId: ID!, $email: String!) {
98 addEventAdmin(eventId: $eventId, email: $email) {
99 data {
100 id
101 attributes {
102 administrators
103 }
104 }
105 }
106}
107
108mutation deleteEventAdmin($eventId: ID!, $email: String!) {
109 deleteEventAdmin(eventId: $eventId, email: $email) {
110 data {
111 id
112 attributes {
113 administrators
114 }
115 }
116 }
117}
118
119query eventByUUID($uuid: String!) {
120 eventByUUID(uuid: $uuid) {
121 data {
122 ...EventFields
123 }
124 }
125}