-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathschema.gql
92 lines (80 loc) · 1.67 KB
/
schema.gql
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# ------------------------------------------------------
# THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)
# ------------------------------------------------------
type City {
id: Int!
name: String!
touristic: Boolean
population: Int
}
type Country {
id: Int!
name: String!
population: Int
cities: [City!]
treaties: [Treaty!]
capital: City!
continent: Continent
}
enum Continent {
Asia
Europe
America
Africa
}
type Treaty {
id: Int!
name: String!
countries: [Country!]
}
type Query {
countries: [Country!]!
country(id: Int!): Country!
cities(name: String): [City!]!
city(id: Int!): City!
treaties: [Treaty!]!
treaty(id: Int!): Treaty!
runScript1: String!
}
type Mutation {
createCountry(input: CreateCountryInput!): Country!
updateCountry(input: UpdateCountryInput!): Country!
removeCountry(id: Int!): Int
addCountryToTreaty(treatyId: Int!, countryId: Int!): Country!
removeCountryFromTreaty(treatyId: Int!, countryId: Int!): Country!
createCity(input: CreateCityInput!): City!
updateCity(input: UpdateCityInput!): City!
removeCity(id: Int!): Int
createTreaty(input: CreateTreatyInput!): Treaty!
updateTreaty(input: UpdateTreatyInput!): Treaty!
removeTreaty(id: Int!): Treaty!
}
input CreateCountryInput {
name: String!
population: Int
continent: Continent
}
input UpdateCountryInput {
name: String
population: Int
continent: Continent
id: Int!
}
input CreateCityInput {
name: String!
population: Int
countryId: Int!
}
input UpdateCityInput {
name: String
population: Int
countryId: Int
id: Int!
}
input CreateTreatyInput {
name: String!
}
input UpdateTreatyInput {
name: String
id: Int!
}