-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathgraphql.gql
150 lines (143 loc) · 2.12 KB
/
graphql.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# types of ammo.
enum ItemType {
ammo # collection the following
centerfire
rimfire
shotgun
reloading # collection of the following
powder
shot
case
primer
}
# provinces (and territories) of canada
enum Province {
AB
BC
MB
NB
NL
NS
NT
NU
ON
PE
QC
SK
YT
}
enum State {
FL
IA
IL
ID
NH
NV
OK
SC
TN
TX
UT
WA
}
# colunm sort order
enum SortOrder {
ASC
DES
}
# column to sort on
enum SortField {
name
link
# old table filters
minPrice
minUnitCost
}
enum FlatSortField {
name
link
price
unitCost
}
type ItemListing {
img: String
price: Float!
name: String!
link: String!
vendor: String!
provinces: [String] #[Province!]!
subType: String #!
brand: String!
count: Float
unitCost: Float
itemType: ItemType!
ttl: Float
}
type ItemGroup {
name: String!
brand: String!
subType: String #!
itemType: ItemType!
minPrice: Float!
maxPrice: Float!
minUnitCost: Float
maxUnitCost: Float
img: String
vendors: [ItemListing!]!
}
type ItemListings {
page: Int!
pages: Int!
pageSize: Int!
items: [ItemGroup!]!
}
type ItemFlatListings {
page: Int!
pages: Int!
pageSize: Int!
items: [ItemListing!]!
}
type Vendor {
name: String!
provinces: [String!]!
location: String!
logo: String!
link: String!
background: Boolean
hasReloadingItems: Boolean
}
type BestPrice {
unitCost: Float!
calibre: String!
type: ItemType!
}
# The "Query" type is the root of all GraphQL queries.
# (A "Mutation" type will be covered later on.)
type Query {
vendors(province: String): [Vendor]
bestPrices(type: ItemType, calibres: [String!]): [BestPrice]
itemsListings(
page: Int
pageSize: Int
itemType: ItemType
subType: String
province: String
vendor: String
sortOrder: SortOrder
sortField: SortField
query: String
brand: String
): ItemListings
itemsFlatListings(
page: Int
pageSize: Int
itemType: ItemType
subType: String
province: String
vendor: String
sortOrder: SortOrder
sortField: FlatSortField
query: String
brand: String
): ItemFlatListings
}