✈️ GraphQL API: User Travel Experience

This API enables client applications to request personalized user travel data. Using the me query, clients can access user profile, flight bookings, and associated travel details. Authentication is handled via Authorization headers and returns scoped data for the current user.


πŸ” Authentication

All requests must include a valid authorization token in the Authorization header:

Authorization: Bearer <token>

πŸ“˜ Root Query

me: Me!

Retrieves information about the currently authenticated user, including profile data, bookings, and account settings.


πŸ‘€ Type: Me

FieldTypeDescription
nameString!Full name of the user
usernameString!Unique username
bookings[Booking!]!List of booked flights
informationMyInfo!Contact and payment information

πŸ“¦ Type: Booking

FieldTypeDescription
ticket_numberString!Unique ticket number
flightFlight!Associated flight details
seatString!Seat assignment on the flight

✈️ Type: Flight

FieldTypeDescription
numberString!Flight number
route_idString!ID of the associated route
routeRoute!Details of the route
scheduled_departureString!ISO date-time for departure
scheduled_arrivalString!ISO date-time for arrival
detailsFlightDetails!Additional flight information

πŸ—ΊοΈ Type: Route

FieldTypeDescription
idString!Unique identifier for the route
originString!Airport of departure
destinationString!Airport of arrival
avg_durationInt!Average flight duration in minutes

πŸ›« Type: FlightDetails

FieldTypeDescription
aircraft_typeString!Aircraft model/type
flight_numberString!Flight number (repeated)
in_flight_entertainmentBoolean!Whether entertainment is available
meal_options[String!]!List of available meals

πŸ“‡ Type: MyInfo

FieldTypeDescription
addressString!Mailing address
phone_numberString!User's phone number
emailString!Email address
frequent_flier_numberStringOptional FF number
payment_methods[PaymentMethod!]!Stored payment methods

πŸ’³ Type: PaymentMethod

FieldTypeDescription
idID!Unique ID of payment method
redacted_card_numberString!Masked card number (e.g., ****1234)
card_holder_nameString!Name on the card
expiration_dateString!Expiry date in MM/YY or ISO format