schema {
  query: Query
}

directive @test(testArg: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT

scalar SomeCustomScalar
scalar EmailAddress
scalar Even
scalar SpecialScalar
scalar SpecialDate
scalar FooBar
scalar Foo

"""
An input type with custom scalars
"""
input CustomScalarsInput {
  """
  example email
  """
  email: EmailAddress
  """
  example even
  """
  even: Even
}

enum Episode {
  NEWHOPE
  EMPIRE
  JEDI
}

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

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

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

"""
example input type
"""
input InputType {
  """
  example key
  """
  key: String!
  """
  example value
  """
  value: Int = 42

  """
  nesting a whole object!
  """
  exampleObject: ChildInputType!

  """
  list type with default
  """
  exampleList: [ChildInputType] = [{ isChild: false, favoriteBook: "Binti" }]
  exampleScalarList: [String]! = ["something"]
}

input ChildInputType {
  isChild: Boolean! = true
  """
  favorite book
  """
  favoriteBook: String = "Where the wild things are"
}

type TestType {
  testField: String
}

type Query {
  hero(episode: Episode): Character
  human(id: String!): Human
  droid(id: String!): Droid
  inputTypeTest(args: InputType = { key: "key" }): TestType
}
