input BlogPostInput {
  author: String
  content: String!
}

input SeriesOfBlogs {
  blogs: [BlogPostInput!]!
  authors: [String!]
}

type BlogPost implements Node {
  id: ID
  author: Author!
  comments: [Comment!]!
  hasMetadata: Boolean
  metadata: EmptyType
  state: PostState
}

type Comment implements Node {
  id: ID
  author: Author!
}

type Author implements Node {
  id: ID
  name: String
  posts: [BlogPost!]!
  comments: [Comment!]!
  friends: [Author!]
  referrer: Author

  # A nonsense self referential field
  # Don't think this would make sense usually, but it's useful for testing.
  me: Author!
}

type EmptyType {
  _: Boolean
}

type TypeWithKey {
  key: String!
}

type Query {
  allPosts: [BlogPost!]!
  post(id: ID!): BlogPost
  filteredPosts(filters: PostFilters): [BlogPost!]!
  allAuthors: [Author!]!
  allData: [PostOrAuthor!]!
  node(id: ID!): Node

  fieldWithDefaults(
    anInt: Int! = 1
    anOptionalInt: Int = 1
    input: InputWithDefaults
  ): Int!

  fieldWithString(input: String!): Int!
}

union PostOrAuthor = BlogPost | Author

enum PostState {
  POSTED
  DRAFT
}

scalar DateTime

input PostFilters {
  authorId: ID
  states: [PostState!]
}

input InputWithDefaults {
  optionalInt: Int = 1
  requiredWithDefault: Int! = 1
}

interface Node {
  id: ID
}

type WeirdNAME {
  subfield: String!
}

input WeirdINPUT {
  subfield: String!
}

enum WeirdENUM {
  AVARIANT
}

schema {
  query: Query
}
