all repos — caroster @ d093130068a7eaa39a600bd411181a85f168dc74

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