github.com/dgraph-io/dgraph@v1.2.8/graphql/resolve/schema.graphql (about) 1 # Test schema that contains an example of everything that's useful to 2 # test for query rewriting. 3 4 type Country { 5 id: ID! 6 name: String! @search(by: [trigram, exact]) 7 states: [State] @hasInverse(field: country) 8 } 9 10 type State { 11 code: String! @id 12 country: Country 13 name: String! 14 } 15 16 type Author { 17 id: ID! 18 name: String! @search(by: [hash]) 19 dob: DateTime @search 20 reputation: Float @search 21 country: Country 22 posts: [Post!] @hasInverse(field: author) 23 } 24 25 type Editor { 26 id: ID! 27 code: String! @id 28 name: String! @search(by: [hash]) 29 } 30 31 type Post { 32 postID: ID! 33 title: String! @search(by: [term]) 34 text: String @search(by: [fulltext]) 35 tags: [String] @search(by: [exact]) 36 numLikes: Int @search 37 isPublished: Boolean @search 38 postType: PostType @search 39 author: Author! 40 category: Category @hasInverse(field: posts) 41 } 42 43 type Category { 44 id: ID 45 name: String 46 posts: [Post] 47 } 48 49 enum PostType { 50 Fact 51 Question 52 Opinion 53 } 54 55 interface Character { 56 id: ID! 57 name: String! @search 58 } 59 60 interface Employee { 61 ename: String! 62 } 63 64 type Director implements Character { 65 movies: [String!] 66 } 67 68 type Human implements Character & Employee { 69 dob: DateTime 70 female: Boolean 71 }