enum Episode { NEWHOPE, EMPIRE, JEDI }

interface Character {
  id: String!
  name: String
  appearsIn: [Episode]
  friends: [Character]
}

type Human implements Character {
  id: String!
  name: String
  friends: [Character]
  appearsIn: [Episode]
  homePlanet: String
}

input CharacterReview {
  id: String!
	rating: Int
	comment: String
}

type Droid implements Character {
  id: String!
  name: String
  friends: [Character]
  appearsIn: [Episode]
  primaryFunction: String
}

type Review {
  reviewId: String!
	rating: Int
	comment: String
}

type Query {
  "Hero query to get character details"
  hero("The enum value of episode." episode: Episode = NEWHOPE): Character
  "Get human details"
  human("The id of Human." id: String! = "dummy"): Human
  "Get droid details"
  droid("The id of Droid." id: String! = "sample"): Droid
}

type Mutation {
  "Submit a review for character"
  createReview(characterReview: CharacterReview): Review
}

schema {
  query: Query
	mutation: Mutation
}