Closed Raathigesh closed 8 years ago
type Author { id: Int! # the ! means that every author object must have an id firstName: String lastName: String posts: [Post] # the list of Posts by this author }
type Post { id: Int! tags: [String] title: String text: String author: Author }
type RootQuery { author(firstName: String, lastName: String): Author fortuneCookie: String }
schema { query: RootQuery }
type Author { id: Int! # the ! means that every author object must have an id firstName: String lastName: String posts: [Post] # the list of Posts by this author }
type Post { id: Int! tags: [String] title: String text: String author: Author }
the schema allows the following two queries:
type RootQuery { author(firstName: String, lastName: String): Author fortuneCookie: String }
schema { query: RootQuery }