schema { query: Query mutation: Mutation subscription: Subscription } type Query { hero(episode: Episode): Character reviews(episode: Episode!): [Review] search(text: String, episode: Episode): [SearchResult] character(id: ID!): Character droid(id: ID!): Droid human(id: ID!): Human starship(id: ID!): Starship test_vars(a: String, b: String, c: String): Character test_bool(boolArg: Boolean): Character argTest: ArgsTest } type Mutation { createReview(episode: Episode, review: ReviewInput!): Review } type Subscription { reviewAdded(episode: Episode): Review } enum Episode { NEWHOPE EMPIRE JEDI } input ArgTestInput { nonNullBooleanField: Boolean! intField: Int nonNullIntField: Int! stringField: String booleanField: Boolean stringListField: [String] } type ArgsTest { intArgField(intArg: Int): String nonNullIntArgField(intArg: Int!): String stringArgField(stringArg: String): String booleanArgField(booleanArg: Boolean): String enumArgField(enumArg: LengthUnit): String floatArgField(floatArg: Float): String idArgField(idArg: ID): String stringListArgField(stringListArg: [String]): String inputArgField(inputArg: ArgTestInput): String multiIntArgField(intArg1: Int, intArg2: Int): String } interface Character { id: ID! name: String! friends: [Character] friendsConnection(first: Int, after: ID): FriendsConnection! appearsIn: [Episode]! } enum LengthUnit { METER FOOT } type Human implements Character { id: ID! name: String! homePlanet: String height(unit: LengthUnit = METER): Float mass: Float episode: Episode friends: [Character] friendsConnection(first: Int, after: ID): FriendsConnection! appearsIn: [Episode]! starships: [Starship] isValid: Boolean non_null_test(stringArg: String!, intArg: Int!): Character boolTest(if: Boolean!): Boolean } type Droid implements Character { id: ID! name: String! friends: [Character] friendsConnection(first: Int, after: ID): FriendsConnection! appearsIn: [Episode]! primaryFunction: String } type FriendsConnection { totalCount: Int edges: [FriendsEdge] friends: [Character] pageInfo: PageInfo! } type FriendsEdge { cursor: ID! node: Character } type PageInfo { startCursor: ID endCursor: ID hasNextPage: Boolean! } type Review { episode: Episode stars: Int! commentary: String } input ReviewInput { stars: Int! commentary: String favorite_color: ColorInput } input ColorInput { red: Int! green: Int! blue: Int! } type Starship { id: ID! name: String! length(unit: LengthUnit = METER): Float coordinates: [[Float!]!] } union SearchResult = Human | Droid | Starship directive @preview( toggledBy: String! ) on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION directive @possibleTypes( abstractType: String concreteTypes: [String!]! ) on INPUT_FIELD_DEFINITION scalar Base64String scalar Date scalar DateTime