github.com/dgraph-io/dgraph@v1.2.8/graphql/schema/testdata/schemagen/output/hasInverse.graphql (about) 1 ####################### 2 # Input Schema 3 ####################### 4 5 type Post { 6 id: ID! 7 author(filter: AuthorFilter): Author! @hasInverse(field: "posts") 8 } 9 10 type Author { 11 id: ID! 12 posts(filter: PostFilter, first: Int, offset: Int): [Post!]! @hasInverse(field: "author") 13 } 14 15 ####################### 16 # Extended Definitions 17 ####################### 18 19 scalar DateTime 20 21 enum DgraphIndex { 22 int 23 float 24 bool 25 hash 26 exact 27 term 28 fulltext 29 trigram 30 regexp 31 year 32 month 33 day 34 hour 35 } 36 37 directive @hasInverse(field: String!) on FIELD_DEFINITION 38 directive @search(by: [DgraphIndex!]) on FIELD_DEFINITION 39 directive @dgraph(type: String, pred: String) on OBJECT | INTERFACE | FIELD_DEFINITION 40 directive @id on FIELD_DEFINITION 41 42 input IntFilter { 43 eq: Int 44 le: Int 45 lt: Int 46 ge: Int 47 gt: Int 48 } 49 50 input FloatFilter { 51 eq: Float 52 le: Float 53 lt: Float 54 ge: Float 55 gt: Float 56 } 57 58 input DateTimeFilter { 59 eq: DateTime 60 le: DateTime 61 lt: DateTime 62 ge: DateTime 63 gt: DateTime 64 } 65 66 input StringTermFilter { 67 allofterms: String 68 anyofterms: String 69 } 70 71 input StringRegExpFilter { 72 regexp: String 73 } 74 75 input StringFullTextFilter { 76 alloftext: String 77 anyoftext: String 78 } 79 80 input StringExactFilter { 81 eq: String 82 le: String 83 lt: String 84 ge: String 85 gt: String 86 } 87 88 input StringHashFilter { 89 eq: String 90 } 91 92 ####################### 93 # Generated Types 94 ####################### 95 96 type AddAuthorPayload { 97 author(filter: AuthorFilter, first: Int, offset: Int): [Author] 98 } 99 100 type AddPostPayload { 101 post(filter: PostFilter, first: Int, offset: Int): [Post] 102 } 103 104 type DeleteAuthorPayload { 105 msg: String 106 } 107 108 type DeletePostPayload { 109 msg: String 110 } 111 112 type UpdateAuthorPayload { 113 author(filter: AuthorFilter, first: Int, offset: Int): [Author] 114 } 115 116 type UpdatePostPayload { 117 post(filter: PostFilter, first: Int, offset: Int): [Post] 118 } 119 120 ####################### 121 # Generated Enums 122 ####################### 123 124 ####################### 125 # Generated Inputs 126 ####################### 127 128 input AddAuthorInput { 129 posts: [PostRef!]! 130 } 131 132 input AddPostInput { 133 author: AuthorRef! 134 } 135 136 input AuthorFilter { 137 id: [ID!] 138 not: AuthorFilter 139 } 140 141 input AuthorPatch { 142 posts: [PostRef!] 143 } 144 145 input AuthorRef { 146 id: ID 147 posts: [PostRef!] 148 } 149 150 input PostFilter { 151 id: [ID!] 152 not: PostFilter 153 } 154 155 input PostPatch { 156 author: AuthorRef 157 } 158 159 input PostRef { 160 id: ID 161 author: AuthorRef 162 } 163 164 input UpdateAuthorInput { 165 filter: AuthorFilter! 166 set: AuthorPatch 167 remove: AuthorPatch 168 } 169 170 input UpdatePostInput { 171 filter: PostFilter! 172 set: PostPatch 173 remove: PostPatch 174 } 175 176 ####################### 177 # Generated Query 178 ####################### 179 180 type Query { 181 getPost(id: ID!): Post 182 queryPost(filter: PostFilter, first: Int, offset: Int): [Post] 183 getAuthor(id: ID!): Author 184 queryAuthor(filter: AuthorFilter, first: Int, offset: Int): [Author] 185 } 186 187 ####################### 188 # Generated Mutations 189 ####################### 190 191 type Mutation { 192 addPost(input: [AddPostInput!]!): AddPostPayload 193 updatePost(input: UpdatePostInput!): UpdatePostPayload 194 deletePost(filter: PostFilter!): DeletePostPayload 195 addAuthor(input: [AddAuthorInput!]!): AddAuthorPayload 196 updateAuthor(input: UpdateAuthorInput!): UpdateAuthorPayload 197 deleteAuthor(filter: AuthorFilter!): DeleteAuthorPayload 198 }