all repos — caroster @ v8.2

[Octree] Group carpool to your event https://caroster.io

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    isReturnEvent
 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          firstname
 47          lastname
 48          phone_number
 49          phoneCountry
 50          seats
 51          user {
 52            data {
 53              id
 54              attributes {
 55                firstName
 56                lastName
 57              }
 58            }
 59          }
 60          passengers {
 61            data {
 62              id
 63              attributes {
 64                name
 65                location
 66                email
 67                phone
 68                phoneCountry
 69                user {
 70                  data {
 71                    id
 72                    attributes {
 73                      firstName
 74                      lastName
 75                    }
 76                  }
 77                }
 78              }
 79            }
 80          }
 81        }
 82      }
 83    }
 84  }
 85}
 86
 87mutation createEvent($eventData: EventInput!) {
 88  createEvent(data: $eventData) {
 89    data {
 90      ...EventFields
 91    }
 92  }
 93}
 94
 95mutation updateEvent($uuid: String!, $eventUpdate: EventInput!) {
 96  updateEventByUUID(uuid: $uuid, data: $eventUpdate) {
 97    data {
 98      ...EventFields
 99    }
100  }
101}
102
103mutation addEventAdmin($eventId: ID!, $email: String!) {
104  addEventAdmin(eventId: $eventId, email: $email) {
105    data {
106      id
107      attributes {
108        administrators
109      }
110    }
111  }
112}
113
114mutation deleteEventAdmin($eventId: ID!, $email: String!) {
115  deleteEventAdmin(eventId: $eventId, email: $email) {
116    data {
117      id
118      attributes {
119        administrators
120      }
121    }
122  }
123}
124
125query eventByUUID($uuid: String!) {
126  eventByUUID(uuid: $uuid) {
127    data {
128      ...EventFields
129      attributes {
130        linkedEvent {
131          data {
132            id
133            attributes {
134              uuid
135              travels {
136                data {
137                  id
138                }
139              }
140            }
141          }
142        }
143      }
144    }
145  }
146}
147
148query eventTripAlerts($uuid: String!) {
149  eventByUUID(uuid: $uuid) {
150    data {
151      id
152      attributes {
153        tripAlerts {
154          data {
155            id
156            attributes {
157              address
158              radius
159              latitude
160              longitude
161              user {
162                data {
163                  id
164                  attributes {
165                    firstName
166                    lastName
167                    email
168                  }
169                }
170              }
171            }
172          }
173        }
174      }
175    }
176  }
177}