blob: 1ce2e101e7ccf04dd91c1357aca6544c5afeee48 [file] [log] [blame]
giolekvab0b7f002020-04-16 16:05:40 +04001enum EntityType {
2 HUMAN
3 CAR
4}
5
6type Person {
7 id: Int!
8 fullName: String!
9 nick: String
10 imgs: [Image]
11}
12
13type Image {
14 id: Int! @search
15 objectPath: String! @search(by: [term])
16 segments: [ImageSegment]
17}
18
19type Point {
20 x: Int!
21 y: Int!
22}
23
24type ImageSegment {
25 id: Int!
26 upperLeft: Point!
27 lowerRight: Point!
28 represents: EntityType
29 depicts: Person
30}
31
32type A {
33 id: ID!
34}
35
36type B {
37 id: ID!
38 name: String
39 a: [A]
40}
41
42extend type A {
43 name: String @search(by: [term])
44 b: B @hasInverse(field: a)
45
46}