xxxxxxxxxx# The query type, represents all of the entry points into our object graphtype Query { hero(episode: Episode): Character reviews(episode: Episode!): [Review] search(text: String): [SearchResult] character(id: ID!): Character droid(id: ID!): Droid human(id: ID!): Human starship(id: ID!): Starship}# The mutation type, represents all updates we can make to our datatype Mutation { createReview(episode: Episode, review: ReviewInput!): Review}# The subscription type, represents all subscriptions we can make to our datatype Subscription { reviewAdded(episode: Episode): Review}# The episodes in the Star Wars trilogyenum Episode { # Star Wars Episode IV: A New Hope, released in 1977. NEWHOPE # Star Wars Episode V: The Empire Strikes Back, released in 1980. EMPIRE # Star Wars Episode VI: Return of the Jedi, released in 1983. JEDI}# A character from the Star Wars universexxxxxxxxxxfragment CharacterData on Character ( includeAppearsIn: { type: "Boolean", defaultValue: false } ) { id name appearsIn (if: $includeAppearsIn) ... on Human { homePlanet } ... on Droid { primaryFunction }}query UserProfile { hero { id ...CharacterData (includeAppearsIn: true) friends { id ...CharacterData (includeAppearsIn: false) } }}xxxxxxxxxxquery UserProfile { hero { id name appearsIn friends { id name ... on Human { homePlanet } ... on Droid { primaryFunction } } ... on Human { homePlanet } ... on Droid { primaryFunction } }}