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 administrators
10 date
11 address
12 latitude
13 longitude
14 position
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 departure
42 details
43 vehicleName
44 phone_number
45 seats
46 user {
47 data {
48 id
49 }
50 }
51 passengers {
52 data {
53 id
54 attributes {
55 name
56 location
57 email
58 user {
59 data {
60 id
61 attributes {
62 firstName
63 lastName
64 }
65 }
66 }
67 }
68 }
69 }
70 }
71 }
72 }
73 }
74}
75
76mutation createEvent(
77 $name: String!
78 $email: String!
79 $date: Date
80 $address: String
81 $latitude: Float
82 $longitude: Float
83 $description: String
84 $newsletter: Boolean
85) {
86 createEvent(
87 data: {
88 name: $name
89 email: $email
90 date: $date
91 latitude: $latitude
92 longitude: $longitude
93 address: $address
94 description: $description
95 newsletter: $newsletter
96 }
97 ) {
98 data {
99 ...EventFields
100 }
101 }
102}
103
104mutation updateEvent($uuid: String!, $eventUpdate: EventInput!) {
105 updateEventByUUID(uuid: $uuid, data: $eventUpdate) {
106 data {
107 ...EventFields
108 }
109 }
110}
111
112mutation addEventAdmin($eventId: ID!, $email: String!) {
113 addEventAdmin(eventId: $eventId, email: $email) {
114 data {
115 id
116 attributes {
117 administrators
118 }
119 }
120 }
121}
122
123mutation deleteEventAdmin($eventId: ID!, $email: String!) {
124 deleteEventAdmin(eventId: $eventId, email: $email) {
125 data {
126 id
127 attributes {
128 administrators
129 }
130 }
131 }
132}
133
134query eventByUUID($uuid: String!) {
135 eventByUUID(uuid: $uuid) {
136 data {
137 ...EventFields
138 }
139 }
140}