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