-
Notifications
You must be signed in to change notification settings - Fork 2
/
city.graphqls
44 lines (38 loc) · 1.24 KB
/
city.graphqls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
directive @edge(collection : String!, direction: String!) on FIELD_DEFINITION
directive @vertex(collection : String!) on OBJECT
directive @edgeTarget on FIELD_DEFINITION
type Geometry {
coordinates: [Float]
}
interface City {
_key: String!
geometry: Geometry
isCapital: Boolean
population: Int
domesticDestination: [Destination]
internationalDestinations: [Destination]
}
type Destination {
distance: Int
city: City @edgeTarget
}
type GermanCity implements City @vertex(collection: "germanCity") {
_key: String!
geometry: Geometry
isCapital: Boolean
population: Int
domesticDestination: [Destination] @edge(collection:"germanHighway", direction:"outbound")
internationalDestinations: [Destination] @edge(collection:"internationalHighway", direction:"outbound")
}
type FrenchCity implements City @vertex(collection: "frenchCity") {
_key: String!
geometry: Geometry
isCapital: Boolean
population: Int
domesticDestination: [Destination] @edge(collection:"frenchHighway", direction:"outbound")
internationalDestinations: [Destination] @edge(collection:"internationalHighway", direction:"outbound")
}
type Query {
germany(_key: String): [GermanCity]
france: [FrenchCity]
}