github.com/dgraph-io/dgraph@v1.2.8/graphql/schema/testdata/schemagen/output/searchables.graphql (about)

     1  #######################
     2  # Input Schema
     3  #######################
     4  
     5  type Post {
     6  	postID: ID!
     7  	title: String! @search(by: [term])
     8  	titleByEverything: String! @search(by: [term,fulltext,trigram,hash])
     9  	text: String @search(by: [fulltext])
    10  	tags: [String] @search(by: [trigram])
    11  	tagsHash: [String] @search(by: [hash])
    12  	tagsExact: [String] @search(by: [exact])
    13  	publishByYear: DateTime @search(by: [year])
    14  	publishByMonth: DateTime @search(by: [month])
    15  	publishByDay: DateTime @search(by: [day])
    16  	publishByHour: DateTime @search(by: [hour])
    17  	numLikes: Int @search
    18  	score: Float @search
    19  	isPublished: Boolean @search
    20  	postType: PostType @search
    21  	postTypeTrigram: PostType @search(by: [trigram])
    22  	postTypeRegexp: PostType @search(by: [regexp])
    23  	postTypeExact: PostType @search(by: [exact])
    24  	postTypeHash: PostType @search(by: [hash])
    25  	postTypeRegexpExact: PostType @search(by: [exact,regexp])
    26  	postTypeHashRegexp: PostType @search(by: [hash,regexp])
    27  	postTypeNone: PostType @search(by: [])
    28  }
    29  
    30  enum PostType {
    31  	Fact
    32  	Question
    33  	Opinion
    34  }
    35  
    36  #######################
    37  # Extended Definitions
    38  #######################
    39  
    40  scalar DateTime
    41  
    42  enum DgraphIndex {
    43  	int
    44  	float
    45  	bool
    46  	hash
    47  	exact
    48  	term
    49  	fulltext
    50  	trigram
    51  	regexp
    52  	year
    53  	month
    54  	day
    55  	hour
    56  }
    57  
    58  directive @hasInverse(field: String!) on FIELD_DEFINITION
    59  directive @search(by: [DgraphIndex!]) on FIELD_DEFINITION
    60  directive @dgraph(type: String, pred: String) on OBJECT | INTERFACE | FIELD_DEFINITION
    61  directive @id on FIELD_DEFINITION
    62  
    63  input IntFilter {
    64  	eq: Int
    65  	le: Int
    66  	lt: Int
    67  	ge: Int
    68  	gt: Int
    69  }
    70  
    71  input FloatFilter {
    72  	eq: Float
    73  	le: Float
    74  	lt: Float
    75  	ge: Float
    76  	gt: Float
    77  }
    78  
    79  input DateTimeFilter {
    80  	eq: DateTime
    81  	le: DateTime
    82  	lt: DateTime
    83  	ge: DateTime
    84  	gt: DateTime
    85  }
    86  
    87  input StringTermFilter {
    88  	allofterms: String
    89  	anyofterms: String
    90  }
    91  
    92  input StringRegExpFilter {
    93  	regexp: String
    94  }
    95  
    96  input StringFullTextFilter {
    97  	alloftext: String
    98  	anyoftext: String
    99  }
   100  
   101  input StringExactFilter {
   102  	eq: String
   103  	le: String
   104  	lt: String
   105  	ge: String
   106  	gt: String
   107  }
   108  
   109  input StringHashFilter {
   110  	eq: String
   111  }
   112  
   113  #######################
   114  # Generated Types
   115  #######################
   116  
   117  type AddPostPayload {
   118  	post(filter: PostFilter, order: PostOrder, first: Int, offset: Int): [Post]
   119  }
   120  
   121  type DeletePostPayload {
   122  	msg: String
   123  }
   124  
   125  type UpdatePostPayload {
   126  	post(filter: PostFilter, order: PostOrder, first: Int, offset: Int): [Post]
   127  }
   128  
   129  #######################
   130  # Generated Enums
   131  #######################
   132  
   133  enum PostOrderable {
   134  	title
   135  	titleByEverything
   136  	text
   137  	tags
   138  	tagsHash
   139  	tagsExact
   140  	publishByYear
   141  	publishByMonth
   142  	publishByDay
   143  	publishByHour
   144  	numLikes
   145  	score
   146  }
   147  
   148  #######################
   149  # Generated Inputs
   150  #######################
   151  
   152  input AddPostInput {
   153  	title: String!
   154  	titleByEverything: String!
   155  	text: String
   156  	tags: [String]
   157  	tagsHash: [String]
   158  	tagsExact: [String]
   159  	publishByYear: DateTime
   160  	publishByMonth: DateTime
   161  	publishByDay: DateTime
   162  	publishByHour: DateTime
   163  	numLikes: Int
   164  	score: Float
   165  	isPublished: Boolean
   166  	postType: PostType
   167  	postTypeTrigram: PostType
   168  	postTypeRegexp: PostType
   169  	postTypeExact: PostType
   170  	postTypeHash: PostType
   171  	postTypeRegexpExact: PostType
   172  	postTypeHashRegexp: PostType
   173  	postTypeNone: PostType
   174  }
   175  
   176  input PostFilter {
   177  	postID: [ID!]
   178  	title: StringTermFilter
   179  	titleByEverything: StringFullTextFilter_StringHashFilter_StringTermFilter_StringRegExpFilter
   180  	text: StringFullTextFilter
   181  	tags: StringRegExpFilter
   182  	tagsHash: StringHashFilter
   183  	tagsExact: StringExactFilter
   184  	publishByYear: DateTimeFilter
   185  	publishByMonth: DateTimeFilter
   186  	publishByDay: DateTimeFilter
   187  	publishByHour: DateTimeFilter
   188  	numLikes: IntFilter
   189  	score: FloatFilter
   190  	isPublished: Boolean
   191  	postType: PostType_hash
   192  	postTypeTrigram: StringRegExpFilter
   193  	postTypeRegexp: StringRegExpFilter
   194  	postTypeExact: PostType_exact
   195  	postTypeHash: PostType_hash
   196  	postTypeRegexpExact: PostType_exact_StringRegExpFilter
   197  	postTypeHashRegexp: PostType_hash_StringRegExpFilter
   198  	postTypeNone: PostType_hash
   199  	and: PostFilter
   200  	or: PostFilter
   201  	not: PostFilter
   202  }
   203  
   204  input PostOrder {
   205  	asc: PostOrderable
   206  	desc: PostOrderable
   207  	then: PostOrder
   208  }
   209  
   210  input PostPatch {
   211  	title: String
   212  	titleByEverything: String
   213  	text: String
   214  	tags: [String]
   215  	tagsHash: [String]
   216  	tagsExact: [String]
   217  	publishByYear: DateTime
   218  	publishByMonth: DateTime
   219  	publishByDay: DateTime
   220  	publishByHour: DateTime
   221  	numLikes: Int
   222  	score: Float
   223  	isPublished: Boolean
   224  	postType: PostType
   225  	postTypeTrigram: PostType
   226  	postTypeRegexp: PostType
   227  	postTypeExact: PostType
   228  	postTypeHash: PostType
   229  	postTypeRegexpExact: PostType
   230  	postTypeHashRegexp: PostType
   231  	postTypeNone: PostType
   232  }
   233  
   234  input PostRef {
   235  	postID: ID
   236  	title: String
   237  	titleByEverything: String
   238  	text: String
   239  	tags: [String]
   240  	tagsHash: [String]
   241  	tagsExact: [String]
   242  	publishByYear: DateTime
   243  	publishByMonth: DateTime
   244  	publishByDay: DateTime
   245  	publishByHour: DateTime
   246  	numLikes: Int
   247  	score: Float
   248  	isPublished: Boolean
   249  	postType: PostType
   250  	postTypeTrigram: PostType
   251  	postTypeRegexp: PostType
   252  	postTypeExact: PostType
   253  	postTypeHash: PostType
   254  	postTypeRegexpExact: PostType
   255  	postTypeHashRegexp: PostType
   256  	postTypeNone: PostType
   257  }
   258  
   259  input PostType_exact {
   260  	eq: PostType
   261  	le: PostType
   262  	lt: PostType
   263  	ge: PostType
   264  	gt: PostType
   265  }
   266  
   267  input PostType_exact_StringRegExpFilter {
   268  	eq: PostType
   269  	le: PostType
   270  	lt: PostType
   271  	ge: PostType
   272  	gt: PostType
   273  	regexp: String
   274  }
   275  
   276  input PostType_hash {
   277  	eq: PostType
   278  }
   279  
   280  input PostType_hash_StringRegExpFilter {
   281  	eq: PostType
   282  	regexp: String
   283  }
   284  
   285  input StringFullTextFilter_StringHashFilter_StringTermFilter_StringRegExpFilter {
   286  	alloftext: String
   287  	anyoftext: String
   288  	eq: String
   289  	allofterms: String
   290  	anyofterms: String
   291  	regexp: String
   292  }
   293  
   294  input UpdatePostInput {
   295  	filter: PostFilter!
   296  	set: PostPatch
   297  	remove: PostPatch
   298  }
   299  
   300  #######################
   301  # Generated Query
   302  #######################
   303  
   304  type Query {
   305  	getPost(postID: ID!): Post
   306  	queryPost(filter: PostFilter, order: PostOrder, first: Int, offset: Int): [Post]
   307  }
   308  
   309  #######################
   310  # Generated Mutations
   311  #######################
   312  
   313  type Mutation {
   314  	addPost(input: [AddPostInput!]!): AddPostPayload
   315  	updatePost(input: UpdatePostInput!): UpdatePostPayload
   316  	deletePost(filter: PostFilter!): DeletePostPayload
   317  }