all repos — caroster @ f5c854ad35aa58a77481d22c3554680f8828f45f

[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          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      attributes {
124        linkedEvent {
125          data {
126            id
127            attributes {
128              uuid
129              travels {
130                data {
131                  id
132                }
133              }
134            }
135          }
136        }
137      }
138    }
139  }
140}
141
142query eventTripAlerts($uuid: String!) {
143  eventByUUID(uuid: $uuid) {
144    data {
145      id
146      attributes {
147        tripAlerts {
148          data {
149            id
150            attributes {
151              address
152              radius
153              latitude
154              longitude
155              user {
156                data {
157                  id
158                  attributes {
159                    firstName
160                    lastName
161                    email
162                  }
163                }
164              }
165            }
166          }
167        }
168      }
169    }
170  }
171}