text: const { gql } = require("apollo-server");
  
  const typeDefs = gql`
    # Schema definitions will go here
    type Launch {
      id: ID!
      site: String
      mission: Mission
      rocket: Rocket
      isBooked: Boolean!
    }
  
    type Rocket {
      id: ID!
      name: String
      type: String
    }
  
    type User {
      id: ID!
      email: String!
      trips: [Launch]!
      token: String
    }
  
    type Mission {
      name: String
      missionPatch(size: PatchSize): String
    }
  
    enum PatchSize {
      SMALL
      LARGE
    }
  
    # Query available for the client side
    type Query {
      launches (
        """
        The number of results to show must be > = 1. Default = 20
        """
        pageSize: Int
        """
        If you add a cursor here, it will only return results after this curosr
        """
        after: String
      ): LaunchConnection!
      launch(id: ID!): Launch
      me: User
    }
  
    """
      Simple wrapper around our list of launches that contains the lst item in the list
      Pass this cursor to te launches query to fetch result after this.
    """
    type LaunchConnection {
      cursor: String!
      hasMore: Boolean!
      launches: [Launch]!
    }
  
    # Mutation type for the client side
    type Mutation {
      bookTrips(launchIds: [ID]!): TripUpdateResponse!
      cancelTrip(launchId: ID!): TripUpdateResponse!
      login(email: String): User
    }
  
    type TripUpdateResponse {
      success: Boolean!
      message: String
      launches: [Launch]
    }
  `;
  
  module.exports = typeDefs;
  
  